Hello,
Summary
On my newly installed server the mattermost service does not start.
http access is currently sufficient. I will do certificates later.
Steps to reproduce
- Ubuntu server 20.04.2 LTS
- Apache 2.4.41
- PHP 7.4.3 → http://gwmm1.vss.kapper.net/phpinf.php
- MySQL Ver 8.0.23-0ubuntu0.20.04.1 for Linux on x86_64 ((Ubuntu))
- Install guide: Redirect
Expected behavior
- Start of mattermost service
- Mattermost in my browser instead of /var/www/index.html.
Observed behavior
…/opt# systemctl start mattermost.service
Job for mattermost.service failed because the control process exited with error code.
See “systemctl status mattermost.service” and “journalctl -xe” for details.
::/opt# cat /opt/mattermost/config/config.json | grep “SiteURL”
“SiteURL”: “http://gwmm1.vss.kapper.net”,
…/opt# curl localhost:8065
curl: (7) Failed to connect to localhost port 8065: Connection refused
Content of my /lib/systemd/system/mattermost.service:
[Unit]
Description=Mattermost
After=network.target
After=mysql.service
BindsTo=mysql.service[Service]
Type=notify
ExecStart=/opt/mattermost/bin/mattermost
TimeoutStartSec=3600
Restart=always
RestartSec=10
WorkingDirectory=/opt/mattermost
User=mattermost
Group=mattermost
LimitNOFILE=49152[Install]
WantedBy=mysql.service
Content of my /etc/apache2/sites-available/mattermost.conf
> <VirtualHost :80>
> # If you’re not using a subdomain you may need to set a ServerAlias to:
> # ServerAlias www.mydomain.com
> ServerName gwmm1.vss.kapper.net
> ServerAdmin webmaster@localhost
> ProxyPreserveHost On
>
> # Set web sockets
> RewriteEngine On
> RewriteCond %{REQUEST_URI} /api/v[0-9]+/(users/)?websocket [NC,OR]
> RewriteCond %{HTTP:UPGRADE} ^WebSocket$ [NC,OR]
> RewriteCond %{HTTP:CONNECTION} ^Upgrade$ [NC]
> RewriteRule . ws://127.0.0.1:8065%{REQUEST_URI} [P,QSA,L]
>
>
> Require all granted
> ProxyPass http://127.0.0.1:8065/
> ProxyPassReverse http://127.0.0.1:8065/
> ProxyPassReverseCookieDomain 127.0.0.1 gwmm1.vss.kapper.net
>
>
>
Last 50 lines of journalctl -xe:
–
– The job identifier is 1837 and the job result is failed.
Apr 29 10:19:06 gwmm1 sshd[1316]: Connection closed by authenticating user root 119.2.51.138 port 62646 [preauth]
Apr 29 10:19:09 gwmm1 systemd[1]: mattermost.service: Scheduled restart job, restart counter is at 28.
– Subject: Automatic restarting of a unit has been scheduled
– Defined-By: systemd
– Support: Enterprise open source support | Ubuntu– Automatic restarting of the unit mattermost.service has been scheduled, as the result for
– the configured Restart= setting for the unit.
Apr 29 10:19:09 gwmm1 systemd[1]: Stopped Mattermost.
– Subject: A stop job for unit mattermost.service has finished
– Defined-By: systemd
– Support: Enterprise open source support | Ubuntu– A stop job for unit mattermost.service has finished.
– The job identifier is 1889 and the job result is done.
Apr 29 10:19:09 gwmm1 systemd[1]: Starting Mattermost…
– Subject: A start job for unit mattermost.service has begun execution
– Defined-By: systemd
– Support: Enterprise open source support | Ubuntu– A start job for unit mattermost.service has begun execution.
– The job identifier is 1889.
Apr 29 10:19:09 gwmm1 mattermost[1318]: {“level”:“info”,“ts”:1619691549.439991,“caller”:“app/server.go:225”,“msg”:“Server is initializing…”}
Apr 29 10:19:09 gwmm1 mattermost[1318]: {“level”:“info”,“ts”:1619691549.4408529,“caller”:“app/web_hub.go:83”,“msg”:“Starting websocket hubs”,“number_of_hubs”:2}
Apr 29 10:19:09 gwmm1 mattermost[1318]: {“level”:“info”,“ts”:1619691549.442028,“caller”:“utils/i18n.go:90”,“msg”:“Loaded system translations”,“for locale”:“en”,“from locale”:“/opt/mattermost/i18n/en.json”}
Apr 29 10:19:09 gwmm1 mattermost[1318]: {“level”:“info”,“ts”:1619691549.453072,“caller”:“sqlstore/supplier.go:246”,“msg”:“Pinging SQL”,“database”:“master”}
Apr 29 10:19:09 gwmm1 mattermost[1318]: {“level”:“error”,“ts”:1619691549.4536614,“caller”:“sqlstore/supplier.go:258”,“msg”:“Failed to ping DB”,“error”:“dial tcp: lookup : no such host”,“retrying in seconds”:10}
Apr 29 10:19:16 gwmm1 sshd[1324]: Connection closed by authenticating user root 119.2.51.138 port 63814 [preauth]
Apr 29 10:19:19 gwmm1 mattermost[1318]: {“level”:“info”,“ts”:1619691559.453942,“caller”:“sqlstore/supplier.go:246”,“msg”:“Pinging SQL”,“database”:“master”}
Apr 29 10:19:19 gwmm1 mattermost[1318]: {“level”:“error”,“ts”:1619691559.4541655,“caller”:“sqlstore/supplier.go:258”,“msg”:“Failed to ping DB”,“error”:“dial tcp: lookup : no such host”,“retrying in seconds”:10}
Apr 29 10:19:26 gwmm1 sshd[1326]: Connection closed by authenticating user root 119.2.51.138 port 65150 [preauth]
Apr 29 10:19:29 gwmm1 mattermost[1318]: {“level”:“info”,“ts”:1619691569.4542823,“caller”:“sqlstore/supplier.go:246”,“msg”:“Pinging SQL”,“database”:“master”}
Apr 29 10:19:29 gwmm1 mattermost[1318]: {“level”:“error”,“ts”:1619691569.4544418,“caller”:“sqlstore/supplier.go:258”,“msg”:“Failed to ping DB”,“error”:“dial tcp: lookup : no such host”,“retrying in seconds”:10}
Apr 29 10:19:34 gwmm1 sshd[1328]: Connection closed by authenticating user root 119.2.51.138 port 49965 [preauth]
Apr 29 10:19:39 gwmm1 mattermost[1318]: {“level”:“info”,“ts”:1619691579.4544938,“caller”:“sqlstore/supplier.go:246”,“msg”:“Pinging SQL”,“database”:“master”}
Apr 29 10:19:39 gwmm1 mattermost[1318]: {“level”:“error”,“ts”:1619691579.4546628,“caller”:“sqlstore/supplier.go:258”,“msg”:“Failed to ping DB”,“error”:“dial tcp: lookup : no such host”,“retrying in seconds”:10}
Apr 29 10:19:42 gwmm1 sshd[1330]: Connection closed by authenticating user root 119.2.51.138 port 50966 [preauth]
Apr 29 10:19:49 gwmm1 mattermost[1318]: {“level”:“info”,“ts”:1619691589.4547691,“caller”:“sqlstore/supplier.go:246”,“msg”:“Pinging SQL”,“database”:“master”}
Apr 29 10:19:49 gwmm1 mattermost[1318]: {“level”:“error”,“ts”:1619691589.4549682,“caller”:“sqlstore/supplier.go:258”,“msg”:“Failed to ping DB”,“error”:“dial tcp: lookup : no such host”,“retrying in seconds”:10}
Apr 29 10:19:52 gwmm1 sshd[1332]: Connection closed by authenticating user root 119.2.51.138 port 52128 [preauth]
Apr 29 10:19:59 gwmm1 mattermost[1318]: {“level”:“info”,“ts”:1619691599.4550793,“caller”:“sqlstore/supplier.go:246”,“msg”:“Pinging SQL”,“database”:“master”}
Apr 29 10:19:59 gwmm1 mattermost[1318]: {“level”:“error”,“ts”:1619691599.455261,“caller”:“sqlstore/supplier.go:258”,“msg”:“Failed to ping DB”,“error”:“dial tcp: lookup : no such host”,“retrying in seconds”:10}
Apr 29 10:19:59 gwmm1 sshd[1334]: Connection closed by authenticating user root 119.2.51.138 port 53303 [preauth]
Apr 29 10:20:07 gwmm1 sshd[1340]: Connection closed by authenticating user root 119.2.51.138 port 54280 [preauth]
Apr 29 10:20:09 gwmm1 mattermost[1318]: {“level”:“info”,“ts”:1619691609.4553387,“caller”:“sqlstore/supplier.go:246”,“msg”:“Pinging SQL”,“database”:“master”}
Apr 29 10:20:09 gwmm1 mattermost[1318]: {“level”:“error”,“ts”:1619691609.4555233,“caller”:“sqlstore/supplier.go:258”,“msg”:“Failed to ping DB”,“error”:“dial tcp: lookup : no such host”,“retrying in seconds”:10}
Can anyone help me please? What going wrong here?