rabbitmq / rabbitmq-server

Open source RabbitMQ: core server and tier 1 (built-in) plugins
https://www.rabbitmq.com/
Other
12.12k stars 3.9k forks source link

Difference in configuration file detection between rabbitmq-server.bat and rabbitmq-service.bat #1645

Open lukebakken opened 6 years ago

lukebakken commented 6 years ago

[159157000]

To reproduce:

The reason is that this code is slightly different than this code.

When you install the Windows service, the presence of rabbitmq.conf is NOT checked and just assumed to be present, meaning that advanced.config will be added to the argument list for erl.exe when erlsrv.exe is started via the Windows Service Manager. When you run from the shell via rabbitmq-server.bat, advanced.config will only be used if the .conf-style file is also present. This caused quite a bit of confusion in a recent support case.

hairyhum commented 6 years ago

As I recall, this was added on purpose, because the service.bat script is executed on install, while the server.bat script is executed on server start. So we can't assume that rabbitmq.conf is there, because installation process does not create it. Considering previous questions from users I start to lean towards no file check solution by default (like with service.bat). This will allow users to create an advanced.config file only if they want and make it a bit more consistent. This also allows us to stop using rabbitmq.config filename, which is too similar to rabbitmq.conf. Of course we will have to handle and log the fact that the file is not there.