Getting error 503 after unexpected shut down

Infos:

  • Used Zammad version: 6.2.0-1704877727.2bda00c4.focal
  • Used Zammad installation type: package
  • Operating system: Ubuntu 20.04
  • Browser + version: Brave, Edge, Firefox

The Instance runs on virtual mashine inside Virtual box. The host is Windows 10. After an automatic restart of the windows the zammad virtual mashine shows error 503 inside browser.

I know is not the best deployment but has worked fine since now. After a force restart due to update of windows we start the Virtual Box and and the virtual mashine and it just worked. Now i guess something went wrong due to the unexpected shutdown.

I tried update and upgrade, reboot multiple times without success.

Removed zammad and apache2 and installed them again.

Rebuilded the index in elastic (should have no role i did it anyway)

The logs from the apache show failing to connect to 127.0.0.1:3000. That is the loopback address and should rails be running on it if i am not mistaken:
[Fri Jan 12 12:58:11.766781 2024] [proxy:error] [pid 1057:tid 140234859714304] (111)Connection refused: AH00957: HTTP: attempt to connect to 127.0.0.1:3000 (127.0.0.1) failed

[Fri Jan 12 12:58:11.766820 2024] [proxy_http:error] [pid 1057:tid 140234859714304] [client 192.168.178.39:60787] AH01114: HTTP: failed to make connection to backend: 127.0.0.1

[Fri Jan 12 12:58:12.489425 2024] [proxy:error] [pid 1057:tid 140234842928896] (111)Connection refused: AH00957: HTTP: attempt to connect to 127.0.0.1:3000 (127.0.0.1) failed

[Fri Jan 12 12:58:12.489467 2024] [proxy_http:error] [pid 1057:tid 140234842928896] [client 192.168.178.39:60788] AH01114: HTTP: failed to make connection to backend: 127.0.0.1

The logs from Zammad seem fine to me:
I, [2024-01-12T12:58:49.805407#757-141700] INFO – : Running job thread for ‘Generate ‘Session’ data.’ (Sessions.jobs) status is: sleep
I, [2024-01-12T12:58:49.805659#757-141700] INFO – : Running job thread for ‘Execute planned jobs.’ (Job.run) status is: sleep

I saw no error there.

Here is my apache config for zammad
There i have not changed anything and is the default from zammad:
helpdeskadmin@helpdeskadmin:/etc/apache2/sites-available$ cat zammad.conf

this is the apache config for zammad

security - prevent information disclosure about server version

ServerTokens Prod

<VirtualHost *:80>
# replace ‘localhost’ with your fqdn if you want to use zammad from remote
ServerName localhost

## don't loose time with IP address lookups
HostnameLookups Off

## needed for named virtual hosts
UseCanonicalName Off

## configures the footer on server-generated documents
ServerSignature Off

ProxyRequests Off
ProxyPreserveHost On

<Proxy 127.0.0.1:3000>
    Require local
</Proxy>

ProxyPass /assets !
ProxyPass /favicon.ico !
ProxyPass /apple-touch-icon.png !
ProxyPass /robots.txt !
# legacy web socket server
ProxyPass /ws ws://127.0.0.1:6042/
# action cable
ProxyPass /cable ws://127.0.0.1:3000/cable
ProxyPass / http://127.0.0.1:3000/

# change this line in an SSO setup
RequestHeader unset X-Forwarded-User

DocumentRoot "/opt/zammad/public"

<Directory />
    Options FollowSymLinks
    AllowOverride None
</Directory>

<Directory "/opt/zammad/public">
    Options FollowSymLinks
    Require all granted
</Directory>

Running → journalctl -u zammad
Jan 12 09:26:29 helpdeskadmin systemd[1]: Started zammad.service.

Jan 12 10:25:28 helpdeskadmin systemd[1]: Stopping zammad.service…

Jan 12 10:25:28 helpdeskadmin systemd[1]: zammad.service: Succeeded.

Jan 12 10:25:28 helpdeskadmin systemd[1]: Stopped zammad.service.

Jan 12 10:25:28 helpdeskadmin systemd[1]: Started zammad.service.

Jan 12 11:55:53 helpdeskadmin systemd[1]: Stopping zammad.service…

Jan 12 11:55:53 helpdeskadmin systemd[1]: zammad.service: Succeeded.

Jan 12 11:55:53 helpdeskadmin systemd[1]: Stopped zammad.service.

Jan 12 11:56:13 helpdeskadmin systemd[1]: Started zammad.service.

Jan 12 11:59:39 helpdeskadmin systemd[1]: Stopping zammad.service…

Jan 12 11:59:39 helpdeskadmin systemd[1]: zammad.service: Succeeded.

Jan 12 11:59:39 helpdeskadmin systemd[1]: Stopped zammad.service.

– Reboot –

Jan 12 12:00:22 helpdeskadmin systemd[1]: Started zammad.service.

Jan 12 12:19:11 helpdeskadmin systemd[1]: Stopping zammad.service…

Jan 12 12:19:11 helpdeskadmin systemd[1]: zammad.service: Succeeded.

Jan 12 12:19:11 helpdeskadmin systemd[1]: Stopped zammad.service.

– Reboot –

Jan 12 12:19:56 helpdeskadmin systemd[1]: Started zammad.service.

Jan 12 12:33:44 helpdeskadmin systemd[1]: Stopping zammad.service…

Jan 12 12:33:44 helpdeskadmin systemd[1]: zammad.service: Succeeded.

Jan 12 12:33:44 helpdeskadmin systemd[1]: Stopped zammad.service.

– Reboot –

Jan 12 12:34:29 helpdeskadmin systemd[1]: Started zammad.service.

lines 279-328/328 (END)

Running sudo netstat -tlpen shows:
Proto Recv-Q Send-Q Local Address Foreign Address State User Inode PID/Program name
tcp 0 0 127.0.0.1:3306 0.0.0.0:* LISTEN 114 28935 959/mysqld
tcp 0 0 127.0.0.1:587 0.0.0.0:* LISTEN 0 26599 1164/sendmail: MTA:
tcp 0 0 127.0.0.1:6379 0.0.0.0:* LISTEN 116 26903 1022/redis-server 1
tcp 0 0 127.0.0.53:53 0.0.0.0:* LISTEN 101 21416 688/systemd-resolve
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 0 25745 889/sshd: /usr/sbin
tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN 0 26598 1164/sendmail: MTA:
tcp 0 0 127.0.0.1:6042 0.0.0.0:* LISTEN 997 29248 755/script/websocke
tcp6 0 0 :::443 :::* LISTEN 0 27785 1056/apache2
tcp6 0 0 ::1:6379 :::* LISTEN 116 26904 1022/redis-server 1
tcp6 0 0 127.0.0.1:9200 :::* LISTEN 115 48424 5675/java
tcp6 0 0 ::1:9200 :::* LISTEN 115 48423 5675/java
tcp6 0 0 :::80 :::* LISTEN 0 27781 1056/apache2
tcp6 0 0 127.0.0.1:9300 :::* LISTEN 115 47686 5675/java
tcp6 0 0 ::1:9300 :::* LISTEN 115 47679 5675/java
tcp6 0 0 :::22 :::* LISTEN 0 26760 889/sshd: /usr/sbin

soo no port 3000

I tried restarting zammad services both with restart and with stop+start:
helpdeskadmin@helpdeskadmin:/etc/apache2/sites-available$ systemctl status zammad
● zammad.service
Loaded: loaded (/etc/systemd/system/zammad.service; enabled; vendor preset: enabled)
Active: active (running) since Fri 2024-01-12 13:54:09 UTC; 20s ago
Main PID: 26416 (sleep)
Tasks: 1 (limit: 9426)
Memory: 192.0K
CGroup: /system.slice/zammad.service
└─26416 /bin/sleep infinity

Jan 12 13:54:09 helpdeskadmin systemd[1]: Started zammad.service.
helpdeskadmin@helpdeskadmin:/etc/apache2/sites-available$ systemctl status zammad-web
● zammad-web.service
Loaded: loaded (/etc/systemd/system/zammad-web.service; enabled; vendor preset: enabled)
Active: active (running) since Fri 2024-01-12 13:54:09 UTC; 30s ago
Main PID: 26417 (sleep)
Tasks: 1 (limit: 9426)
Memory: 208.0K
CGroup: /system.slice/zammad-web.service
└─26417 /bin/sleep infinity

Jan 12 13:54:09 helpdeskadmin systemd[1]: Started zammad-web.service.
helpdeskadmin@helpdeskadmin:/etc/apache2/sites-available$ systemctl status zammad-websocket
● zammad-websocket.service
Loaded: loaded (/etc/systemd/system/zammad-websocket.service; enabled; vendor preset: enabled)
Active: active (running) since Fri 2024-01-12 13:54:09 UTC; 43s ago
Main PID: 26419 (sleep)
Tasks: 1 (limit: 9426)
Memory: 220.0K
CGroup: /system.slice/zammad-websocket.service
└─26419 /bin/sleep infinity

Jan 12 13:54:09 helpdeskadmin systemd[1]: Started zammad-websocket.service.

I also have ran:
helpdeskadmin@helpdeskadmin:/etc/apache2/sites-available$ sudo zammad config:get ZAMMAD_RAILS_PORT
3000

I even made a fresh install of zammad on new virtual mashine and tried to compare config files but i could not see any issue.

Any help will be appriciated and thank you in advance. Zammad is a great Open source Software

Expected behavior:

Running after starting after an unexpected shutdown

Actual behavior:

*Showing error 503 and unable to connect to loopback on port 3000

Steps to reproduce the behavior:

I guess plug the mashine out of the electricity and start it

excuse me for formatting is my first tim posting anywhere outside instagram…:frowning:

the database is maria db, i also rested her without success

Hi @Feanor. You already answered it youself: zammad-web.service is no running correctly, otherwise you would see that there is the rails server listening at port 3000. You need to check out why the rails server is not running.

1 Like

Thank you for the answer @fliebe92.
How can i do that systemctl status gives me positive answer

helpdeskadmin@helpdeskadmin:~$ sudo systemctl status zammad-web
● zammad-web.service
Loaded: loaded (/etc/systemd/system/zammad-web.service; enabled; vendor preset: enabled)
Active: active (running) since Fri 2024-01-12 16:35:39 UTC; 3h 48min ago
Main PID: 759 (sleep)
Tasks: 1 (limit: 9425)
Memory: 264.0K
CGroup: /system.slice/zammad-web.service
└─759 /bin/sleep infinity

Jan 12 16:35:39 helpdeskadmin systemd[1]: Started zammad-web.service.

systemctl stop zammad
rm -rf /opt/zammad/contrib/tmp/pids/
systemctl start zammad

Then look for port 3000 by running ss -tulpen. Might take a moment until the application boots up.

1 Like

Thank you for the answer @MrGeneration, i followed the instructions
The result after good 20+ minutes:
helpdeskadmin@helpdeskadmin:~$ ss -tulpen
Netid State Recv-Q Send-Q Local Address:Port Peer Address:PortProcess
udp UNCONN 0 0 127.0.0.53%lo:53 0.0.0.0:* uid:101 ino:22148 sk:1 ↔
udp UNCONN 0 0 192.168.178.65%enp0s3:68 0.0.0.0:* uid:100 ino:19982 sk:2 ↔
udp UNCONN 0 0 [fe80::a00:27ff:feec:3515]%enp0s3:546 [::]:* uid:100 ino:19996 sk:3 v6only:1 ↔
tcp LISTEN 0 80 127.0.0.1:3306 0.0.0.0:* uid:114 ino:27509 sk:4 ↔
tcp LISTEN 0 10 127.0.0.1:587 0.0.0.0:* ino:26255 sk:5 ↔
tcp LISTEN 0 511 127.0.0.1:6379 0.0.0.0:* uid:116 ino:27724 sk:6 ↔
tcp LISTEN 0 4096 127.0.0.53%lo:53 0.0.0.0:* uid:101 ino:22149 sk:7 ↔
tcp LISTEN 0 128 0.0.0.0:22 0.0.0.0:* ino:27059 sk:8 ↔
tcp LISTEN 0 10 127.0.0.1:25 0.0.0.0:* ino:26254 sk:9 ↔
tcp LISTEN 0 100 127.0.0.1:6042 0.0.0.0:* uid:997 ino:712785 sk:a ↔
tcp LISTEN 0 511 [::1]:6379 [::]:* uid:116 ino:27725 sk:b v6only:1 ↔
tcp LISTEN 0 4096 [::ffff:127.0.0.1]:9200 : uid:115 ino:28882 sk:c v6only:0 ↔
tcp LISTEN 0 4096 [::1]:9200 [::]:* uid:115 ino:28881 sk:d v6only:1 ↔
tcp LISTEN 0 511 :80 : ino:24451 sk:e v6only:0 ↔
tcp LISTEN 0 4096 [::ffff:127.0.0.1]:9300 : uid:115 ino:30790 sk:f v6only:0 ↔
tcp LISTEN 0 4096 [::1]:9300 [::]:
uid:115 ino:30783 sk:10 v6only:1 ↔
tcp LISTEN 0 128 [::]:22 [::]:* ino:27061 sk:11 v6only:1 ↔
tcp LISTEN 0 511 *:443 : ino:24455 sk:12 v6only:0 ↔

Hallo again, I tried again today, sadly still no port 3000 :frowning:

Netid     State      Recv-Q     Send-Q                               Local Address:Port           Peer Address:Port     Process
udp       UNCONN     0          0                                    127.0.0.53%lo:53                  0.0.0.0:*         users:(("systemd-resolve",pid=699,fd=12)) uid:101 ino:21708 sk:1 <->
udp       UNCONN     0          0                            192.168.178.65%enp0s3:68                  0.0.0.0:*         users:(("systemd-network",pid=697,fd=19)) uid:100 ino:23741 sk:2 <->
udp       UNCONN     0          0                [fe80::a00:27ff:feec:3515]%enp0s3:546                    [::]:*         users:(("systemd-network",pid=697,fd=20)) uid:100 ino:23798 sk:3 v6only:1 <->
tcp       LISTEN     0          80                                       127.0.0.1:3306                0.0.0.0:*         users:(("mysqld",pid=906,fd=18)) uid:114 ino:26342 sk:4 <->
tcp       LISTEN     0          10                                       127.0.0.1:587                 0.0.0.0:*         users:(("sendmail-mta",pid=1201,fd=5)) ino:27911 sk:5 <->
tcp       LISTEN     0          511                                      127.0.0.1:6379                0.0.0.0:*         users:(("redis-server",pid=998,fd=6)) uid:116 ino:24554 sk:6 <->
tcp       LISTEN     0          4096                                 127.0.0.53%lo:53                  0.0.0.0:*         users:(("systemd-resolve",pid=699,fd=13)) uid:101 ino:21709 sk:7 <->
tcp       LISTEN     0          128                                        0.0.0.0:22                  0.0.0.0:*         users:(("sshd",pid=925,fd=3)) ino:26789 sk:8 <->
tcp       LISTEN     0          10                                       127.0.0.1:25                  0.0.0.0:*         users:(("sendmail-mta",pid=1201,fd=4)) ino:27910 sk:9 <->
tcp       LISTEN     0          100                                      127.0.0.1:6042                0.0.0.0:*         users:(("ruby",pid=8569,fd=9)) uid:997 ino:64526 sk:a <->
tcp       LISTEN     0          511                                          [::1]:6379                   [::]:*         users:(("redis-server",pid=998,fd=7)) uid:116 ino:24555 sk:b v6only:1 <->
tcp       LISTEN     0          4096                            [::ffff:127.0.0.1]:9200                      *:*         users:(("java",pid=719,fd=162)) uid:115 ino:28420 sk:c v6only:0 <->
tcp       LISTEN     0          4096                                         [::1]:9200                   [::]:*         users:(("java",pid=719,fd=161)) uid:115 ino:28419 sk:d v6only:1 <->
tcp       LISTEN     0          511                                              *:80                        *:*         users:(("apache2",pid=1060,fd=4),("apache2",pid=1059,fd=4),("apache2",pid=1058,fd=4)) ino:28683 sk:e v6only:0 <->
tcp       LISTEN     0          4096                            [::ffff:127.0.0.1]:9300                      *:*         users:(("java",pid=719,fd=159)) uid:115 ino:30734 sk:f v6only:0 <->
tcp       LISTEN     0          4096                                         [::1]:9300                   [::]:*         users:(("java",pid=719,fd=158)) uid:115 ino:30727 sk:10 v6only:1 <->
tcp       LISTEN     0          128                                           [::]:22                     [::]:*         users:(("sshd",pid=925,fd=4)) ino:26791 sk:11 v6only:1 <->
tcp       LISTEN     0          511                                              *:443                       *:*         users:(("apache2",pid=1060,fd=6),("apache2",pid=1059,fd=6),("apache2",pid=1058,fd=6)) ino:28687 sk:12 v6only:0 <->

Yesterday i found a similar problem in the forum: " [Zammad-web-1.service not starting any more after VM had crashed [SOLVED]]"

Sadly his solution does not work for me. As mentioned in my first post i tied both sop+stat as well as restart without success, same hold true for both zammad-web nd zammad-web-1.service

helpdeskadmin@helpdeskadmin:/var/log$ sudo systemctl stop zammad-web-1
helpdeskadmin@helpdeskadmin:/var/log$ sudo systemctl status zammad-web-1
● zammad-web-1.service
     Loaded: loaded (/etc/systemd/system/zammad-web-1.service; enabled; vendor preset: enabled)
     Active: inactive (dead) since Sat 2024-01-13 08:47:44 UTC; 6s ago
    Process: 122040 ExecStart=/usr/bin/zammad run web (code=killed, signal=TERM)
   Main PID: 122040 (code=killed, signal=TERM)

Jan 13 08:47:44 helpdeskadmin systemd[1]: Started zammad-web-1.service.
Jan 13 08:47:44 helpdeskadmin systemd[1]: Stopping zammad-web-1.service...
Jan 13 08:47:44 helpdeskadmin systemd[1]: zammad-web-1.service: Succeeded.
Jan 13 08:47:44 helpdeskadmin systemd[1]: Stopped zammad-web-1.service.
helpdeskadmin@helpdeskadmin:/var/log$ sudo systemctl start zammad-web-1
helpdeskadmin@helpdeskadmin:/var/log$ sudo systemctl status zammad-web-1
● zammad-web-1.service
     Loaded: loaded (/etc/systemd/system/zammad-web-1.service; enabled; vendor preset: enabled)
     Active: active (running) since Sat 2024-01-13 08:47:58 UTC; 1s ago
   Main PID: 122076 (ruby)
      Tasks: 1 (limit: 9425)
     Memory: 82.8M
     CGroup: /system.slice/zammad-web-1.service
             └─122076 script/rails server -b 127.0.0.1 -p 3000

Jan 13 08:47:58 helpdeskadmin systemd[1]: Started zammad-web-1.service.
helpdeskadmin@helpdeskadmin:/var/log$ ss -tulpen
Netid          State            Recv-Q           Send-Q                                         Local Address:Port                     Peer Address:Port          Process
udp            UNCONN           0                0                                              127.0.0.53%lo:53                            0.0.0.0:*              uid:101 ino:21708 sk:1 <->
udp            UNCONN           0                0                                      192.168.178.65%enp0s3:68                            0.0.0.0:*              uid:100 ino:23741 sk:2 <->
udp            UNCONN           0                0                          [fe80::a00:27ff:feec:3515]%enp0s3:546                              [::]:*              uid:100 ino:23798 sk:3 v6only:1 <->
tcp            LISTEN           0                80                                                 127.0.0.1:3306                          0.0.0.0:*              uid:114 ino:26342 sk:4 <->
tcp            LISTEN           0                10                                                 127.0.0.1:587                           0.0.0.0:*              ino:27911 sk:5 <->
tcp            LISTEN           0                511                                                127.0.0.1:6379                          0.0.0.0:*              uid:116 ino:24554 sk:6 <->
tcp            LISTEN           0                4096                                           127.0.0.53%lo:53                            0.0.0.0:*              uid:101 ino:21709 sk:7 <->
tcp            LISTEN           0                128                                                  0.0.0.0:22                            0.0.0.0:*              ino:26789 sk:8 <->
tcp            LISTEN           0                10                                                 127.0.0.1:25                            0.0.0.0:*              ino:27910 sk:9 <->
tcp            LISTEN           0                100                                                127.0.0.1:6042                          0.0.0.0:*              uid:997 ino:603323 sk:14 <->
tcp            LISTEN           0                511                                                    [::1]:6379                             [::]:*              uid:116 ino:24555 sk:b v6only:1 <->
tcp            LISTEN           0                4096                                      [::ffff:127.0.0.1]:9200                                *:*              uid:115 ino:28420 sk:c v6only:0 <->
tcp            LISTEN           0                4096                                                   [::1]:9200                             [::]:*              uid:115 ino:28419 sk:d v6only:1 <->
tcp            LISTEN           0                511                                                        *:80                                  *:*              ino:28683 sk:e v6only:0 <->
tcp            LISTEN           0                4096                                      [::ffff:127.0.0.1]:9300                                *:*              uid:115 ino:30734 sk:f v6only:0 <->
tcp            LISTEN           0                4096                                                   [::1]:9300                             [::]:*              uid:115 ino:30727 sk:10 v6only:1 <->
tcp            LISTEN           0                128                                                     [::]:22                               [::]:*              ino:26791 sk:11 v6only:1 <->
tcp            LISTEN           0                511                                                        *:443                                 *:*              ino:28687 sk:12 v6only:0 <->

I did some more digging.
I wanted to try and kill the service with sudo kill and then start…being desperate at this moment so i typed:

helpdeskadmin@helpdeskadmin:/var/log$ ps aux | grep zammad-web.service
helpdes+  148790  0.0  0.0   6440   720 pts/0    S+   09:35   0:00 grep --color=auto zammad-web.service

Then i tried to kill it but not service was found

helpdeskadmin@helpdeskadmin:/var/log$ sudo kill 148790
kill: (148790): No such process

So i ran sudo journalctl -xe and it seems to me that the service is restarting itself very fast?

Jan 13 09:36:17 helpdeskadmin systemd[1]: Started zammad-web-1.service.
-- Subject: A start job for unit zammad-web-1.service has finished successfully
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- A start job for unit zammad-web-1.service has finished successfully.
--
-- The job identifier is 435049.
Jan 13 09:36:20 helpdeskadmin zammad-web-1.service[149598]: Could not find server ''.
Jan 13 09:36:20 helpdeskadmin zammad-web-1.service[149598]: Run `bin/rails server --help` for more options.
Jan 13 09:36:20 helpdeskadmin systemd[1]: zammad-web-1.service: Succeeded.
-- Subject: Unit succeeded
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- The unit zammad-web-1.service has successfully entered the 'dead' state.
Jan 13 09:36:20 helpdeskadmin systemd[1]: zammad-web-1.service: Scheduled restart job, restart counter is at 615.
-- Subject: Automatic restarting of a unit has been scheduled
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- Automatic restarting of the unit zammad-web-1.service has been scheduled, as the result for
-- the configured Restart= setting for the unit.
Jan 13 09:36:20 helpdeskadmin systemd[1]: Stopped zammad-web-1.service.
-- Subject: A stop job for unit zammad-web-1.service has finished
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- A stop job for unit zammad-web-1.service has finished.
--
-- The job identifier is 435144 and the job result is done.
Jan 13 09:36:20 helpdeskadmin systemd[1]: Started zammad-web-1.service.
-- Subject: A start job for unit zammad-web-1.service has finished successfully
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- A start job for unit zammad-web-1.service has finished successfully.
--
-- The job identifier is 435144.
Jan 13 09:36:23 helpdeskadmin sudo[149675]: helpdeskadmin : TTY=pts/0 ; PWD=/var/log ; USER=root ; COMMAND=/usr/bin/journalctl -xe
Jan 13 09:36:23 helpdeskadmin sudo[149675]: pam_unix(sudo:session): session opened for user root by helpdeskadmin(uid=0)
Jan 13 09:36:24 helpdeskadmin zammad-web-1.service[149642]: Could not find server ''.
Jan 13 09:36:24 helpdeskadmin zammad-web-1.service[149642]: Run `bin/rails server --help` for more options.
Jan 13 09:36:24 helpdeskadmin systemd[1]: zammad-web-1.service: Succeeded.
-- Subject: Unit succeeded
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- The unit zammad-web-1.service has successfully entered the 'dead' state.

Any ideas how can i solve this one

here are the config files of zamad web services, i see no issue there

[Unit]
StopWhenUnneeded=true
Requires=zammad-web.service
After=zammad-web.service

[Service]
Environment=APP_PROCESS_INDEX=1
ExecStart=/usr/bin/zammad run web
Restart=always
StandardOutput=syslog
StandardError=syslog
SyslogIdentifier=%n

[Install]
WantedBy=zammad-web.service
helpdeskadmin@helpdeskadmin:/etc/systemd/system$ cat zammad-web.service
[Unit]
StopWhenUnneeded=true
Requires=zammad.service
After=zammad.service

[Service]
# this service is just a placeholder
ExecStart=/bin/sleep infinity

[Install]
WantedBy=zammad.service
helpdeskadmin@helpdeskadmin:/etc/systemd/system$}`````

Running ps aux reurns

zammad    901303 97.5  1.3 170284 108036 ?       Rs   08:14   0:01 script/rails server -b 127.0.0.1 -p 3000

That is the correct missing port, still i cant kill the process

helpdeskadmin@helpdeskadmin:/$ kill -9 901303
-bash: kill: (901303) - No such process

I have installed a quick test server ith zammad to compare, running ps aux on the test server gives me:

zammad       724  1.5  5.0 376340 228120 ?       Ssl  15:37   0:04 puma 6.4.2 (tcp://127.0.0.1:3000) [zammad]

on the problematic server for port 3000 i have:

zammad     29867 42.0  0.3  87840 31996 ?        Rs   15:30   0:00 script/rails server -b 127.0.0.1 -p 3000

What went wrong exactly
One is puma(working) the other is rails(not working)

This is the issue. No idea what you did :thinking:

:slight_smile: quote=“Feanor, post:10, topic:13076”]
journalctl
[/quote]

i found a solution…kinda of.
First i thought to mzself ok puma is not starting cos of the "could not find server ‘’ " error. So i started reading about rails and ruby.
I tried running it manually: sudo zammad run puma -C config/puma.rb -p 3000

and this happened:

Puma starting in single mode...
* Puma version: 6.4.2 (ruby 3.1.3-p185) ("The Eagle of Durango")
*  Min threads: 5
*  Max threads: 30
*  Environment: production
*          PID: 189192
* Listening on http://0.0.0.0:3000
Use Ctrl-C to stop

As long as i do not click str-C the site is working as expected…:slight_smile:

Even though i am happy I will be even more happy if someone can point to me to any more permanent solution
Ty for the help so far

What happens if you try to use the command from the zammad-web.service file to start the Rails server?

1 Like

still the same sadly shows running

helpdeskadmin@helpdeskadmin:~$ sudo systemctl restart zammad-web.service
helpdeskadmin@helpdeskadmin:~$ sudo systemctl status zammad-web.service
● zammad-web.service
     Loaded: loaded (/etc/systemd/system/zammad-web.service; enabled; vendor preset: enabled)
     Active: active (running) since Tue 2024-01-16 17:30:48 UTC; 7s ago
   Main PID: 660512 (sleep)
      Tasks: 1 (limit: 9426)
     Memory: 196.0K
     CGroup: /system.slice/zammad-web.service
             └─660512 /bin/sleep infinity

Jan 16 17:30:48 helpdeskadmin systemd[1]: Started zammad-web.service.

and the journal shows:

--
-- A stop job for unit zammad-web-1.service has finished.
--
-- The job identifier is 1544650 and the job result is done.
Jan 16 17:32:13 helpdeskadmin systemd[1]: Started zammad-web-1.service.
-- Subject: A start job for unit zammad-web-1.service has finished successfully
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- A start job for unit zammad-web-1.service has finished successfully.
--
-- The job identifier is 1544650.
Jan 16 17:32:17 helpdeskadmin zammad-web-1.service[661352]: Could not find server ''.
Jan 16 17:32:17 helpdeskadmin zammad-web-1.service[661352]: Run `bin/rails server --help` for more options.
Jan 16 17:32:17 helpdeskadmin systemd[1]: zammad-web-1.service: Succeeded.
-- Subject: Unit succeeded
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- The unit zammad-web-1.service has successfully entered the 'dead' state.
Jan 16 17:32:18 helpdeskadmin systemd[1]: zammad-web-1.service: Scheduled restart job, restart counter is at 22.
-- Subject: Automatic restarting of a unit has been scheduled
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- Automatic restarting of the unit zammad-web-1.service has been scheduled, as the result for
-- the configured Restart= setting for the unit.
Jan 16 17:32:18 helpdeskadmin systemd[1]: Stopped zammad-web-1.service.
-- Subject: A stop job for unit zammad-web-1.service has finished
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- A stop job for unit zammad-web-1.service has finished.
--
-- The job identifier is 1544745 and the job result is done.
Jan 16 17:32:18 helpdeskadmin systemd[1]: Started zammad-web-1.service.
-- Subject: A start job for unit zammad-web-1.service has finished successfully
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- A start job for unit zammad-web-1.service has finished successfully.
--
-- The job identifier is 1544745.
lines 5061-5103/5103 (END)

just like in my previous post :frowning:
Can be the puma.rb or the config being messed up or something?

Well, you did not execute the command from the service file :smiley:

This topic was automatically closed 360 days after the last reply. New replies are no longer allowed.