Open DocCyblade opened 1 year ago
Confirm the ISO install WORKs from fresh install and no changes, no sec update or apt upgrade.
So it seems the issue is when you change the name of the host it breaks
After some poking around I am going to assume that the host name "mayan-edms" is used somewhere within the config, and changing the name will need to change those references as well. Once I find them, I will post them here. May need to patch the change host name script in confconsole to also update the other places once found.
More digging, rabbitmq looks like the issue, still digging through the docs
So the issue I found was, when you change the name RabbitMQ using the host name to create the database files. This would invalidate the mayan user and vhost that was created and celery has a fit cause it can not connect.
https://www.rabbitmq.com/clustering.html#issues-hostname
Notes for my self RabbitMQ data: /var/lib/rabbitmq/mnesia
Working on a workflow to be able to re-name the host, will post when I finish
To rename the Mayan EDMS server:
You will need to know the RabbitMQ password that is being used, you can find that in the config file:
nano /opt/mayan-edms/media/config.yml
# Inside /opt/mayan-edms/media/config.yml
..
CELERY_BROKER_URL: amqp://mayan:PASSWORD_WILL_BE_HERE@127.0.0.1:5672/mayan
..
Stop the Mayan EDMS
supervisorctl stop all
Stop Rabbit service
systemctl stop rabbitmq-server.service
run confconsole and change the hostname, do not restart network
Edit RabbitMQ config, change the
nano /etc/rabbitmq/rabbitmq-env.conf
# in file /etc/rabbitmq/rabbitmq-env.conf
..
NODENAME=mayan@custom-server-name-here
..
Start RabbitMQ
systemctl start rabbitmq-server.service
Stop RabbitMQ node and reset data
rabbitmqctl stop_app
rabbitmqctl reset
Restart node
rabbitmqctl start_app
Add user
rabbitmqctl add_user mayan YOUR_PASSWORD_FROM_ENV_FILE
Add vhost
rabbitmqctl add_vhost mayan
Add permissions
rabbitmqctl set_permissions -p mayan mayan ".*" ".*" ".*"
Reboot the server and check that all is well
Thanks tons mate. Good find and nice info. It looks like we should address this in confconsole (in the change hostname plugin). I suggest that we try to make it generic so any other apps that end up using RabbitMQ automatically get the workaround. I don't think that there are any at this point, but may as well do it "proper".
I agree confconsole extension for Mayan to tweak the settings. However one for RabbbetMQ may be more in-depth as it could be like in this case here ver specific to the app at hand. I will research RabbitMQ and see if there is a better way renaming the server, in this way it may be less hacky
Would a potential temporary fix be to include some of this documentation in the initial guided install?
On a new install from ISO, with sec updates installed and apt upgrade, once you change the host name within confconsole, things break