Try the fastest and simplest way to install ONLYOFFICE

[Document Server] External RabbitMQ

Tech support for Enterprise Version

[Document Server] External RabbitMQ

Postby dsi-lille » Thu Feb 02, 2017 3:41 pm

Hi,

i want to use an external RabbitMQ server on my document server.

Following the documentation, i set those environnements variables on document server startup :

Code: Select all
RABBITMQ_SERVER_HOST: The IP address or the name of the host where the RabbitMQ server is running.
RABBITMQ_SERVER_USER: The RabbitMQ server user name.
RABBITMQ_SERVER_PASS: The password set for the RabbitMQ account.

But it's not working and i have this error :

Code: Select all
[2017-02-02 15:02:31.914] [ERROR] nodeJS - [AMQPE] Error: Handshake terminated by server: 403 (ACCESS-REFUSED) with message "ACCESS_REFUSED - Login was refused using authentication mechanism PLAIN. For details see the broker logfile."
    at afterStartOk (/var/www/onlyoffice/documentserver/server/Common/node_modules/amqplib/lib/connection.js:218:12)

After some investigagtion : even if RABBITMQ_SERVER_USER and RABBITMQ_SERVER_PASS are set, Document server are not using it.
Document server use the default credential from RabbitMQ : guest

I take look a the code and this is what i found :
The nodejs library used for connecting to a RabbitMQ is amqplib (http://www.squaremobius.net/amqp.node/channel_api.html)
In rabbitMQCore.js file, all the parameters (login, password, timeout...) used to establish a connection are stored in an array (connetOptions).
But referring to the documentation of the library (http://www.squaremobius.net/amqp.node/c ... ml#connect), the login / password have to be stored in the URI.
Something like that :
amqp://guest:guest@localhost:5672

If there is no login/password in the URI, the nodejs library use guest/guest as login and password.

Am i correct ?
Can you fix this ?

Thanks a lot,
Yoann
dsi-lille
 
Posts: 111
Joined: Mon Jul 11, 2016 1:47 pm

Re: [Document Server] External RabbitMQ

Postby Maxim » Fri Feb 03, 2017 12:39 pm

Hello Yoann!
Thank you for your error notification! We will fix it next release (4.3) for sure!
Try to use login and password like username:password@host for RABBITMQ_SERVER_HOST
general format for RABBITMQ_SERVER_HOST will be [username:password@]host[:port][vhost]
Maxim
 
Posts: 1072
Joined: Tue Oct 11, 2016 2:34 pm

Re: [Document Server] External RabbitMQ

Postby dsi-lille » Mon Feb 27, 2017 1:12 pm

Hello Maxim,

just had a little time to test it.
But this doesn't work, the document-server container doesn't start completely.
It's stuck with this error message :

Code: Select all
nc: getaddrinfo: Name or service not known
Waiting for connection to the user:passwd@host host on port 5672


The problem came from run-document-server.sh script.

the function below can't work with a hostname format like this [username:password@]host[:port][vhost] :

Code: Select all
waiting_for_connection(){
  until nc -z -w 3 "$1" "$2"; do
    >&2 echo "Waiting for connection to the $1 host on port $2"
    sleep 1
  done
}


Thanks for your help,
Yoann
dsi-lille
 
Posts: 111
Joined: Mon Jul 11, 2016 1:47 pm

Re: [Document Server] External RabbitMQ

Postby Maxim » Mon Mar 13, 2017 8:33 am

Thank you for your info!
Maxim
 
Posts: 1072
Joined: Tue Oct 11, 2016 2:34 pm


Return to Enterprise Version

Who is online

Users browsing this forum: No registered users and 1 guest

cron