Mac OS X seems to mix IPv4 and IPv6 for the same connection: one side
can have an IPv4 address while the other side has an IPv6 address.
Furthermore, it uses ::ffff:7f00:1 as the localhost IPv6 address instead
of ::1.
... instead of just the number of nodes.
While here, keep the initial node name on the NodeConfig and set
`RABBITMQ_NODENAME_FOR_PATHS` when calling make(1). This allows a node
to be renamed.
The new properties are:
o rmq_nodes_count; now it only has the number of nodes.
o rmq_nodes_clustered to indicate if those nodes should be
clustered.
The default value of rmq_nodes_clustered is true, unlike the old
combined property.
o Simplify many function names.
o Unify functions taking a node name or index. Now the same function
(eg. rpc()) takes a node name or index interchangeably.
o Rewrite command execution: it now takes a list of arguments instead
of a command line to parse (and thus escape if needed).
o The node name is stored under the key `nodename`, instead of
`rmq_nodename`. The prefix is not needed because the key appears
under the `rmq_nodes` node.
o Provide a make() function to wrap execution of make(1).
... to rabbit_ct_client_helpers. This fixes a build breakage as well as
remove the inappropriate dependency to rabbitmq-client-client in
rabbitmq-common.
By default, only a single RabbitMQ node is started.
One can start several nodes by adding the following key in the
configuration:
{rmq_nodes_count, {3, Clustered}}
`Clustered` is a boolean to indicate if those nodes should be clustered
or not.
Recent version of Windows, Linux and FreeBSD use this IANA range (or
its subset) - according to
https://en.wikipedia.org/wiki/Ephemeral_port
There are several reasons for this change:
- SELinux could prevent opening of non-ephemeral port without explicit
declaration - that's why redhat package already does patching of
this value.
- IPv6 testing process can interfere with startup of some legitimate
app which doesn't expect that something else will be listening on
that port. While it may sound as an unlikely event, crashes due to
improper usage of ephemeral ports in other packages constantly
happen on our CI systems.
This needs cooperation from the testsuite.
This should help with inactivity timeouts in Travis CI & friends.
References rabbitmq/rabbitmq-server#725.
[#116526487]
Before this patch, concurrent calls to code_version for the same module
would lead to one call succeeding and the other calls getting an
exception because the code server complains about a non-purged copy.
Now:
1. We acquire a lock for the given module name
2. We check the filename of the already loaded module to replace: if
it matches the fake filename used by the reload, it means the module
was replaced in a concurrent call. The next step is skipped.
3. We reload the module.
4. We release the lock.
Fixes#73.
Authentication in AMQP 0-9-1 is a two step process:
* Authentication
* connection.open
Vhost is selected at the 2nd step, so in authentication success
events we don't have any information about the vhost. It is emitted,
however, as part of a "connection created" event immediately after.
Fixes https://github.com/rabbitmq/rabbitmq-event-exchange/issues/13.
It makes no sense to concatenate information about several consumers
into single proplist.
`rabbit_amqqueue:consumers_all/1` is already doing `lists:append/1`, so
it is already capable of handling zero or more consumers reported.
And for `rabbitmqctl list_consumers` we need to support printing
lists-of-lists, for the same purpose of reporting zero or more consumers.
Another part for https://github.com/rabbitmq/rabbitmq-server/issues/701
Squashed commit of the following:
commit 0843d71dadc6f717d94dac90985587433c849da1
Author: Daniil Fedotov <dfedotov@pivotal.io>
Date: Wed Mar 16 15:05:26 2016 +0000
Set alarmes when connection is opened
commit 67f34835023f5182c0836c1072e1026d177299f6
Author: Michael Klishin <mklishin@pivotal.io>
Date: Wed Mar 16 14:06:23 2016 +0000
Emit connection state as 'blocking' before we see a publish
commit 0fc1d16b05ecad220c4c34b8867576cea967de47
Author: Michael Klishin <mklishin@pivotal.io>
Date: Wed Mar 16 11:24:22 2016 +0000
Reset throttle state when onblocking; make sure we not block consumers
commit 327dfd2d2ac97b760102b49b61306b01e041f512
Author: Michael Klishin <mklishin@pivotal.io>
Date: Mon Mar 14 17:17:37 2016 +0000
Report connection state as "in flow" again
if we are currently blocked by flow control or were blocked
in the last 5s
commit 505000136e699af3e5b813fbf850637c187786d1
Author: Michael Klishin <mklishin@pivotal.io>
Date: Mon Mar 14 16:52:55 2016 +0000
Continued refactoring, per discussion with @hairyhum
commit 512bb3a3102de08319727a465cd996693978ead8
Author: Michael Klishin <mklishin@pivotal.io>
Date: Mon Mar 14 15:32:38 2016 +0000
Remove things that are not intended for this branch
commit 6ee5fdff37a9b24ecdb01f7a28c29a2c5147c619
Author: Michael Klishin <mklishin@pivotal.io>
Date: Mon Mar 14 15:26:19 2016 +0000
can_block => should_block
commit f10308449a0cdc580b0798c3923664fdd14045c8
Author: Michael Klishin <mklishin@pivotal.io>
Date: Mon Mar 14 15:20:10 2016 +0000
Docs
commit 46b4d4256304ad5a4a91d7a27717723602411f4d
Author: Michael Klishin <mklishin@pivotal.io>
Date: Mon Mar 14 15:15:06 2016 +0000
Docs
commit 30111a6991716d51ed126f26deebf4a072ddb782
Merge: 457eb87 8a0e105
Author: Michael Klishin <mklishin@pivotal.io>
Date: Fri Mar 11 23:58:29 2016 +0300
Merge branch 'master' into rabbitmq-common-reader-state
commit 457eb875c5a837fb9fdc3dc669537183cb559897
Author: Daniil Fedotov <dfedotov@pivotal.io>
Date: Mon Mar 7 17:46:46 2016 +0000
Beter names for blocking params
commit 1d85ed27382fbb171528cc0607b05ddb410b1081
Author: Daniil Fedotov <dfedotov@pivotal.io>
Date: Tue Mar 1 18:29:21 2016 +0000
Blocked message formatting
commit 8eede1a8c20c8475007ab336689b810fd1f50302
Author: Daniil Fedotov <dfedotov@pivotal.io>
Date: Tue Mar 1 18:00:06 2016 +0000
correct api
commit 9bd961fec0327945e73eda72ba0c693eea88cbfb
Author: Daniil Fedotov <dfedotov@pivotal.io>
Date: Tue Mar 1 13:14:38 2016 +0000
Fix throttle state
commit 650ad3224bbc96b26cbaea4c46f7beb41bdc4630
Author: Daniil Fedotov <dfedotov@pivotal.io>
Date: Fri Feb 26 17:45:28 2016 +0000
Extended throttle. Removed blocking state
commit dc928f1325699ebb1e1403435fb245bb8a3b8967
Author: Daniil Fedotov <dfedotov@pivotal.io>
Date: Fri Feb 26 13:03:16 2016 +0000
rabbit_reader state refactoring
...of connection (flow control) state.
This makes it much easier to reason about flow control
state when looking at the management UI or monitoring tools
that poll HTTP API.
Now that rabbitmq/rabbitmq-management#41 is merged, there are
few arguments against always emitting stats.
Fixes#679.
Opening several ports for single fd is considered undefined behaviour in
erlang. It's safe to replace this whole function with `io:format`.
Because writing to standard_error with io:format is synchronous - after
this call has returned data was definitely sent to the port. And
`erlang:halt/` guarantees that this data will be flushed afterwards.
Tested on windows/linux with R16B03 and 18.X.
Closes#53 for `stable`
Opening several ports for single fd is considered undefined behaviour in
erlang. It's safe to replace this whole function with `io:format` when
erlang 17 or later is used. Because writing to standard_error with
io:format is synchronous - after this call has returned data was
definitely sent to the port. And `erlang:halt/` guarantees that this
data will be flushed afterwards.
`rabbit_channel:handle_method` for `queue.declare` could go into
infinite loop, when it tries do define a queue which got somehow
corrupted. This fix at least will help with symptoms of this corruption
- channel will quickly become unstuck.
Loop happens due to somewhat special handling of `not_found` in
'queue.declare' - it is treated not as an error here, but as a
permission to proceed with queue creation. As the base case of recursion
in `rabbit_amqqueue:with/4` is actuallly about some unrecoverable error,
it makes sense to always return `absent` error here. It will still
result in `not_found` error for clients, but internally it'll be handled
correctly.
rabbitmq-build.mk centralizes common compiler options for all RabbitMQ
components. Currently, it includes options specific to Lager:
o It enables lager_transform parse_transform module.
o It lists all our specific extra sinks
rabbit_log is the default sink we use for messages logged using
rabbit_log:<level>().
The other sinks correspond to the previous categories we supported. To
use those sinks, one needs to log messages using eg.:
rabbit_channel:info("Message")
lager_forwarder_backend forwards messages from one sink to another. This
allows RabbitMQ to use a single file to for several sinks:
lager_event (default sink) --> lager_file_backend --> "rabbit.log"
^
|
+------------------------+---+--+
| | |
rabbit_log_lager_event --+ | |
rabbit_channel_lager_event --+ |
rabbit_connection_lager_event --+
rabbit_channel.erl and rabbit_reader.erl are modified to use the new
API.
References rabbitmq/rabbitmq-server#94.
BEFORE: negotiated frame_max = 1024 is lower than the minimum allowed value (131072)
AFTER: negotiated frame_max = 1024 is lower than the minimum allowed value (4096)
Fixes https://github.com/rabbitmq/rabbitmq-server/issues/384 in the only
possible (portable) way - heartbeat sender detects dead socket during
normal operation and notifies rabbit_reader about this fact. This is
especially good given the recent decrease of default heartbeat timeout
to 60 seconds.
This way dead socket will be detected at most in 2 heartbeat
timeouts (as the first write to dropped socket will actually succeed).
Other probable fixes are non-portable or probably not worth it:
- Some unix versions allow to get a TCP connection state using
getsockopt, but there is no such option for Windows.
- 'netstat' output could be parsed periodically, but I'm not sure that
the overhead is comparable with a problem we are trying to solve.
These were removed by mistake when switching to Ranch.
The file_cache_handler used to be the acceptor doing the obtaining
(before even having an actual socket accepted), then transferring
the ownership to the new process. This has changed a little: now
the reader process claims the socket directly, saving one step.
The buffer tuning is now performed by the reader because Ranch does
not allow operations right after accepting. I have taken a note of
this and will improve this behavior with a future Ranch release.
Looks like rabbit_mnesia:is_process_alive/1 check mentioned in comments
there is not sufficient - there was a rabbitmq instance that spent more
than 2 days in this loop.
This type is defined in ssl_internal.hrl but ssl_api.hrl uses it.
ssl_api.hrl nor rabbit_net.hrl include ssl_internal.hrl, therefore the
build fails.
So if rabbitmq-common is built with up-to but excluding Erlang 17.0
(erts 6.0), we declare this type in rabbit_net.erl.
Spec states that demonitor/2 should always return #state{}, but it
wasn't the case when pid wasn't found in #state.dict. This made API
unsafe to use, as it could lead to some other process storing incorrect
data as a pmon state.