Commit Graph

334 Commits

Author SHA1 Message Date
Jakauppila f360ee47cc Add 'rabbitmq-env.bat' execution in rabbitmq-echopid.bat 2015-05-12 21:12:22 -05:00
Jean-Sébastien Pédron abc354dc34 Merge branch 'stable' 2015-04-30 11:16:32 +02:00
Jean-Sébastien Pédron 53af45bf9a rabbitmq-server: Add a way to send log messages to stdout
Now, by setting RABBITMQ_LOGS=-, regular log messages are written to
stdout. Likewise, RABBITMQ_SASL_LOGS=- sends sasl log messages to
stdout.

This is useful for Docker images.

Fixes #128.
2015-04-30 11:13:16 +02:00
Jean-Sébastien Pédron 548446be0b Merge branch 'stable' 2015-04-22 20:05:03 +02:00
Jean-Sébastien Pédron 1edba4a248 rabbitmq-env: Ignore user's RABBITMQ_PID_FILE if set by init script
The user shouldn't override the init script's RABBITMQ_PID_FILE value,
otherwise the init script erroneously reports failures to start or stop
the service.

Now, rabbitmq-env logs a warning if RABBITMQ_PID_FILE is already defined
in the environment (ie. by the init script) and in rabbitmq-env.conf.

Fixes #127.
2015-04-22 19:17:28 +02:00
Jean-Sébastien Pédron 666fdb0af9 rabbitmq-env: Remove trailing slash from configurable paths
This fixes at least one problem with $RABBITMQ_PID_FILE which, by
default, is set to:
    RABBITMQ_PID_FILE=${RABBITMQ_MNESIA_DIR}.pid

In this case, if $RABBITMQ_MNESIA_DIR ends with a trailing slash, the
PID file is a hidden file placed in the Mnesia directory. This prevents
auto-clustering from working and this is tricky to understand why.

Fixes #118.
2015-04-21 10:59:55 +02:00
Jean-Sébastien Pédron ff08f21b15 Merge branch 'stable' 2015-04-21 10:57:31 +02:00
Jean-Sébastien Pédron 69b9bef23b rabbitmq-env: Use "$path" in rmq_realpath(), not "$dir"
... which does not exit.
2015-04-21 10:55:19 +02:00
Jean-Sébastien Pédron 009cc24f45 Merge branch 'stable' 2015-04-21 09:54:19 +02:00
Jean-Sébastien Pédron d12654a320 rabbitmq-env: Check the Mnesia directory is not used for other purposes
If this is the case, log a warning to stderr.

Here is an example with the plugins expansion directory:
    WARNING: RABBITMQ_PLUGINS_EXPAND_DIR is located inside RABBITMQ_MNESIA_DIR
             => Auto-clustering will not work ('cluster_nodes' in rabbitmq.config)

And with the log directory:
    WARNING: RABBITMQ_LOG_BASE is equal to RABBITMQ_MNESIA_DIR
             RABBITMQ_LOGS is located inside RABBITMQ_MNESIA_DIR
             RABBITMQ_SASL_LOGS is located inside RABBITMQ_MNESIA_DIR
             => Auto-clustering will not work ('cluster_nodes' in rabbitmq.config)

Fixes #120.
2015-04-21 09:51:43 +02:00
Jean-Sébastien Pédron dc6c9b0275 rabbitmq-env: Prevent multiple load of the script
This doesn't happen today but it could be the case in the future, now
that the init scripts are sourcing it too.

References #88.
2015-04-08 11:52:50 +02:00
Jean-Sébastien Pédron 797ee7fa07 Init scripts: Honor RABBITMQ_LOG_BASE for {startup,shutdown}_* location
Before this change, they were written to /var/log/rabbitmq, no matter
the value of RABBITMQ_LOG_BASE.

In rabbitmq-env, allow the caller to set RABBITMQ_SCRIPTS_DIR to the
directory where rabbitmq-env and rabbitmq-default are located.

In both Fedora and Debian rabbitmq-server.init and
rabbitmq-script-wrapper, load rabbitmq-env and use RABBITMQ_LOG_BASE.
The default value is /var/log/rabbitmq, so the default behaviour remains
the same.

In Debian's rabbitmq-script-wrapper version, use RABBITMQ_LOG_BASE
instead of the hard-coded /var/log/rabbitmq.

Fixes #88.
2015-04-03 17:27:40 +02:00
Michael Klishin 484322f97f When ERLANG_HOME is not set, exit with code 1 2015-02-25 21:19:16 +03:00
Michael Klishin c25a0baecf merge stable into default 2015-02-11 14:32:27 +03:00
Michael Klishin 88b3a971b0 merge bug26144 into stable 2015-02-11 12:22:53 +03:00
Jean-Sebastien Pedron b33133fa00 stable to default 2015-01-29 17:09:06 +01:00
Jean-Sebastien Pedron 6e76906aa5 rabbitmq-env: Use "hostname -f", not "hostname --fqdn"
The latter is specific to net-tools' hostname(1), found on Linux
distributions.
2015-01-29 16:15:10 +01:00
Simon MacMullen 38e05cdfe0 stable to default 2015-01-29 13:04:12 +00:00
Alvaro Videla cc040e95d6 adds RABBITMQ_CTL_ERL_ARGS to rabbitmq-plugins 2015-01-28 14:03:17 +01:00
Simon MacMullen ab8e960715 Merge in default 2015-01-08 13:42:10 +00:00
Simon MacMullen 94c0fd22fb Don't halt execution if RABBITMQ_CTL_ERL_ARGS is set. 2014-11-26 16:45:25 +00:00
Alvaro Videla bb20b6bbd7 adds missing CLEAN_BOOT_FILE 2014-10-29 22:01:36 +01:00
Simon MacMullen f8121ae94c Not needed any more 2014-10-27 17:28:57 +00:00
Simon MacMullen 3b5475471a First pass at having ctl and plugins not start epmd. This can cause problems though if we are contacting a remote node, or removing a cluster node offline. 2014-10-23 12:55:48 +01:00
Simon MacMullen ff8aa6c424 Read the env file before figuring out USE_LONGNAME. 2014-10-22 11:26:18 +01:00
Simon MacMullen c33ba94384 Correct how to refer to environment variables. 2014-10-17 17:19:40 +01:00
Simon MacMullen 1780ff7927 Add RABBITMQ_USE_LONGNAME. Based on a patch from Marcos Diez but with fixes for the new way rabbitmqctl starts distribution, refactoring of common stuff into rabbitmq-env, not trimming the hostname, etc. 2014-10-17 14:40:39 +01:00
Simon MacMullen 12d7b079fd stable to default 2014-09-16 12:01:17 +01:00
Simon MacMullen 02888fca1d Make sure the server sees RABBITMQ_CONFIG_FILE and can thus log the config file location even if it's absent. 2014-09-16 11:56:20 +01:00
Simon MacMullen 98d6ac5ffd Oops, silence. 2014-07-11 14:18:47 +01:00
Simon MacMullen 67ff462c80 Start a dummy node first to ensure epmd is running. 2014-07-07 13:50:52 +01:00
Simon MacMullen 2547743c58 Remove these that were merged by accident; we do distribution by hand now. 2014-07-04 14:48:43 +01:00
Simon MacMullen 46bbaddcce Port script Mnesia dir changes from bug26192. Add rabbitmqctl force_boot. 2014-07-03 12:08:05 +01:00
Simon MacMullen 4538d0939a stable to default 2014-06-23 16:55:19 +01:00
Simon MacMullen 51080c0d3e More explanation. 2014-06-23 16:54:49 +01:00
Michael Klishin 28cfe22305 Don't use -e for a portion of rabbitmq-env that uses readlink
readlink exists with an error when its argument is not a symlink.
2014-06-23 18:41:59 +04:00
Michael Klishin 96fbaa5772 Accept SERVER_ADDITIONAL_ERL_ARGS from rabbitmq-env.conf 2014-06-22 15:41:41 +04:00
Michael Klishin a4bb6e9387 Make sure RABBITMQ_SERVER_ADDITIONAL_ERL_ARGS has effect on Windows 2014-06-20 12:13:32 +04:00
Michael Klishin 9447629717 Add RABBITMQ_SERVER_ADDITIONAL_ERL_ARGS to VM arguments 2014-06-20 12:00:40 +04:00
Simon MacMullen 2bbd5a7e86 stable to default 2014-06-18 16:05:00 +01:00
Simon MacMullen d5a2458053 Allow prelaunch to return error code 2 without failing. 2014-06-18 09:58:29 +01:00
Simon MacMullen a1b510bad7 Merge in default 2014-06-09 16:28:45 +01:00
Simon MacMullen 0b6055adde Ensure we don't fail if that file is missing. 2014-06-09 14:34:53 +01:00
Simon MacMullen 96c2d78b32 Use '-e' for all shell scripts. 2014-06-09 13:53:57 +01:00
Simon MacMullen 4ae397a5a1 Merge in default 2014-06-05 16:17:13 +01:00
Simon MacMullen a3b0fabedc Don't show misleading information in the Windows service case when the service has not been reinstalled. 2014-06-05 11:41:51 +01:00
Michael Klishin fc8065c864 Respect RABBITMQ_NODE_ONLY env variable on Windows
Originally contributed by Marek Stój:
https://github.com/rabbitmq/rabbitmq-server/pull/34
2014-04-28 02:49:24 +04:00
Tim Watson 7b22230f14 Merge default into bug24926 2014-03-18 20:25:11 +00:00
Simon MacMullen dc8ac0e5e6 Merge bug25722 (again) 2014-03-18 14:59:11 +00:00
Simon MacMullen ac3ebb1571 Don't export anything ever from this script, it gets inherited by any processes started by the broker - which breaks a bunch of our tests. 2014-03-18 14:58:00 +00:00