Service Unavailable after making secure connection https

Vani 4 years ago

Service Unavailable
The server is temporarily unable to service your request due to maintenance downtime or capacity problems. Please try again later.

Apache/2.4.54 (Ubuntu) Server at {removed} Port 443

Vani 4 years ago

if i stop apache it works on http but if i start apache it will not work anymore.

<VirtualHost *:80>
  ServerName test.com
  Redirect / https://test.com/
</VirtualHost>
<IfModule mod_ssl.c>
        <VirtualHost _default_:443>

                ServerName test.com
                ServerAdmin webmaster@localhost

                DocumentRoot /var/www/html

                ProxyPass /api/socket ws://localhost:8082/api/socket
                ProxyPassReverse /api/socket ws://localhost:8082/api/socket

                ProxyPass / http://localhost:8082/
                ProxyPassReverse / http://localhost:8082/

                SSLEngine on
                SSLCertificateFile /etc/ssl/certs/ssl-cert-snakeoil.pem
                SSLCertificateKeyFile /etc/ssl/private/ssl-cert-snakeoil.key

        </VirtualHost>
</IfModule>
Anton Tananaev 4 years ago

I don't see any useful information. What troubleshooting have you done? Like port checks, running processes, logs etc.

Vani 4 years ago

Port 443 is open

USER         PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
root           1  0.7  0.5 102556 11400 ?        Ss   06:14   0:01 /sbin/init
root           2  0.0  0.0      0     0 ?        S    06:14   0:00 [kthreadd]
root           3  0.0  0.0      0     0 ?        I<   06:14   0:00 [rcu_gp]
root           4  0.0  0.0      0     0 ?        I<   06:14   0:00 [rcu_par_gp]
root           5  0.0  0.0      0     0 ?        I    06:14   0:00 [kworker/0:0-events]
root           6  0.0  0.0      0     0 ?        I<   06:14   0:00 [kworker/0:0H-kblockd]
root           7  0.0  0.0      0     0 ?        I    06:14   0:00 [kworker/u2:0-events_power_efficient]
root           8  0.0  0.0      0     0 ?        I<   06:14   0:00 [mm_percpu_wq]
root           9  0.0  0.0      0     0 ?        S    06:14   0:00 [ksoftirqd/0]
root          10  0.3  0.0      0     0 ?        I    06:14   0:00 [rcu_sched]
root          11  0.0  0.0      0     0 ?        S    06:14   0:00 [migration/0]
root          12  0.0  0.0      0     0 ?        S    06:14   0:00 [idle_inject/0]
root          13  0.0  0.0      0     0 ?        I    06:14   0:00 [kworker/0:1-events]
root          14  0.0  0.0      0     0 ?        S    06:14   0:00 [cpuhp/0]
root          15  0.0  0.0      0     0 ?        S    06:14   0:00 [kdevtmpfs]
root          16  0.0  0.0      0     0 ?        I<   06:14   0:00 [netns]
root          17  0.0  0.0      0     0 ?        S    06:14   0:00 [rcu_tasks_kthre]
root          18  0.0  0.0      0     0 ?        S    06:14   0:00 [kauditd]
root          19  0.0  0.0      0     0 ?        S    06:14   0:00 [khungtaskd]
root          20  0.0  0.0      0     0 ?        S    06:14   0:00 [oom_reaper]
root          21  0.0  0.0      0     0 ?        I<   06:14   0:00 [writeback]
root          22  0.0  0.0      0     0 ?        S    06:14   0:00 [kcompactd0]
root          23  0.0  0.0      0     0 ?        SN   06:14   0:00 [ksmd]
root          24  0.0  0.0      0     0 ?        SN   06:14   0:00 [khugepaged]
root          70  0.0  0.0      0     0 ?        I<   06:14   0:00 [kintegrityd]
root          71  0.0  0.0      0     0 ?        I<   06:14   0:00 [kblockd]
root          72  0.0  0.0      0     0 ?        I<   06:14   0:00 [blkcg_punt_bio]
root          73  0.0  0.0      0     0 ?        I<   06:14   0:00 [tpm_dev_wq]
root          74  0.0  0.0      0     0 ?        I<   06:14   0:00 [ata_sff]
root          75  0.0  0.0      0     0 ?        I<   06:14   0:00 [md]
root          76  0.0  0.0      0     0 ?        I<   06:14   0:00 [edac-poller]
root          77  0.0  0.0      0     0 ?        I<   06:14   0:00 [devfreq_wq]
root          78  0.0  0.0      0     0 ?        S    06:14   0:00 [watchdogd]
root          79  0.0  0.0      0     0 ?        I    06:14   0:00 [kworker/u2:1-events_unbound]
root          81  0.0  0.0      0     0 ?        S    06:14   0:00 [kswapd0]
root          82  0.0  0.0      0     0 ?        S    06:14   0:00 [ecryptfs-kthrea]
root          84  0.0  0.0      0     0 ?        I<   06:14   0:00 [kthrotld]
root          85  0.0  0.0      0     0 ?        I<   06:14   0:00 [acpi_thermal_pm]
root          86  0.0  0.0      0     0 ?        S    06:14   0:00 [scsi_eh_0]
root          87  0.0  0.0      0     0 ?        I<   06:14   0:00 [scsi_tmf_0]
root          88  0.0  0.0      0     0 ?        S    06:14   0:00 [scsi_eh_1]
root          89  0.0  0.0      0     0 ?        I<   06:14   0:00 [scsi_tmf_1]
root          90  0.0  0.0      0     0 ?        I    06:14   0:00 [kworker/u2:2-events_power_efficient]
root          91  0.0  0.0      0     0 ?        I<   06:14   0:00 [vfio-irqfd-clea]
root          92  0.0  0.0      0     0 ?        I    06:14   0:00 [kworker/u2:3-events_power_efficient]
root          93  0.0  0.0      0     0 ?        I<   06:14   0:00 [ipv6_addrconf]
root         102  0.0  0.0      0     0 ?        I<   06:14   0:00 [kstrp]
root         105  0.0  0.0      0     0 ?        I<   06:14   0:00 [kworker/u3:0]
root         118  0.0  0.0      0     0 ?        I<   06:14   0:00 [charger_manager]
root         137  0.0  0.0      0     0 ?        I    06:14   0:00 [kworker/0:2-events]
root         158  0.0  0.0      0     0 ?        I<   06:14   0:00 [kworker/0:1H-kblockd]
root         159  0.0  0.0      0     0 ?        I<   06:14   0:00 [cryptd]
root         182  0.0  0.0      0     0 ?        I<   06:14   0:00 [ttm_swap]
root         219  0.0  0.0      0     0 ?        I<   06:14   0:00 [raid5wq]
root         259  0.0  0.0      0     0 ?        S    06:14   0:00 [jbd2/vda1-8]
root         260  0.0  0.0      0     0 ?        I<   06:14   0:00 [ext4-rsv-conver]
root         295  0.0  0.0      0     0 ?        S    06:14   0:00 [hwrng]
root         333  0.0  0.5  35736 12088 ?        S<s  06:14   0:00 /lib/systemd/systemd-journald
root         349  0.0  0.0      0     0 ?        I<   06:14   0:00 [ipmi-msghandler]
root         358  0.0  0.0      0     0 ?        I    06:14   0:00 [kworker/0:3-cgroup_destroy]
root         359  0.0  0.0      0     0 ?        I    06:14   0:00 [kworker/0:4-events]
root         361  0.0  0.0      0     0 ?        I    06:14   0:00 [kworker/0:5-events]
root         363  0.1  0.2  20120  5972 ?        Ss   06:14   0:00 /lib/systemd/systemd-udevd
root         445  0.0  0.0      0     0 ?        I<   06:14   0:00 [kaluad]
root         446  0.0  0.0      0     0 ?        I<   06:14   0:00 [kmpath_rdacd]
root         447  0.0  0.0      0     0 ?        I<   06:14   0:00 [kmpathd]
root         448  0.0  0.0      0     0 ?        I<   06:14   0:00 [kmpath_handlerd]
root         449  0.0  0.8 280196 17996 ?        SLsl 06:14   0:00 /sbin/multipathd -d -s
root         460  0.0  0.0      0     0 ?        S<   06:14   0:00 [loop0]
root         462  0.0  0.0      0     0 ?        S<   06:14   0:00 [loop1]
root         463  0.0  0.0      0     0 ?        S<   06:14   0:00 [loop2]
systemd+     479  0.0  0.3  90872  6116 ?        Ssl  06:14   0:00 /lib/systemd/systemd-timesyncd
systemd+     541  0.0  0.3  27256  7596 ?        Ss   06:14   0:00 /lib/systemd/systemd-networkd
systemd+     557  0.0  0.5  24536 12072 ?        Ss   06:14   0:00 /lib/systemd/systemd-resolved
root         598  0.0  0.4 241044  9388 ?        Ssl  06:14   0:00 /usr/lib/accountsservice/accounts-daemon
root         602  0.0  0.1   8536  2868 ?        Ss   06:14   0:00 /usr/sbin/cron -f
message+     603  0.0  0.2   7552  4792 ?        Ss   06:14   0:00 /usr/bin/dbus-daemon --system --address=systemd: root         609  0.0  0.8  29864 18132 ?        Ss   06:14   0:00 /usr/bin/python3 /usr/bin/networkd-dispatcher --rroot         611  0.0  0.4 236308  8844 ?        Ssl  06:14   0:00 /usr/lib/policykit-1/polkitd --no-debug
syslog       612  0.0  0.2 224496  4904 ?        Ssl  06:14   0:00 /usr/sbin/rsyslogd -n -iNONE
root         616  0.5  1.8 726824 38172 ?        Ssl  06:14   0:00 /usr/lib/snapd/snapd
root         618  0.0  0.3  17296  7864 ?        Ss   06:14   0:00 /lib/systemd/systemd-logind
root         620  5.1  8.6 2517928 175508 ?      Ssl  06:14   0:07 /opt/traccar/jre/bin/java -jar tracker-server.jarroot         621  0.0  0.6 395472 13468 ?        Ssl  06:14   0:00 /usr/lib/udisks2/udisksd
root         623  0.0  0.0      0     0 ?        I    06:14   0:00 [kworker/0:6-cgroup_destroy]
root         625  0.0  0.0      0     0 ?        I    06:14   0:00 [kworker/0:7-rcu_gp]
root         626  0.0  0.0      0     0 ?        I    06:14   0:00 [kworker/0:8-memcg_kmem_cache]
root         627  0.0  0.0      0     0 ?        I    06:14   0:00 [kworker/0:9-events]
daemon       628  0.0  0.1   3792  2212 ?        Ss   06:14   0:00 /usr/sbin/atd -f
root         641  0.0  0.1   7352  2260 ttyS0    Ss+  06:14   0:00 /sbin/agetty -o -p -- \u --keep-baud 115200,38400root         643  0.0  0.0   5828  1852 tty1     Ss+  06:14   0:00 /sbin/agetty -o -p -- \u --noclear tty1 linux
root         678  0.0  0.3  12172  7432 ?        Ss   06:14   0:00 sshd: /usr/sbin/sshd -D [listener] 2 of 10-100 stroot         684  0.0  0.5 314448 11100 ?        Ssl  06:14   0:00 /usr/sbin/ModemManager
root         701  0.0  0.3  11880  7908 ?        Ss   06:14   0:00 /usr/sbin/apache2 -k start
root         702  0.0  1.0 108112 20484 ?        Ssl  06:14   0:00 /usr/bin/python3 /usr/share/unattended-upgrades/uwww-data     703  0.0  0.3 758232  7520 ?        Sl   06:14   0:00 /usr/sbin/apache2 -k start
www-data     704  0.0  0.3 758224  7452 ?        Sl   06:14   0:00 /usr/sbin/apache2 -k start
mysql        786  1.8 21.1 1384840 429856 ?      Ssl  06:14   0:02 /usr/sbin/mysqld
root        1312  0.0  0.3  12172  7000 ?        Ss   06:15   0:00 sshd: [accepted]
root        1348  0.0  0.3  12172  6972 ?        Ss   06:16   0:00 sshd: [accepted]
root        1361  0.1  0.4  13892  9132 ?        Ss   06:17   0:00 sshd: root@pts/0
root        1376  0.5  0.4  19060  9768 ?        Ss   06:17   0:00 /lib/systemd/systemd --user
root        1377  0.0  0.1 103916  3288 ?        S    06:17   0:00 (sd-pam)
root        1476  0.1  0.2  10032  5036 pts/0    Ss   06:17   0:00 -bash
root        1489  0.0  0.1  10612  3300 pts/0    R+   06:17   0:00 ps aux
Vani 4 years ago

The traccar logs are fine, they receive connections from the trackers, witch log can i check

Anton Tananaev 4 years ago

Have you tried connecting directly to Traccar? If that's working, then your issue is really with Apache.

Vani 4 years ago

if i do service apache2 stop
then i can access the server by ip adres. if i start apache it will not work anymore and receive this message :
Service Unavailable
The server is temporarily unable to service your request due to maintenance downtime or capacity problems. Please try again later.

luis lopez 2 years ago

Hello Vani. do you fix that problem? i have the same mixtake