apache2.service failed because of unavailable resources or another system error.

Forum for questions and support relating to the 1.32.x releases only.
Post Reply
craver84
Posts: 96
Joined: Sun Aug 31, 2008 7:35 am

apache2.service failed because of unavailable resources or another system error.

Post by craver84 »

Hi everyone,
I've got a fresh of zoneminder 1.32 on ubuntu server 18.04.02.
It worked like a charmed for few weeks, but now the services apache2, mysql and ZM don't start.
I think I have a problem with the resources

Code: Select all

continental@continental1984:~$ df -h
Filesystem                         Size  Used Avail Use% Mounted on
udev                               3.7G     0  3.7G   0% /dev
tmpfs                              764M   86M  678M  12% /run
/dev/mapper/ubuntu--vg-ubuntu--lv  2.7T  1.8T  755G  71% /
tmpfs                              3.8G     0  3.8G   0% /dev/shm
tmpfs                              5.0M     0  5.0M   0% /run/lock
tmpfs                              3.8G     0  3.8G   0% /sys/fs/cgroup
/dev/loop0                          90M   90M     0 100% /snap/core/6673
/dev/loop1                          91M   91M     0 100% /snap/core/6350
/dev/loop2                          90M   90M     0 100% /snap/core/6818
/dev/sda2                          976M  143M  767M  16% /boot
tmpfs                              764M     0  764M   0% /run/user/1000
continental@continental1984:~$ 

Code: Select all

continental@continental1984:~$ sudo systemctl status apache2.service
sudo: unable to resolve host continental1984: Resource temporarily unavailable
● apache2.service - The Apache HTTP Server
   Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor preset: enabled)
  Drop-In: /lib/systemd/system/apache2.service.d
           └─apache2-systemd.conf
   Active: failed (Result: resources)

May 22 10:44:34 continental1984 systemd[1]: apache2.service: Failed to run 'start' task: Read-only file system
May 22 10:44:34 continental1984 systemd[1]: apache2.service: Failed with result 'resources'.
May 22 10:44:34 continental1984 systemd[1]: Failed to start The Apache HTTP Server.


continental@continental1984:~$ sudo systemctl start apache2.service
sudo: unable to resolve host continental1984: Resource temporarily unavailable
Job for apache2.service failed because of unavailable resources or another system error.
See "systemctl status apache2.service" and "journalctl -xe" for details.

Code: Select all

continental@continental1984:~$ sudo systemctl status mysql.service
sudo: unable to resolve host continental1984: Resource temporarily unavailable
● mysql.service - MySQL Community Server
   Loaded: loaded (/lib/systemd/system/mysql.service; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Wed 2019-05-22 10:44:14 CEST; 10min ago
  Process: 3774 ExecStart=/usr/sbin/mysqld --daemonize --pid-file=/run/mysqld/mysqld.pid (code=exited, status=1/FAILURE)
  Process: 3754 ExecStartPre=/usr/share/mysql/mysql-systemd-start pre (code=exited, status=0/SUCCESS)

May 22 10:44:14 continental1984 systemd[1]: mysql.service: Service hold-off time over, scheduling restart.
May 22 10:44:14 continental1984 systemd[1]: mysql.service: Scheduled restart job, restart counter is at 5.
May 22 10:44:14 continental1984 systemd[1]: Stopped MySQL Community Server.
May 22 10:44:14 continental1984 systemd[1]: mysql.service: Start request repeated too quickly.
May 22 10:44:14 continental1984 systemd[1]: mysql.service: Failed with result 'exit-code'.
May 22 10:44:14 continental1984 systemd[1]: Failed to start MySQL Community Server.

Code: Select all

continental@continental1984:~$ sudo systemctl status zoneminder.service
sudo: unable to resolve host continental1984: Resource temporarily unavailable
● zoneminder.service - ZoneMinder CCTV recording and surveillance system
   Loaded: loaded (/lib/systemd/system/zoneminder.service; enabled; vendor preset: enabled)
   Active: activating (auto-restart) (Result: exit-code) since Wed 2019-05-22 10:55:14 CEST; 7s ago
  Process: 4986 ExecStart=/usr/bin/zmpkg.pl start (code=exited, status=255)
continental@continental1984:~$ 

Code: Select all

continental@continental1984:~$ sudo journalctl -xe
sudo: unable to resolve host continental1984: Resource temporarily unavailable
May 22 10:57:07 continental1984 systemd[1]: zoneminder.service: Failed with result 'exit-code'.
May 22 10:57:07 continental1984 systemd[1]: Failed to start ZoneMinder CCTV recording and surveillance system.
-- Subject: Unit zoneminder.service has failed
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
-- 
-- Unit zoneminder.service has failed.
-- 
-- The result is RESULT.
May 22 10:57:10 continental1984 sudo[5179]: continental : unable to resolve host continental1984
May 22 10:57:10 continental1984 sudo[5179]: continental : problem with defaults entries ; TTY=pts/0 ; PWD=/home/continental ; USER=root ;
May 22 10:57:10 continental1984 rsyslogd[1070]: action 'action 2' resumed (module 'builtin:omfile') [v8.32.0 try http://www.rsyslog.com/e/2359 ]
May 22 10:57:10 continental1984 rsyslogd[1070]: action 'action 2' suspended (module 'builtin:omfile'), retry 0. There should be messages before this one giving the r
May 22 10:57:10 continental1984 rsyslogd[1070]: action 'action 2' resumed (module 'builtin:omfile') [v8.32.0 try http://www.rsyslog.com/e/2359 ]
May 22 10:57:10 continental1984 rsyslogd[1070]: action 'action 2' suspended (module 'builtin:omfile'), retry 0. There should be messages before this one giving the r
May 22 10:57:10 continental1984 rsyslogd[1070]: action 'action 2' resumed (module 'builtin:omfile') [v8.32.0 try http://www.rsyslog.com/e/2359 ]
May 22 10:57:10 continental1984 rsyslogd[1070]: action 'action 2' suspended (module 'builtin:omfile'), retry 0. There should be messages before this one giving the r
May 22 10:57:10 continental1984 rsyslogd[1070]: action 'action 2' resumed (module 'builtin:omfile') [v8.32.0 try http://www.rsyslog.com/e/2359 ]
May 22 10:57:10 continental1984 rsyslogd[1070]: action 'action 2' suspended (module 'builtin:omfile'), retry 0. There should be messages before this one giving the r
May 22 10:57:10 continental1984 rsyslogd[1070]: action 'action 2' resumed (module 'builtin:omfile') [v8.32.0 try http://www.rsyslog.com/e/2359 ]
May 22 10:57:10 continental1984 rsyslogd[1070]: action 'action 2' suspended (module 'builtin:omfile'), retry 0. There should be messages before this one giving the r
May 22 10:57:10 continental1984 rsyslogd[1070]: action 'action 2' resumed (module 'builtin:omfile') [v8.32.0 try http://www.rsyslog.com/e/2359 ]
May 22 10:57:10 continental1984 rsyslogd[1070]: action 'action 2' suspended (module 'builtin:omfile'), retry 0. There should be messages before this one giving the r
May 22 10:57:10 continental1984 rsyslogd[1070]: action 'action 2' resumed (module 'builtin:omfile') [v8.32.0 try http://www.rsyslog.com/e/2359 ]
May 22 10:57:10 continental1984 rsyslogd[1070]: action 'action 2' suspended (module 'builtin:omfile'), retry 0. There should be messages before this one giving the r
May 22 10:57:10 continental1984 rsyslogd[1070]: action 'action 2' resumed (module 'builtin:omfile') [v8.32.0 try http://www.rsyslog.com/e/2359 ]
May 22 10:57:10 continental1984 rsyslogd[1070]: action 'action 2' suspended (module 'builtin:omfile'), retry 0. There should be messages before this one giving the r
May 22 10:57:10 continental1984 rsyslogd[1070]: action 'action 2' resumed (module 'builtin:omfile') [v8.32.0 try http://www.rsyslog.com/e/2359 ]
May 22 10:57:10 continental1984 rsyslogd[1070]: action 'action 2' suspended (module 'builtin:omfile'), retry 0. There should be messages before this one giving the r
May 22 10:57:10 continental1984 rsyslogd[1070]: action 'action 2' resumed (module 'builtin:omfile') [v8.32.0 try http://www.rsyslog.com/e/2359 ]
May 22 10:57:10 continental1984 rsyslogd[1070]: action 'action 2' suspended (module 'builtin:omfile'), retry 0. There should be messages before this one giving the r
May 22 10:57:10 continental1984 rsyslogd[1070]: action 'action 2' suspended (module 'builtin:omfile'), next retry is Wed May 22 10:57:40 2019, retry nbr 0. There sho
May 22 10:57:10 continental1984 sudo[5179]: continental : TTY=pts/0 ; PWD=/home/continental ; USER=root ; COMMAND=/bin/journalctl -xe
May 22 10:57:10 continental1984 sudo[5179]: pam_unix(sudo:session): session opened for user root by continental(uid=0)

can anyone help me please?
thanks Paolo
craver84
Posts: 96
Joined: Sun Aug 31, 2008 7:35 am

Re: apache2.service failed because of unavailable resources or another system error.

Post by craver84 »

Code: Select all

continental@continental1984:~$ free -m
              total        used        free      shared  buff/cache   available
Mem:           7633         277        3802          85        3554        6974
Swap:             0           0           0
User avatar
kitkat
Posts: 193
Joined: Sun Jan 27, 2019 5:17 pm

Re: apache2.service failed because of unavailable resources or another system error.

Post by kitkat »

Code: Select all

apache2.service: Failed to run 'start' task: Read-only file system
Sounds like one of the file systems has been mounted or remounted as Read Only.

What's the output of

Code: Select all

cat /etc/mtab
Look for 'ro' in the flags (most or all of them should have 'rw').
craver84
Posts: 96
Joined: Sun Aug 31, 2008 7:35 am

Re: apache2.service failed because of unavailable resources or another system error.

Post by craver84 »

that's the output...
I just say I did not change anything, the day before it works, the day after not....

Code: Select all

tinental@continental1984:~$ cat /etc/mtab
sysfs /sys sysfs rw,nosuid,nodev,noexec,relatime 0 0
proc /proc proc rw,nosuid,nodev,noexec,relatime 0 0
udev /dev devtmpfs rw,nosuid,relatime,size=3877680k,nr_inodes=969420,mode=755 0 0
devpts /dev/pts devpts rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000 0 0
tmpfs /run tmpfs rw,nosuid,noexec,relatime,size=781724k,mode=755 0 0
/dev/mapper/ubuntu--vg-ubuntu--lv / ext4 ro,relatime,data=ordered 0 0
securityfs /sys/kernel/security securityfs rw,nosuid,nodev,noexec,relatime 0 0
tmpfs /dev/shm tmpfs rw,nosuid,nodev 0 0
tmpfs /run/lock tmpfs rw,nosuid,nodev,noexec,relatime,size=5120k 0 0
tmpfs /sys/fs/cgroup tmpfs ro,nosuid,nodev,noexec,mode=755 0 0
cgroup /sys/fs/cgroup/unified cgroup2 rw,nosuid,nodev,noexec,relatime 0 0
cgroup /sys/fs/cgroup/systemd cgroup rw,nosuid,nodev,noexec,relatime,xattr,name=systemd 0 0
pstore /sys/fs/pstore pstore rw,nosuid,nodev,noexec,relatime 0 0
cgroup /sys/fs/cgroup/net_cls,net_prio cgroup rw,nosuid,nodev,noexec,relatime,net_cls,net_prio 0 0
cgroup /sys/fs/cgroup/cpu,cpuacct cgroup rw,nosuid,nodev,noexec,relatime,cpu,cpuacct 0 0
cgroup /sys/fs/cgroup/rdma cgroup rw,nosuid,nodev,noexec,relatime,rdma 0 0
cgroup /sys/fs/cgroup/memory cgroup rw,nosuid,nodev,noexec,relatime,memory 0 0
cgroup /sys/fs/cgroup/cpuset cgroup rw,nosuid,nodev,noexec,relatime,cpuset 0 0
cgroup /sys/fs/cgroup/freezer cgroup rw,nosuid,nodev,noexec,relatime,freezer 0 0
cgroup /sys/fs/cgroup/hugetlb cgroup rw,nosuid,nodev,noexec,relatime,hugetlb 0 0
cgroup /sys/fs/cgroup/devices cgroup rw,nosuid,nodev,noexec,relatime,devices 0 0
cgroup /sys/fs/cgroup/pids cgroup rw,nosuid,nodev,noexec,relatime,pids 0 0
cgroup /sys/fs/cgroup/blkio cgroup rw,nosuid,nodev,noexec,relatime,blkio 0 0
cgroup /sys/fs/cgroup/perf_event cgroup rw,nosuid,nodev,noexec,relatime,perf_event 0 0
systemd-1 /proc/sys/fs/binfmt_misc autofs rw,relatime,fd=45,pgrp=1,timeout=0,minproto=5,maxproto=5,direct,pipe_ino=1283 0 0
mqueue /dev/mqueue mqueue rw,relatime 0 0
configfs /sys/kernel/config configfs rw,relatime 0 0
hugetlbfs /dev/hugepages hugetlbfs rw,relatime,pagesize=2M 0 0
debugfs /sys/kernel/debug debugfs rw,relatime 0 0
fusectl /sys/fs/fuse/connections fusectl rw,relatime 0 0
tracefs /sys/kernel/debug/tracing tracefs rw,relatime 0 0
/dev/loop0 /snap/core/6673 squashfs ro,nodev,relatime 0 0
/dev/loop1 /snap/core/6350 squashfs ro,nodev,relatime 0 0
/dev/loop2 /snap/core/6818 squashfs ro,nodev,relatime 0 0
/dev/sda2 /boot ext4 rw,relatime,data=ordered 0 0
lxcfs /var/lib/lxcfs fuse.lxcfs rw,nosuid,nodev,relatime,user_id=0,group_id=0,allow_other 0 0
tmpfs /run/user/1000 tmpfs rw,nosuid,nodev,relatime,size=781720k,mode=700,uid=1000,gid=1000 0 0

User avatar
kitkat
Posts: 193
Joined: Sun Jan 27, 2019 5:17 pm

Re: apache2.service failed because of unavailable resources or another system error.

Post by kitkat »

It's quite probably this one...

Code: Select all

/dev/mapper/ubuntu--vg-ubuntu--lv / ext4 ro,relatime,data=ordered 0 0
It could be caused by the disk being mounted as read only after a file system error or hardware problem.

I'd try dismounting it and running fsck (probably with the -f -y -C0 options) to check the file system in the first instance, along with smartctl -a to see if there are any obvious hardware issues or failures with the drive.

I don't know whether the /dev/loopX devices should be read-write (rw) or read-only (ro) but the ones in your output are marked as 'ro', although that may change when dev/mapper/ubuntu--vg-ubuntu--lv is fixed.


e2a: /dev/mapper/ubuntu--vg-ubuntu--lv is your root file system so you won't be able to dismount it on a running system and you'll have to boot to some sort of 'rescue' or 'recovery' mode to run fsck.
Post Reply