Used Zammad version: 2.5
Used Zammad installation source: DEB
Operating system: Debian 9.5
Browser + version: Google Chrome Version 67.0.3396.99 (Official Build) (64-bit)
Hello everyone. I just installed and configured Zammad 2.5 following this guide (https://docs.zammad.org/en/latest/install-debian.html )
And everything went well until I changed the database configuration from postgresql to mysql.
I use MariaDB in another server. I tested and I have access to it. From my zammad server I run “mysql -u USERNAME -p -h MARIADBSERVER ” and I can connect.
In my database.yml file I have:
production:
adapter: mysql2
database: ZAMMADDB
host: MARIADBSERVER
pool: 50
timeout: 5000
encoding: utf8
username: USERNAME
password: **************
In my /etc/nginx/sites-available/zammad.conf file I replaced localhost with my FQDN (helpdesk.test.lan)
And then as I said, as soon as I change my database configuration from postgresql to mysql I get this error in /var/log/nginx/zammad.error.log (192.168.2.4 is my desktop IP, from where I open the browser)
2018/07/23 13:33:32 [error] 22490#22490: *5 connect() failed (111: Connection refused) while connecting to upstream, client: 192.168.2.4, server: helpdesk.test.lan, request: “GET / HTTP/1.1”, upstream: “http://[::1]:3000/”, host: “helpdesk.test.lan”
2018/07/23 13:33:32 [error] 22490#22490: *5 connect() failed (111: Connection refused) while connecting to upstream, client: 192.168.2.4, server: helpdesk.test.lan, request: “GET / HTTP/1.1”, upstream: “http://127.0.0.1:3000/ ”, host: “helpdesk.test.lan”
Any idea what’s going on???
How can install version 2.4?
Expected behavior:
ustreams server are up and listening on port 3000 and 6042
Actual behavior:
502 Bad Gateway error in browser and the upstream servers are not listening
Steps to reproduce the behavior:
Install Zammad 2.5 and configure the database to use mysql instead of postgresql
Looks like your host is denying access to these ports. He tells you connection refused with upstream server @port 3000. Did you try a reboot on the machine? Could you please post your nginx-configuration?
The server is not even listening on that port unless I change my Database to Postgresql.
#
# this is the nginx config for zammad
#
upstream zammad-railsserver {
server localhost:3000;
}
upstream zammad-websocket {
server localhost:6042;
}
server {
listen 80;
# replace 'localhost' with your fqdn if you want to use zammad from remote
server_name helpdesk.test.lan;
root /opt/zammad/public;
access_log /var/log/nginx/zammad.access.log;
error_log /var/log/nginx/zammad.error.log;
client_max_body_size 50M;
location ~ ^/(assets/|robots.txt|humans.txt|favicon.ico) {
expires max;
}
location /ws {
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";
proxy_set_header CLIENT_IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_read_timeout 86400;
proxy_pass http://zammad-websocket;
}
location / {
proxy_set_header Host $http_host;
proxy_set_header CLIENT_IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_read_timeout 300;
proxy_pass http://zammad-railsserver;
gzip on;
gzip_types text/plain text/xml text/css image/svg+xml application/javascript application/x-javascript application/json application/xml;
gzip_proxied any;
}
}
What does the log file of zammad say? Is the service running or in failed state?
Maybe the logfile will give us a good hint on what is wrong.
When I change to mysql, the log says:
018/07/23 13:33:32 [error] 22490#22490: *5 connect() failed (111: Connection refused) while connecting to upstream, client: 192.168.2.4, server: helpdesk.test.lan, request: “GET / HTTP/1.1”, upstream: “http://[::1]:3000/”, host: “helpdesk.test.lan”
2018/07/23 13:33:32 [error] 22490#22490: *5 connect() failed (111: Connection refused) while connecting to upstream, client: 192.168.2.4, server: helpdesk.test.lan, request: “GET / HTTP/1.1”, upstream: “http://127.0.0.1:3000/”, host: “helpdesk.test.lan”
What log is that?
Port 3000 is zammad-application server that needs to run.
I’m sure zammad will output anything in it’s log file. Gotta be a reason why it’s not starting when it’s configured to MySQL
Well, that’s the only thing showing up in the /var/log/nginx/zammad.error.log I am using now PostgreSQL.
system
Closed
November 29, 2018, 6:24am
8
This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.