(Migrated) connection to amqp

(This message has been automatically imported from the retired mailing list)

Hello.

If I try to create a connection to rabbitmq, I found the following error in
rabbit logs:

{amqp_error,not_found,“no queue ‘zato’ in vhost ‘/’”,‘basic.consume’}

Why Zato try to connect to a queue named “zato”? Is it possible to change
this behaviour?

Thank you

Giovanni

PS: zato version: 1.1

On 04/11/2014 08:59 AM, Giovanni Colapinto wrote:

If I try to create a connection to rabbitmq, I found the following error in
rabbit logs:

{amqp_error,not_found,“no queue ‘zato’ in vhost ‘/’”,‘basic.consume’}

Hi Giovanni,

a queue is mentioned so I understand you mean an AMQP channel?

If so, server logs will contain the values used when creating a channel,
for instance

2014-04-11 09:09:49,795 - INFO - 3017:Dummy-118 -
zato.channel.amqp.create:22

  • cid:[K07BAT1BZHT0FJSZCP79F9MGN8C9], name:[zato.channel.amqp.create],
    SIO request:[{u’name’: u’My AMQP channel’,
    u’service’: u’zato.helpers.input-logger’, u’is_active’: True,
    u’data_format’: u’json’, u’queue’: u’My queue’, u’def_id’: 1,
    u’cluster_id’: 1, u’consumer_tag_prefix’: u’My prefix’}]

Please, look for ‘zato.channel.amqp.create’ and send the log entry here.

thanks a lot,

On 04/11/2014 08:59 AM, Giovanni Colapinto wrote:

If I try to create a connection to rabbitmq, I found the following error in
rabbit logs:

{amqp_error,not_found,“no queue ‘zato’ in vhost ‘/’”,‘basic.consume’}

Hi Giovanni,

a queue is mentioned so I understand you mean an AMQP channel?

If so, server logs will contain the values used when creating a channel,
for instance

2014-04-11 09:09:49,795 - INFO - 3017:Dummy-118 -
zato.channel.amqp.create:22

  • cid:[K07BAT1BZHT0FJSZCP79F9MGN8C9], name:[zato.channel.amqp.create],
    SIO request:[{u’name’: u’My AMQP channel’,
    u’service’: u’zato.helpers.input-logger’, u’is_active’: True,
    u’data_format’: u’json’, u’queue’: u’My queue’, u’def_id’: 1,
    u’cluster_id’: 1, u’consumer_tag_prefix’: u’My prefix’}]

Please, look for ‘zato.channel.amqp.create’ and send the log entry here.

thanks a lot,

Yes, I talk about amqp :slight_smile:

2014-04-11 09:27:09,995 - INFO - 3739:Dummy-109 - zato.service.invoke:22 -
cid:[K112768811607248550041293684646318572898], name:[zato.service.invoke],
SIO request:[{u’name’: u’zato.outgoing.amqp.create’, u’data_format’:
u’json’, u’payload’:
u’eyJkZWxpdmVyeV9tb2RlIjogIjIiLCAiaXNfYWN0aXZlIjogdHJ1ZSwgImFwcF9pZCI6ICJzZ=
W50\naW5lbC1vdXQiLCAiZGVmX2lkIjogIjIiLCAiY2x1c3Rlcl9pZCI6ICIxIiwgImNvbnRlbn=
RfdHlw\nZSI6ICJ0ZXh0XC94bWwiLCAiaWQiOiBudWxsLCAidXNlcl9pZCI6ICJndWVzdCIsICJ=
uYW1lIjog\nIlJhYmJpdE1RIENvbm4iLCAicHJpb3JpdHkiOiAiNSIsICJleHBpcmF0aW9uIjog=
IiIsICJjb250\nZW50X2VuY29kaW5nIjogInV0Zi04In0=3D\n’,
u’channel’: u’invoke’, u’async’: False, u’id’: None, u’transport’: None,
u’expiration’: 15}]
2014-04-11 09:27:09,996 - INFO - 3739:Dummy-109 -
zato.outgoing.amqp.create:22 -
cid:[K112768811607248550041293684646318572898],
name:[zato.outgoing.amqp.create], SIO request:[{u’user_id’: u’guest’,
u’name’: u’RabbitMQ Conn’, u’delivery_mode’: u’2’, u’is_active’: True,
u’app_id’: u’sentinel-out’, u’priority’: u’5’, u’def_id’: 2, u’cluster_id’:
1, u’content_encoding’: u’utf-8’, u’content_type’: u’text/xml’,
u’expiration’: u’’}]
2014-04-11 09:27:10,029 - INFO - 3739:Dummy-109 -
zato.outgoing.amqp.create:22 -
cid:[K112768811607248550041293684646318572898],
name:[zato.outgoing.amqp.create],
response:[{“zato_outgoing_amqp_create_response”: {“id”: 2, “name”:
“RabbitMQ Conn”}}]

Now it seems to work, but I need to recreate it.

Giovanni

On Fri, Apr 11, 2014 at 9:12 AM, Dariusz Suchojad dsuch@zato.io wrote:

On 04/11/2014 08:59 AM, Giovanni Colapinto wrote:

If I try to create a connection to rabbitmq, I found the following erro=
r
in

rabbit logs:

{amqp_error,not_found,“no queue ‘zato’ in vhost ‘/’”,‘basic.consume’}

Hi Giovanni,

a queue is mentioned so I understand you mean an AMQP channel?

If so, server logs will contain the values used when creating a channel,
for instance

2014-04-11 09:09:49,795 - INFO - 3017:Dummy-118 -
zato.channel.amqp.create:22

  • cid:[K07BAT1BZHT0FJSZCP79F9MGN8C9], name:[zato.channel.amqp.create],
    SIO request:[{u’name’: u’My AMQP channel’,
    u’service’: u’zato.helpers.input-logger’, u’is_active’: True,
    u’data_format’: u’json’, u’queue’: u’My queue’, u’def_id’: 1,
    u’cluster_id’: 1, u’consumer_tag_prefix’: u’My prefix’}]

Please, look for ‘zato.channel.amqp.create’ and send the log entry here.

thanks a lot,


Dariusz Suchojad

https://zato.io
ESB, SOA, APIs and cloud integrations in Python

–=20
www.syshell.net

On 04/11/2014 09:35 AM, Giovanni Colapinto wrote:

Yes, I talk about amqp :slight_smile:

Sure, but there are three types of AMQP objects:

  • connections
  • channels
  • outconns (outgoing connections)

The latter two re-use the former and I wasn’t sure which of these you
meant :slight_smile:

https://zato.io/docs/web-admin/conn-def/amqp.html
https://zato.io/docs/web-admin/channels/amqp.html
https://zato.io/docs/web-admin/outgoing/amqp.html

Now it seems to work, but I need to recreate it.

I’m glad it works and please post the relevant pieces of logs if it doesn’t.

As a side note, the name ‘zato’ is a reserved one.

https://zato.io/docs/progguide/service-dev.html#programming-conventions

And it really is possible for Zato in future to, say, delete anything
that begins with ‘zato’ after assuming it is an internal object during a
clean up process of some sort. This is just an example but the point is

  • name ‘zato’ must not be used by user code or configuration.

Thank you!!! :slight_smile:

On Fri, Apr 11, 2014 at 9:44 AM, Dariusz Suchojad dsuch@zato.io wrote:

On 04/11/2014 09:35 AM, Giovanni Colapinto wrote:

Yes, I talk about amqp :slight_smile:

Sure, but there are three types of AMQP objects:

  • connections
  • channels
  • outconns (outgoing connections)

The latter two re-use the former and I wasn’t sure which of these you
meant :slight_smile:

https://zato.io/docs/web-admin/conn-def/amqp.html
https://zato.io/docs/web-admin/channels/amqp.html
https://zato.io/docs/web-admin/outgoing/amqp.html

Now it seems to work, but I need to recreate it.

I’m glad it works and please post the relevant pieces of logs if it
doesn’t.

As a side note, the name ‘zato’ is a reserved one.

https://zato.io/docs/progguide/service-dev.html#programming-conventions

And it really is possible for Zato in future to, say, delete anything
that begins with ‘zato’ after assuming it is an internal object during a
clean up process of some sort. This is just an example but the point is

  • name ‘zato’ must not be used by user code or configuration.

Sorry, but I can’t understand whre is the error. I use this two lines to
send an amqp message:

On Fri, Apr 11, 2014 at 9:45 AM, Giovanni Colapinto <
giovanni.colapinto@gmail.com> wrote:

Thank you!!! :slight_smile:

On Fri, Apr 11, 2014 at 9:44 AM, Dariusz Suchojad dsuch@zato.io wrote:

On 04/11/2014 09:35 AM, Giovanni Colapinto wrote:

Yes, I talk about amqp :slight_smile:

Sure, but there are three types of AMQP objects:

  • connections
  • channels
  • outconns (outgoing connections)

The latter two re-use the former and I wasn’t sure which of these you
meant :slight_smile:

https://zato.io/docs/web-admin/conn-def/amqp.html
https://zato.io/docs/web-admin/channels/amqp.html
https://zato.io/docs/web-admin/outgoing/amqp.html

Now it seems to work, but I need to recreate it.

I’m glad it works and please post the relevant pieces of logs if it
doesn’t.

As a side note, the name ‘zato’ is a reserved one.

https://zato.io/docs/progguide/service-dev.html#programming-conventions

And it really is possible for Zato in future to, say, delete anything
that begins with ‘zato’ after assuming it is an internal object during a
clean up process of some sort. This is just an example but the point is

  • name ‘zato’ must not be used by user code or configuration.

Sorry for the previous mail, I sent it too early…

I can’t understand where is the error. I use this two lines to send an amqp
message:
properties_txt = {‘app_id’: ‘ESB’}
self.outgoing.amqp.send(msg=json.dumps(ret),
out_conn=‘SentinelOUT’, exchange=‘sentinel-out’,
routing_key=‘sentinel-out’, properties=properties_txt)

And zato gives me this error when I invoke the service:

{“zato_env”: {“details”: “Traceback (most recent call last):\n File
”/usr/local/zato-1.1/zato-server/src/zato/server/connection/http_soap/channel.py",
line 157, in dispatch\n self.simple_io_config, data_format,
path_info)\n File
"/usr/local/zato-1.1/zato-server/src/zato/server/connection/http_soap/channel.py",
line 275, in handle\n worker_store, cid, simple_io_config,
service_info=service_info, wsgi_environ=wsgi_environ)\n File
"/usr/local/zato-1.1/zato-server/src/zato/server/service/init.py",
line 588, in update_handle\n service.handle()\n File
"/var/zato/qs-1/server1/work/hot-deploy/current/zimbra-queues.py",
line 60, in handle\n self.outgoing.amqp.send(msg=json.dumps(ret),
out_conn=‘SentinelOUT’, exchange=‘sentinel-out’,
routing_key=‘sentinel-out’, properties=properties_txt)\nTypeError: send()
takes at least 5 arguments (5 given)\n", “result”: “ZATO_ERROR”, “cid”:
“K226482973262932694740964316089321345504”}

It seems it can’t handle properties parameter… (without it no zato error,
but even no message in rabbitmq)

Thank you

On Fri, Apr 11, 2014 at 11:27 AM, Giovanni Colapinto <
giovanni.colapinto@gmail.com> wrote:

Sorry, but I can’t understand whre is the error. I use this two lines to
send an amqp message:

On Fri, Apr 11, 2014 at 9:45 AM, Giovanni Colapinto <
giovanni.colapinto@gmail.com> wrote:

Thank you!!! :slight_smile:

On Fri, Apr 11, 2014 at 9:44 AM, Dariusz Suchojad dsuch@zato.io wrote:

On 04/11/2014 09:35 AM, Giovanni Colapinto wrote:

Yes, I talk about amqp :slight_smile:

Sure, but there are three types of AMQP objects:

  • connections
  • channels
  • outconns (outgoing connections)

The latter two re-use the former and I wasn’t sure which of these you
meant :slight_smile:

https://zato.io/docs/web-admin/conn-def/amqp.html
https://zato.io/docs/web-admin/channels/amqp.html
https://zato.io/docs/web-admin/outgoing/amqp.html

Now it seems to work, but I need to recreate it.

I’m glad it works and please post the relevant pieces of logs if it
doesn’t.

As a side note, the name ‘zato’ is a reserved one.

https://zato.io/docs/progguide/service-dev.html#programming-conventions

And it really is possible for Zato in future to, say, delete anything
that begins with ‘zato’ after assuming it is an internal object during a
clean up process of some sort. This is just an example but the point is

  • name ‘zato’ must not be used by user code or configuration.

On 04/11/2014 11:30 AM, Giovanni Colapinto wrote:

I can’t understand where is the error. I use this two lines to send an amqp
message:
properties_txt = {‘app_id’: ‘ESB’}
self.outgoing.amqp.send(msg=json.dumps(ret),
out_conn=‘SentinelOUT’, exchange=‘sentinel-out’,
routing_key=‘sentinel-out’, properties=properties_txt)

line 60, in handle\n self.outgoing.amqp.send(msg=json.dumps(ret),
out_conn=‘SentinelOUT’, exchange=‘sentinel-out’,
routing_key=‘sentinel-out’, properties=properties_txt)\nTypeError: send()
takes at least 5 arguments (5 given)\n", “result”: “ZATO_ERROR”, “cid”:
“K226482973262932694740964316089321345504”}

Ah, I get it. When you say ‘out_conn=’ it should have been ‘out_name=’.

Otherwise your ‘out_conn’ is treated as one of the **kwargs and
’out_name’ is never passed into the function at all.

Ok, but you need to update the documentation on the website :smiley:

Cheers

On Fri, Apr 11, 2014 at 3:17 PM, Dariusz Suchojad dsuch@zato.io wrote:

On 04/11/2014 11:30 AM, Giovanni Colapinto wrote:

I can’t understand where is the error. I use this two lines to send an
amqp
message:
properties_txt = {‘app_id’: ‘ESB’}
self.outgoing.amqp.send(msg=json.dumps(ret),
out_conn=‘SentinelOUT’, exchange=‘sentinel-out’,
routing_key=‘sentinel-out’, properties=properties_txt)

line 60, in handle\n self.outgoing.amqp.send(msg=json.dumps(ret),
out_conn=‘SentinelOUT’, exchange=‘sentinel-out’,
routing_key=‘sentinel-out’, properties=properties_txt)\nTypeError: send()
takes at least 5 arguments (5 given)\n", “result”: “ZATO_ERROR”, “cid”:
“K226482973262932694740964316089321345504”}

Ah, I get it. When you say ‘out_conn=’ it should have been ‘out_name=’.

Otherwise your ‘out_conn’ is treated as one of the **kwargs and
’out_name’ is never passed into the function at all.

On 04/11/2014 03:19 PM, Giovanni Colapinto wrote:

Ok, but you need to update the documentation on the website :smiley:

Thanks Giovanni!

https://github.com/zatosource/zato-docs/issues/8

I’ve never spotted it myself because I provide everything in a
positional manner, e.g.

self.outgoing.amqp.send(‘msg’, ‘MyConn’, ‘Exchange’ ‘route-key’,
{‘some’:‘property’})

thanks again,

I’m back again :slight_smile:

I send the message with this two lines:
properties_txt = {‘app_id’: ‘sentinel-out’}
self.outgoing.amqp.send(msg=json.dumps(ret), out_name=‘SentinelOUT’,
exchange=‘sentinel-out’, routing_key=‘sentinel-out’,
properties=properties_txt)

Nothing happens on rabbitmq. I try to sniff the connection and I discovered
that nothing is passed as routing_key (snapshoot in attachment). Have I
done something wrong?

Cheers

On Fri, Apr 11, 2014 at 3:25 PM, Dariusz Suchojad dsuch@zato.io wrote:

On 04/11/2014 03:19 PM, Giovanni Colapinto wrote:

Ok, but you need to update the documentation on the website :smiley:

Thanks Giovanni!

https://github.com/zatosource/zato-docs/issues/8

I’ve never spotted it myself because I provide everything in a
positional manner, e.g.

self.outgoing.amqp.send(‘msg’, ‘MyConn’, ‘Exchange’ ‘route-key’,
{‘some’:‘property’})

thanks again,


Dariusz Suchojad

https://zato.io
ESB, SOA, APIs and cloud integrations in Python

Sorry for the forward, but is only to know if you can help me, otherwise I
must find a workaround.

Thank you.

Giovanni


On 04/15/2014 10:36 AM, Giovanni Colapinto wrote:

Sorry for the forward, but is only to know if you can help me, otherwise I
must find a workaround.

Hi Giovanni,

I’m not sure if this is an old message or a new situation?

It’s a new situation always related to amqp. Do you prefer to start a new
thread?

On Tue, Apr 15, 2014 at 10:38 AM, Dariusz Suchojad dsuch@zato.io wrote:

On 04/15/2014 10:36 AM, Giovanni Colapinto wrote:

Sorry for the forward, but is only to know if you can help me, otherwise
I
must find a workaround.

Hi Giovanni,

I’m not sure if this is an old message or a new situation?

On 04/15/2014 10:42 AM, Giovanni Colapinto wrote:

It’s a new situation always related to amqp. Do you prefer to start a new
thread?

It’s ok, I just wasn’t sure what you meant because you didn’t add any
new code.

So to confirm it - the routing key is not visible under Wireshark. Can
you please add what Zato version you are using?

thanks a lot,

Yes, the routing key is not visible in wireshark and the message is not
delivery to consumers. Zato version is 1.1

Thank you

On Tue, Apr 15, 2014 at 10:46 AM, Dariusz Suchojad dsuch@zato.io wrote:

On 04/15/2014 10:42 AM, Giovanni Colapinto wrote:

It’s a new situation always related to amqp. Do you prefer to start a new
thread?

It’s ok, I just wasn’t sure what you meant because you didn’t add any
new code.

So to confirm it - the routing key is not visible under Wireshark. Can
you please add what Zato version you are using?

thanks a lot,


Dariusz Suchojad

https://zato.io
ESB, SOA, REST, APIs and cloud integrations in Python

On 04/15/2014 10:50 AM, Giovanni Colapinto wrote:

Yes, the routing key is not visible in wireshark and the message is not
delivery to consumers. Zato version is 1.1

This is the exact code I am testing it with:

from zato.server.service import Service

class MyService(Service):
def handle(self):

    properties_txt = {'app_id': 'ESB'}

    self.outgoing.amqp.send(
        msg='aaa',
        out_name='SentinelOUT', exchange='amq.direct',
        routing_key='aaa', properties=properties_txt)

and please check the attachment - the routing key is visible in Wireshark.

I’m using current git master so this perhaps explains it but I need to
ask before I set it up with 1.1 - you are 100% sure your code is
correct, aren’t you? As above?

thanks again,

On 04/15/2014 10:50 AM, Giovanni Colapinto wrote:

Yes, the routing key is not visible in wireshark and the message is not
delivery to consumers. Zato version is 1.1

Hi Giovanni,

can you please pull the latest hotfixes and try again?

Simply navigate to your Zato source directory and run ./hotfixman.sh
restarting servers afterwards.

There was a fix to AMQP released some time ago and it looks you don’t
have it applied.

thanks,

ok, I will try and I will let you know

as always, thank you :slight_smile:

On Tue, Apr 15, 2014 at 2:34 PM, Dariusz Suchojad dsuch@zato.io wrote:

On 04/15/2014 10:50 AM, Giovanni Colapinto wrote:

Yes, the routing key is not visible in wireshark and the message is not
delivery to consumers. Zato version is 1.1

Hi Giovanni,

can you please pull the latest hotfixes and try again?

Simply navigate to your Zato source directory and run ./hotfixman.sh
restarting servers afterwards.

There was a fix to AMQP released some time ago and it looks you don’t
have it applied.

thanks,


Dariusz Suchojad

https://zato.io
ESB, SOA, REST, APIs and cloud integrations in Python