Config error : Transport option binary unknown or invalid

386 views
Skip to first unread message

shobhana...@gmail.com

unread,
Jun 14, 2017, 3:06:02 PM6/14/17
to rabbitmq-users
I have installed RabbitMQ 3.6.10 and enabled MQTT and Management plugins

My rabbitmq.config file looks like this :
[
 {rabbit,
  [
   {reverse_dns_lookups, true},
   {loopback_users, []},
   {vm_memory_high_watermark, 0.6},
   {vm_memory_high_watermark_paging_ratio, 0.75},
   {disk_free_limit, {mem_relative, 1.0}},
   {hipe_compile, true},
   {tcp_listen_options,
    [binary,
     {sndbuf, 1024},
     {recbuf, 1024},
     {buffer, 1024},
     {packet, raw},
     {reuseaddr, true},
     {backlog, 128},
     {nodelay, true},
     {linger, {true, 0}},
     {exit_on_close, false}
    ]
   }
  ]
 },
 {rabbitmq_mqtt,
  [
  ]
 }
].

I have created a cluster with 2 disk nodes. When I start rabbitmq app on one of the nodes, I see following errors in log file :
 =WARNING REPORT==== 15-Jun-2017::00:11:07 ===
Transport option binary unknown or invalid.

=WARNING REPORT==== 15-Jun-2017::00:11:07 ===
Transport option {packet,raw} unknown or invalid.

=WARNING REPORT==== 15-Jun-2017::00:11:07 ===
Transport option {reuseaddr,true} unknown or invalid.

What is wrong with my config file? When I Googled around for this error, I found a post which said "After Ranch (socket acceptor pool) has come into effect the following tcp listen options is no longer valid: binary, packet, reuseaddr."

Is this true? The above setting for binary was suggested in another RabbitMQ post to reduce the amount of memory used by binary when thousands of concurrent connections are established. What is the right way of configuring?

Michael Klishin

unread,
Jun 14, 2017, 3:53:40 PM6/14/17
to rabbitm...@googlegroups.com
`binary` is the default (and has been for as long as I remember, going back to 2009 or so).
So is `{packet, raw}`:
https://github.com/ninenines/ranch/blob/55c2a9d623454f372a15e99721a37093d8773b48/src/ranch_tcp.erl#L87

`binary` is likely a copy-paste from a doc example that targeted pre-Ranch versions. It has nothing to do with connection
memory consumption, to which TCP buffer size is the largest contributor.

1024 is a really small buffer size, by the way, and it will limit your throughput, as the docs [1] mention.

[1] has a section about tuning for a large number of concurrent connections.



--
You received this message because you are subscribed to the Google Groups "rabbitmq-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rabbitmq-users+unsubscribe@googlegroups.com.
To post to this group, send email to rabbitmq-users@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
MK

Staff Software Engineer, Pivotal/RabbitMQ

Shobhana Sriram

unread,
Jun 15, 2017, 2:28:55 PM6/15/17
to rabbitmq-users
Thanks MK; I checked the link and changed my config file to :

[
 {rabbit,
  [
   {reverse_dns_lookups, true},
   {loopback_users, []},
   {vm_memory_high_watermark, 0.6},
   {vm_memory_high_watermark_paging_ratio, 0.75},
   {disk_free_limit, {mem_relative, 1.0}},
   {tcp_listen_options,
    [{backlog,       8192},
     {nodelay,       true},
     {linger,        {true,0}},
     {sndbuf, 32768},
     {recbuf, 32768},
     {exit_on_close, false}
    ]
   },
   {handshake_timeout, 20000}
  ]
 }
].

Now that warning is gone. However I see another issue. As per [1], to increase the max number of files kernel will allocate, I set fs.file-max = 500000 in /etc/sysctl.conf. I also added some more kernel level configurations :

fs.file-max = 500000
net.ipv4.tcp_fin_timeout = 10
net.core.somaxconn = 8192
net.ipv4.tcp_max_syn_backlog = 8192

But in log file, I see that the file handles are still limited to 924 only. I have also edited /etc/security/limits.conf to include the following :

*         hard    nofile      500000
*         soft    nofile      500000
root      hard    nofile      500000
root      soft    nofile      500000

Log file entry :
=INFO REPORT==== 15-Jun-2017::23:50:36 ===
Limiting to approx 924 file handles (829 sockets)

How do I increase the file handles/sockets limit for RabbitMq?
To unsubscribe from this group and stop receiving emails from it, send an email to rabbitmq-user...@googlegroups.com.
To post to this group, send email to rabbitm...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Michael Klishin

unread,
Jun 15, 2017, 2:53:07 PM6/15/17
to rabbitm...@googlegroups.com
It's not any different from other OS processes. There's a section on Open File Handle limits

Kernel limit changes require process (RabbitMQ node) restart, sysctl.conf changes require
a reload with

sudo sysctl -p /etc/sysctl.conf

or a reboot.

To unsubscribe from this group and stop receiving emails from it, send an email to rabbitmq-users+unsubscribe@googlegroups.com.
To post to this group, send email to rabbitmq-users@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

shobhana...@gmail.com

unread,
Jun 19, 2017, 6:13:21 AM6/19/17
to rabbitmq-users
I had not realised mine was a systemd distribution; Once I configured in /etc/systemd/system/rabbitmq-server.service.d/limits.conf, the value was considered.
Thanks MK
Reply all
Reply to author
Forward
0 new messages