Meaning of http: yes in qdrouterd.conf

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Meaning of http: yes in qdrouterd.conf

Jiri Danek
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
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Meaning of http: yes in qdrouterd.conf

aconway.rh
On Mon, 2017-05-29 at 16:03 +0200, Jiri Danek wrote:

> 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

http:yes means listen for HTTP/AMQP-over-websockets connections, not
normal AMQP. You can connect to the port with a web browser to see the
dispatch router management console.

We don't (yet) support automatic detection of AMQP vs. HTTP protcols so
if you use http:yes, that port will only act as a HTTP server port, it
won't accept normal AMQP connections.

>
> [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(JmsExceptio
> nSupport.java:86)
> at
> org.apache.qpid.jms.exceptions.JmsExceptionSupport.create(JmsExceptio
> nSupport.java:108)
> at org.apache.qpid.jms.JmsConnection.connect(JmsConnection.java:168)
> at
> org.apache.qpid.jms.JmsConnectionFactory.createConnection(JmsConnecti
> onFactory.java:204)
> at
> org.apache.qpid.jms.JmsConnectionFactory.createConnection(JmsConnecti
> onFactory.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:3
> 2)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
> java:62)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
> sorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:498)
> at
> org.junit.platform.commons.util.ReflectionUtils.invokeMethod(Reflecti
> onUtils.java:316)
> at
> org.junit.jupiter.engine.execution.ExecutableInvoker.invoke(Executabl
> eInvoker.java:114)
> at
> org.junit.jupiter.engine.descriptor.MethodTestDescriptor.lambda$invok
> eTestMethod$6(MethodTestDescriptor.java:171)
> at
> org.junit.jupiter.engine.execution.ThrowableCollector.execute(Throwab
> leCollector.java:40)
> at
> org.junit.jupiter.engine.descriptor.MethodTestDescriptor.invokeTestMe
> thod(MethodTestDescriptor.java:168)
> at
> org.junit.jupiter.engine.descriptor.MethodTestDescriptor.execute(Meth
> odTestDescriptor.java:115)
> at
> org.junit.jupiter.engine.descriptor.MethodTestDescriptor.execute(Meth
> odTestDescriptor.java:57)
> at
> org.junit.platform.engine.support.hierarchical.HierarchicalTestExecut
> or.lambda$execute$1(HierarchicalTestExecutor.java:81)
> at
> org.junit.platform.engine.support.hierarchical.SingleTestExecutor.exe
> cuteSafely(SingleTestExecutor.java:66)
> at
> org.junit.platform.engine.support.hierarchical.HierarchicalTestExecut
> or.execute(HierarchicalTestExecutor.java:76)
> at
> org.junit.platform.engine.support.hierarchical.HierarchicalTestExecut
> or.lambda$execute$1(HierarchicalTestExecutor.java:91)
> at
> org.junit.platform.engine.support.hierarchical.SingleTestExecutor.exe
> cuteSafely(SingleTestExecutor.java:66)
> at
> org.junit.platform.engine.support.hierarchical.HierarchicalTestExecut
> or.execute(HierarchicalTestExecutor.java:76)
> at
> org.junit.platform.engine.support.hierarchical.HierarchicalTestExecut
> or.lambda$execute$1(HierarchicalTestExecutor.java:91)
> at
> org.junit.platform.engine.support.hierarchical.SingleTestExecutor.exe
> cuteSafely(SingleTestExecutor.java:66)
> at
> org.junit.platform.engine.support.hierarchical.HierarchicalTestExecut
> or.execute(HierarchicalTestExecutor.java:76)
> at
> org.junit.platform.engine.support.hierarchical.HierarchicalTestExecut
> or.execute(HierarchicalTestExecutor.java:51)
> at
> org.junit.platform.engine.support.hierarchical.HierarchicalTestEngine
> .execute(HierarchicalTestEngine.java:43)
> at
> org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLaunc
> her.java:137)
> at
> org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLaunc
> her.java:87)
> at org.junit.platform.launcher.Launcher.execute(Launcher.java:93)
> at
> com.intellij.junit5.JUnit5IdeaTestRunner.startRunnerWithArgs(JUnit5Id
> eaTestRunner.java:61)
> at
> com.intellij.rt.execution.junit.IdeaTestRunner$Repeater.startRunnerWi
> thArgs(IdeaTestRunner.java:51)
> at
> com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(J
> UnitStarter.java:242)
> at
> com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:7
> 0)
> 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(ProviderFutur
> e.java:108)
> at
> org.apache.qpid.jms.provider.ProviderFuture.sync(ProviderFuture.java:
> 87)
> at
> org.apache.qpid.jms.provider.amqp.AmqpProvider.connect(AmqpProvider.j
> ava: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$TransportResultI
> mpl.checkIsOk(TransportResultFactory.java:116)
> at
> org.apache.qpid.jms.provider.amqp.AmqpProvider$18.run(AmqpProvider.ja
> va:781)
> at
> java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:51
> 1)
> 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(SaslFramePar
> ser.java:92)
> at
> org.apache.qpid.proton.engine.impl.SaslImpl$SaslTransportWrapper.real
> lyProcessInput(SaslImpl.java:629)
> at
> org.apache.qpid.proton.engine.impl.SaslImpl$SaslTransportWrapper.proc
> ess(SaslImpl.java:600)
> at
> org.apache.qpid.proton.engine.impl.HandshakeSniffingTransportWrapper.
> process(HandshakeSniffingTransportWrapper.java:101)
> at
> org.apache.qpid.proton.engine.impl.TransportImpl.process(TransportImp
> l.java:1477)
> at
> org.apache.qpid.proton.engine.impl.TransportImpl.processInput(Transpo
> rtImpl.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,


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Meaning of http: yes in qdrouterd.conf

Gordon Sim
On 29/05/17 19:12, Alan Conway wrote:

> On Mon, 2017-05-29 at 16:03 +0200, Jiri Danek wrote:
>> 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
>
> http:yes means listen for HTTP/AMQP-over-websockets connections, not
> normal AMQP. You can connect to the port with a web browser to see the
> dispatch router management console.
>
> We don't (yet) support automatic detection of AMQP vs. HTTP protcols so
> if you use http:yes, that port will only act as a HTTP server port, it
> won't accept normal AMQP connections.

Perhaps it would be clearer to set the 'role' of the listener to 'http'
(instead of 'normal')? That way you realise that you need a separate
listener.

(If and when there is some detection of protocols, then a 'protocols'
option listing those enabled could be added).


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Meaning of http: yes in qdrouterd.conf

Jiri Danek
On Mon, May 29, 2017 at 8:56 PM, Gordon Sim <[hidden email]> wrote:

> On 29/05/17 19:12, Alan Conway wrote:
>
>> On Mon, 2017-05-29 at 16:03 +0200, Jiri Danek wrote:
>>
>>> 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
>>>
>>
>> http:yes means listen for HTTP/AMQP-over-websockets connections, not
>> normal AMQP. You can connect to the port with a web browser to see the
>> dispatch router management console.
>>
>> We don't (yet) support automatic detection of AMQP vs. HTTP protcols so
>> if you use http:yes, that port will only act as a HTTP server port, it
>> won't accept normal AMQP connections.
>>
>
> Perhaps it would be clearer to set the 'role' of the listener to 'http'
> (instead of 'normal')? That way you realise that you need a separate
> listener.
>
> (If and when there is some detection of protocols, then a 'protocols'
> option listing those enabled could be added).


To me, the http:yes option implies adding http support on top of the normal
amqp. Setting role:http would make it clearer in this respect. Since nobody
else complained, I am not sure if implementing the change is worth the
effort, though. Maybe just document it?

Instead of

                    "description": "Accept HTTP connections that can
upgrade to AMQP over WebSocket",

write

                    "description": "Accept HTTP connections that can
upgrade to AMQP over WebSocket. Plain AMQP connections are not accepted on
this listener.",

?
--
Jiří Daněk
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Meaning of http: yes in qdrouterd.conf

aconway.rh
In reply to this post by Gordon Sim
On Mon, 2017-05-29 at 19:56 +0100, Gordon Sim wrote:

> On 29/05/17 19:12, Alan Conway wrote:
> > On Mon, 2017-05-29 at 16:03 +0200, Jiri Danek wrote:
> > > 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
> >
> > http:yes means listen for HTTP/AMQP-over-websockets connections,
> > not
> > normal AMQP. You can connect to the port with a web browser to see
> > the
> > dispatch router management console.
> >
> > We don't (yet) support automatic detection of AMQP vs. HTTP
> > protcols so
> > if you use http:yes, that port will only act as a HTTP server port,
> > it
> > won't accept normal AMQP connections.
>
> Perhaps it would be clearer to set the 'role' of the listener to
> 'http' 
> (instead of 'normal')? That way you realise that you need a separate 
> listener.

That would be a lot clearer. Any objections? We have released the
http=yes flag but we could deprecate and undocument it, or if we move
to 1.0 we could perhaps justify just removing it.

>
> (If and when there is some detection of protocols, then a
> 'protocols' 
> option listing those enabled could be added).

Given the current use of this feature I don't think protocol detection
is important, and given the current implementation (and many imaginable
other implementations) it would be quite difficult to do - I'd be happy
to drop that ambition in the interests of clarity.

>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Meaning of http: yes in qdrouterd.conf

aconway.rh
In reply to this post by Jiri Danek
On Tue, 2017-05-30 at 10:27 +0200, Jiri Danek wrote:

> On Mon, May 29, 2017 at 8:56 PM, Gordon Sim <[hidden email]> wrote:
>
> > On 29/05/17 19:12, Alan Conway wrote:
> >
> > > On Mon, 2017-05-29 at 16:03 +0200, Jiri Danek wrote:
> > >
> > > > 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
> > > >
> > >
> > > http:yes means listen for HTTP/AMQP-over-websockets connections,
> > > not
> > > normal AMQP. You can connect to the port with a web browser to
> > > see the
> > > dispatch router management console.
> > >
> > > We don't (yet) support automatic detection of AMQP vs. HTTP
> > > protcols so
> > > if you use http:yes, that port will only act as a HTTP server
> > > port, it
> > > won't accept normal AMQP connections.
> > >
> >
> > Perhaps it would be clearer to set the 'role' of the listener to
> > 'http'
> > (instead of 'normal')? That way you realise that you need a
> > separate
> > listener.
> >
> > (If and when there is some detection of protocols, then a
> > 'protocols'
> > option listing those enabled could be added).
>
>
> To me, the http:yes option implies adding http support on top of the
> normal
> amqp. Setting role:http would make it clearer in this respect. Since
> nobody
> else complained, I am not sure if implementing the change is worth
> the
> effort, though. Maybe just document it?
>
> Instead of
>
>                     "description": "Accept HTTP connections that can
> upgrade to AMQP over WebSocket",
>
> write
>
>                     "description": "Accept HTTP connections that can
> upgrade to AMQP over WebSocket. Plain AMQP connections are not
> accepted on
> this listener.",
>
> ?

Excellent point - done on master.

I still prefer Gordon's suggestion if there are no objections but in
case we don't make the change at least the doc is clear.


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Loading...