qpid-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jiri Danek <jda...@redhat.com>
Subject Meaning of http: yes in qdrouterd.conf
Date Mon, 29 May 2017 14:03:59 GMT
Hello, I've added http: yes to the listener in the default broker config.
So my only listener on the router looks like this

listener {
   host: 0.0.0.0
   port: amqp
   authenticatePeer: no
   saslMechanisms: ANONYMOUS
   http: yes
}

I am now unable to connect with qdstat to the broker

[root@5c1091d699f0 /]# qdrouterd -c qdrouterd.conf &
[1] 92
[root@5c1091d699f0 /]# Mon May 29 13:41:39 2017 HTTP (info) Initial logging
level 7
Mon May 29 13:41:39 2017 HTTP (info) Libwebsockets version: 2.1.0
unknown-build-hash
Mon May 29 13:41:39 2017 HTTP (info) IPV6 not compiled in
Mon May 29 13:41:39 2017 HTTP (info) libev support not compiled in
Mon May 29 13:41:39 2017 HTTP (info) libuv support not compiled in
Mon May 29 13:41:39 2017 HTTP (info)  Threads: 1 each 1048576 fds
Mon May 29 13:41:39 2017 HTTP (info)  mem: platform fd map: 8388608 bytes
Mon May 29 13:41:39 2017 HTTP (info)  Compiled with OpenSSL support
Mon May 29 13:41:39 2017 HTTP (info)  mem: per-conn:          512 bytes +
protocol rx buf
Mon May 29 13:41:39 2017 SERVER (info) Container Name: Router.A
Mon May 29 13:41:39 2017 ROUTER (info) Router started in Standalone mode
Mon May 29 13:41:39 2017 ROUTER_CORE (info) Allow Unsettled Multicast: no
Mon May 29 13:41:39 2017 ROUTER_CORE (info) Router Core thread running.
0/Router.A
Mon May 29 13:41:39 2017 ROUTER_CORE (info) In-process subscription
M/$management
Mon May 29 13:41:39 2017 AGENT (info) Activating management agent on
$_management_internal
Mon May 29 13:41:39 2017 ROUTER_CORE (info) In-process subscription
L/$management
Mon May 29 13:41:39 2017 ROUTER_CORE (info) In-process subscription
L/$_management_internal
Mon May 29 13:41:39 2017 CONN_MGR (info) Configured Listener: 0.0.0.0:amqp
proto=any, role=normal, http
Mon May 29 13:41:39 2017 HTTP (info) Creating Vhost 'vhost0' port -2, 3
protocols, IPv6 off
Mon May 29 13:41:39 2017 HTTP (info)    mounting
file:///usr/share/qpid-dispatch/console/stand-alone to /
Mon May 29 13:41:39 2017 POLICY (info) Policy configured maxConnections:
65535, policyDir: '', access rules enabled: 'false'
Mon May 29 13:41:39 2017 POLICY (info) Policy fallback defaultVhost is
defined: '$default'
Mon May 29 13:41:39 2017 SERVER (info) Operational, 4 Threads Running

[root@5c1091d699f0 /]# qdstat -a -b amqp://127.0.0.1
Mon May 29 13:44:44 2017 HTTP (info)  forbidding on uri sanitation
Mon May 29 13:44:44 2017 HTTP (info) lws_server_socket_service: wsi
0x7fcc8c017610 read 0
ConnectionException: Connection amqp://127.0.0.1:amqp/$management
disconnected: Condition('amqp:connection:framing-error', "SASL header
mismatch: Unknown protocol ['HTTP/1.0 403
Forbidden\\x0d\\x0aserver: qpid-dispatch-router\\x0d\\x0acontent-type:
text/html\\x0d\\x0acontent-length:
38\\x0d\\x0a\\x0d\\x0a<html><body><h1>403</h1></body></html>']")

Apparently, setting http: yes means that only websocket connections are now
accepted, and not regular amqp. Is that intended?

I addition, qpid clients generally print unhelpful messages when connecting
with regular amqp to such listener. Output of proton binding is shown in
qdstat output. Qpid-jms prints

13:59:11,726 ERROR Failed to connect to remote at: amqp://127.0.0.1:5672
13:59:11,729 ERROR org.apache.qpid.proton.engine.TransportException: AMQP
SASL header mismatch value 48, expecting 41. In state: HEADER0
javax.jms.JMSException: org.apache.qpid.proton.engine.TransportException:
AMQP SASL header mismatch value 48, expecting 41. In state: HEADER0
at
org.apache.qpid.jms.exceptions.JmsExceptionSupport.create(JmsExceptionSupport.java:86)
at
org.apache.qpid.jms.exceptions.JmsExceptionSupport.create(JmsExceptionSupport.java:108)
at org.apache.qpid.jms.JmsConnection.connect(JmsConnection.java:168)
at
org.apache.qpid.jms.JmsConnectionFactory.createConnection(JmsConnectionFactory.java:204)
at
org.apache.qpid.jms.JmsConnectionFactory.createConnection(JmsConnectionFactory.java:191)
at com.redhat.mqe.jms.ConnectionManager.<init>(ConnectionManager.java:85)
at com.redhat.mqe.jms.CoreClient.createConnection(CoreClient.java:135)
at com.redhat.mqe.jms.ReceiverClient.consumeMessage(ReceiverClient.java:134)
at com.redhat.mqe.jms.ReceiverClient.startClient(ReceiverClient.java:110)
at com.redhat.mqe.jms.aac1_receiver.main(aac1_receiver.java:17)
at com.redhat.mqe.jms.Main.main(Main.java:28)
at com.redhat.mqe.jms.MainTest.sendAndReceiveSingleMessage(MainTest.kt:32)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at
org.junit.platform.commons.util.ReflectionUtils.invokeMethod(ReflectionUtils.java:316)
at
org.junit.jupiter.engine.execution.ExecutableInvoker.invoke(ExecutableInvoker.java:114)
at
org.junit.jupiter.engine.descriptor.MethodTestDescriptor.lambda$invokeTestMethod$6(MethodTestDescriptor.java:171)
at
org.junit.jupiter.engine.execution.ThrowableCollector.execute(ThrowableCollector.java:40)
at
org.junit.jupiter.engine.descriptor.MethodTestDescriptor.invokeTestMethod(MethodTestDescriptor.java:168)
at
org.junit.jupiter.engine.descriptor.MethodTestDescriptor.execute(MethodTestDescriptor.java:115)
at
org.junit.jupiter.engine.descriptor.MethodTestDescriptor.execute(MethodTestDescriptor.java:57)
at
org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor.lambda$execute$1(HierarchicalTestExecutor.java:81)
at
org.junit.platform.engine.support.hierarchical.SingleTestExecutor.executeSafely(SingleTestExecutor.java:66)
at
org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor.execute(HierarchicalTestExecutor.java:76)
at
org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor.lambda$execute$1(HierarchicalTestExecutor.java:91)
at
org.junit.platform.engine.support.hierarchical.SingleTestExecutor.executeSafely(SingleTestExecutor.java:66)
at
org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor.execute(HierarchicalTestExecutor.java:76)
at
org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor.lambda$execute$1(HierarchicalTestExecutor.java:91)
at
org.junit.platform.engine.support.hierarchical.SingleTestExecutor.executeSafely(SingleTestExecutor.java:66)
at
org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor.execute(HierarchicalTestExecutor.java:76)
at
org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor.execute(HierarchicalTestExecutor.java:51)
at
org.junit.platform.engine.support.hierarchical.HierarchicalTestEngine.execute(HierarchicalTestEngine.java:43)
at
org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:137)
at
org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:87)
at org.junit.platform.launcher.Launcher.execute(Launcher.java:93)
at
com.intellij.junit5.JUnit5IdeaTestRunner.startRunnerWithArgs(JUnit5IdeaTestRunner.java:61)
at
com.intellij.rt.execution.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:51)
at
com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:242)
at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:70)
Caused by: java.io.IOException:
org.apache.qpid.proton.engine.TransportException: AMQP SASL header mismatch
value 48, expecting 41. In state: HEADER0
at
org.apache.qpid.jms.util.IOExceptionSupport.create(IOExceptionSupport.java:45)
at
org.apache.qpid.jms.provider.ProviderFuture.failOnError(ProviderFuture.java:108)
at org.apache.qpid.jms.provider.ProviderFuture.sync(ProviderFuture.java:87)
at
org.apache.qpid.jms.provider.amqp.AmqpProvider.connect(AmqpProvider.java:221)
at org.apache.qpid.jms.JmsConnection.connect(JmsConnection.java:160)
... 38 more
Caused by: org.apache.qpid.proton.engine.TransportException:
org.apache.qpid.proton.engine.TransportException: AMQP SASL header mismatch
value 48, expecting 41. In state: HEADER0
at
org.apache.qpid.proton.engine.TransportResultFactory$TransportResultImpl.checkIsOk(TransportResultFactory.java:116)
at
org.apache.qpid.jms.provider.amqp.AmqpProvider$18.run(AmqpProvider.java:781)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
at
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: org.apache.qpid.proton.engine.TransportException: AMQP SASL
header mismatch value 48, expecting 41. In state: HEADER0
at
org.apache.qpid.proton.engine.impl.SaslFrameParser.input(SaslFrameParser.java:92)
at
org.apache.qpid.proton.engine.impl.SaslImpl$SaslTransportWrapper.reallyProcessInput(SaslImpl.java:629)
at
org.apache.qpid.proton.engine.impl.SaslImpl$SaslTransportWrapper.process(SaslImpl.java:600)
at
org.apache.qpid.proton.engine.impl.HandshakeSniffingTransportWrapper.process(HandshakeSniffingTransportWrapper.java:101)
at
org.apache.qpid.proton.engine.impl.TransportImpl.process(TransportImpl.java:1477)
at
org.apache.qpid.proton.engine.impl.TransportImpl.processInput(TransportImpl.java:1435)
... 8 more

If I connect to amqpws://127.0.0.1 with qpid-jms, that does work.

Are there possibilities and interest for improving the error messages
reproduced above?

Thanks,
-- 
Jiří Daněk

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message