On 04/25/2019 06:47 AM, Gordon Sim wrote:
> On 25/04/2019 7:16 am, Jose Alberto Fernandez Parejo wrote:
>> Hello Gordon,
>>
>> Thank you very much for the quick response.
>>
>> We have downloaded the new version including that commit. Now there is
>> no error when calling
>>
>> connection.setOption("virtualhost", "virtualhost_name");
>>
>> But the client is connecting to default virtual host "/" and not to the
>> one set with setOption procedure.
>>
>> We are using rabbitmq broker. The logs of rabbitmq there is nothing
>> regarding virtualhost when connecting.
>>
>> Is there anything we can check to be sure we are not doing anything
wrong?
>
> Run with QPID_LOG_ENABLE=trace+ while connecting and check that the
'open' frame's host field is set correctly.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
> .
>
Thanks for the response.
It is strange but there is no host field in 'open' frame. See below the
logs for the following calls:
Connection connection(url, "{protocol:amqp1.0}");
connection.setOption("sasl-mechanism", "PLAIN");
connection.setOption("username", "p_21");
connection.setOption("password", "p_21");
connection.setOption("virtualhost", "P_21_seqdep");
connection.open();
We have been debugging and it seems that
ConnectionContext::configureConnection is not called after
connection.setOption
Thanks again for your support.
Traces:
2019-04-25 08:54:47 [Messaging] debug Protocol defaults: amqp1.0,amqp0-10
2019-04-25 08:54:47 [Messaging] debug Trying versions amqp1.0
2019-04-25 08:54:47 [Messaging] debug Driver started
2019-04-25 08:54:47 [Messaging] info Starting connection to
amqp:tcp:127.0.0.1:5672
2019-04-25 08:54:47 [Messaging] info Connecting to tcp:127.0.0.1:5672
2019-04-25 08:54:47 [Messaging] debug tcp:127.0.0.1:5672 Connecting ...
2019-04-25 08:54:47 [Client] debug Set TCP_NODELAY
2019-04-25 08:54:47 [System] info Connecting: 127.0.0.1:5672
2019-04-25 08:54:47 [Messaging] debug tcp:127.0.0.1:5672 Connected
2019-04-25 08:54:47 [Messaging] debug wakeupDriver()
2019-04-25 08:54:47 [Messaging] debug tcp:127.0.0.1:5672 Waiting to be
authenticated...
2019-04-25 08:54:47 [Security] trace tcp:127.0.0.1:5672
Sasl::canEncode(): 1 || 0
2019-04-25 08:54:47 [Security] trace tcp:127.0.0.1:5672
Sasl::canEncode(): 1 || 0
2019-04-25 08:54:47 [Protocol] debug tcp:127.0.0.1:5672 writing protocol
header: 1-0
2019-04-25 08:54:47 [Security] trace tcp:127.0.0.1:5672
Sasl::encode(65535): 8
2019-04-25 08:54:47 [Security] trace tcp:127.0.0.1:5672
Sasl::canEncode(): 0 || 0
2019-04-25 08:54:47 [Protocol] debug tcp:127.0.0.1:5672 read protocol
header: 1-0
2019-04-25 08:54:47 [Security] trace tcp:127.0.0.1:5672 Sasl::decode(8): 8
2019-04-25 08:54:47 [Security] trace Reading SASL frame of size 52
2019-04-25 08:54:47 [Security] trace Reading SASL-MECHANISMS
2019-04-25 08:54:47 [Protocol] debug tcp:127.0.0.1:5672 Received
SASL-MECHANISMS(ANONYMOUS PLAIN AMQPLAIN )
2019-04-25 08:54:47 [Security] debug CyrusSasl::start(PLAIN )
2019-04-25 08:54:47 [Security] debug min_ssf: 0, max_ssf: 256
2019-04-25 08:54:47 [Security] debug getUserFromSettings(): p_21
2019-04-25 08:54:47 [Security] debug CyrusSasl::start(PLAIN ): selected
PLAIN response: '\x00p_21\x00p_21'
2019-04-25 08:54:47 [Security] trace Completed encoding of frame of 50 bytes
2019-04-25 08:54:47 [Protocol] debug tcp:127.0.0.1:5672 Sent
SASL-INIT(PLAIN, \x00p_21\x00p_21, 127.0.0.1)
2019-04-25 08:54:47 [Messaging] debug wakeupDriver()
2019-04-25 08:54:47 [Security] trace tcp:127.0.0.1:5672 Sasl::decode(52): 52
2019-04-25 08:54:47 [Security] trace tcp:127.0.0.1:5672
Sasl::canEncode(): 0 || 1
2019-04-25 08:54:47 [Security] trace tcp:127.0.0.1:5672
Sasl::canEncode(): 0 || 1
2019-04-25 08:54:47 [Security] trace tcp:127.0.0.1:5672
Sasl::encode(65535): 50
2019-04-25 08:54:47 [Security] trace tcp:127.0.0.1:5672
Sasl::canEncode(): 0 || 0
2019-04-25 08:54:47 [Security] trace Reading SASL frame of size 17
2019-04-25 08:54:47 [Security] trace Reading SASL-OUTCOME
2019-04-25 08:54:47 [Protocol] debug tcp:127.0.0.1:5672 Received
SASL-OUTCOME(\x00)
2019-04-25 08:54:47 [Messaging] debug wakeupDriver()
2019-04-25 08:54:47 [Security] trace tcp:127.0.0.1:5672 Sasl::decode(17): 17
2019-04-25 08:54:47 [Security] trace tcp:127.0.0.1:5672
Sasl::canEncode(): 0 || 0
2019-04-25 08:54:47 [Security] trace tcp:127.0.0.1:5672
Sasl::canEncode(): 0 || 0
2019-04-25 08:54:47 [Messaging] trace tcp:127.0.0.1:5672 encode(65535)
2019-04-25 08:54:47 [Protocol] trace
[8b0d2bba-7e5d-4d17-9fb1-2d9fd8c8a74c]: -> AMQP
2019-04-25 08:54:47 [Network] debug tcp:127.0.0.1:5672 encoded 8 bytes
from 65535
2019-04-25 08:54:47 [Security] trace tcp:127.0.0.1:5672
Sasl::canEncode(): 0 || 0
2019-04-25 08:54:47 [Security] trace tcp:127.0.0.1:5672
Sasl::canEncode(): 0 || 0
2019-04-25 08:54:47 [Messaging] trace tcp:127.0.0.1:5672 encode(65535)
2019-04-25 08:54:47 [Security] trace tcp:127.0.0.1:5672
Sasl::canEncode(): 0 || 0
2019-04-25 08:54:47 [Messaging] trace tcp:127.0.0.1:5672 decode(8)
2019-04-25 08:54:47 [Protocol] trace
[8b0d2bba-7e5d-4d17-9fb1-2d9fd8c8a74c]: <- AMQP
2019-04-25 08:54:47 [Network] debug tcp:127.0.0.1:5672 decoded 8 bytes
from 8
2019-04-25 08:54:47 [Messaging] debug tcp:127.0.0.1:5672 Authenticated
2019-04-25 08:54:47 [Messaging] debug tcp:127.0.0.1:5672 Opening...
2019-04-25 08:54:47 [Messaging] debug wakeupDriver()
2019-04-25 08:54:47 [Security] trace tcp:127.0.0.1:5672
Sasl::canEncode(): 0 || 0
2019-04-25 08:54:47 [Security] trace tcp:127.0.0.1:5672
Sasl::canEncode(): 0 || 0
2019-04-25 08:54:47 [Messaging] trace tcp:127.0.0.1:5672 encode(65535)
2019-04-25 08:54:47 [Protocol] trace
[8b0d2bba-7e5d-4d17-9fb1-2d9fd8c8a74c]: 0 -> @open(16)
[container-id="8b0d2bba-7e5d-4d17-9fb1-2d9fd8c8a74c", channel-max=32767,
properties={:"qpid.client_process"=:server, :"qpid.client_pid"=29847,
:"qpid.client_ppid"=63473}]
2019-04-25 08:54:47 [Network] debug tcp:127.0.0.1:5672 encoded 151 bytes
from 65535
2019-04-25 08:54:47 [Security] trace tcp:127.0.0.1:5672
Sasl::canEncode(): 0 || 0
2019-04-25 08:54:47 [Security] trace tcp:127.0.0.1:5672
Sasl::canEncode(): 0 || 0
2019-04-25 08:54:47 [Messaging] trace tcp:127.0.0.1:5672 encode(65535)
2019-04-25 08:54:47 [Security] trace tcp:127.0.0.1:5672
Sasl::canEncode(): 0 || 0
2019-04-25 08:54:47 [Messaging] trace tcp:127.0.0.1:5672 decode(277)
2019-04-25 08:54:47 [Protocol] trace
[8b0d2bba-7e5d-4d17-9fb1-2d9fd8c8a74c]: 0 <- @open(16)
[container-id="rabbit@stringc4", channel-max=32767, idle-time-out=60000,
properties={:"cluster_name"="rabbit@stringc4", :copyright="Copyright (C)
2007-2018 Pivotal Software, Inc.", :information="Licensed under the MPL.
See http://www.rabbitmq.com/", :platform="Erlang/OTP 21.2.2",
:product="RabbitMQ", :version="3.7.10"}]
2019-04-25 08:54:47 [Network] debug tcp:127.0.0.1:5672 decoded 277 bytes
from 277
2019-04-25 08:54:47 [Messaging] debug tcp:127.0.0.1:5672 AMQP 1.0
idle-timeout set: local=0 remote=60000
2019-04-25 08:54:47 [Messaging] debug tcp:127.0.0.1:5672 Opened
2019-04-25 08:54:47 [Messaging] info Connected to tcp:127.0.0.1:5672
________________________________
Este correo electrónico y, en su caso, cualquier fichero anexo al mismo,
contiene información de carácter confidencial exclusivamente dirigida a su
destinatario o destinatarios. Si no es vd. el destinatario indicado, queda
notificado que la lectura, utilización, divulgación y/o copia sin autorización
está prohibida en virtud de la legislación vigente. En el caso de haber
recibido este correo electrónico por error, se ruega notificar inmediatamente
esta circunstancia mediante reenvío a la dirección electrónica del remitente.
Evite imprimir este mensaje si no es estrictamente necesario.
This email and any file attached to it (when applicable) contain(s)
confidential information that is exclusively addressed to its recipient(s). If
you are not the indicated recipient, you are informed that reading, using,
disseminating and/or copying it without authorisation is forbidden in
accordance with the legislation in effect. If you have received this email by
mistake, please immediately notify the sender of the situation by resending it
to their email address.
Avoid printing this message if it is not absolutely necessary.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]