qpid-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alan Conway <acon...@redhat.com>
Subject Re: Meaning of http: yes in qdrouterd.conf
Date Mon, 29 May 2017 18:12:51 GMT
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: users-unsubscribe@qpid.apache.org
For additional commands, e-mail: users-help@qpid.apache.org


Mime
View raw message