diff options
| author | Jean-Sébastien Pédron <jean-sebastien.pedron@dumbbell.fr> | 2016-08-10 12:43:48 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2016-08-10 12:43:48 +0200 |
| commit | ccffb401112b54568dcf4884d9be666657e3cc29 (patch) | |
| tree | 471a5306ea2c47226f7ad8693f526a8e1ef08ce7 /scripts | |
| parent | ca4c0c011f963b4511da111261bb48bdd3dabad2 (diff) | |
| parent | 37d4fc789d89a1ff981bd8d771013014b4d05147 (diff) | |
| download | rabbitmq-server-git-ccffb401112b54568dcf4884d9be666657e3cc29.tar.gz | |
Merge pull request #892 from binarin/rabbitmq-server-890
Fix longname-mode on hosts without detectable FQDN
Diffstat (limited to 'scripts')
| -rwxr-xr-x | scripts/rabbitmq-server | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/scripts/rabbitmq-server b/scripts/rabbitmq-server index 74337311cd..c99022fcf6 100755 --- a/scripts/rabbitmq-server +++ b/scripts/rabbitmq-server @@ -62,6 +62,17 @@ RABBITMQ_EBIN_ROOT="${RABBITMQ_HOME}/ebin" set +e +# `net_kernel:start/1` will fail in `longnames` mode when erlang is +# unable to determine FQDN of a node (with a dot in it). But `erl` +# itself has some magic that still allow it to start when you +# explicitly specify host (a.la `erl -name test@localhost`). +# +# It's not possible to communicate with this node, unless it's a +# connection initiator. But as prelaunch IS an initiator, it doesn't +# matter what we actually put here. But `localhost` sounds good +# enough. +RABBITMQ_PRELAUNCH_NODENAME="rabbitmqprelaunch${$}@localhost" + # NOTIFY_SOCKET is needed here to prevent epmd from impersonating the # success of our startup sequence to systemd. NOTIFY_SOCKET= \ @@ -72,7 +83,7 @@ RABBITMQ_DIST_PORT=$RABBITMQ_DIST_PORT \ -noinput \ -hidden \ -s rabbit_prelaunch \ - ${RABBITMQ_NAME_TYPE} rabbitmqprelaunch$$ \ + ${RABBITMQ_NAME_TYPE} ${RABBITMQ_PRELAUNCH_NODENAME} \ -extra "${RABBITMQ_NODENAME}" PRELAUNCH_RESULT=$? |
