You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Murray Hills <mu...@outlook.com> on 2017/09/03 21:12:14 UTC
[users@httpd] Apache Restart Failure
Hi There, BTW - I'm new to contacting this support process.
Until now I've had Apache running successfully on an AWS Ubuntu 16.04 EC2 with RDS MysSql
The problem is after adding another virtual host when I restart apache2 I got the following...................
ubuntu@ip-172-31-7-154:~$ sudo systemctl restart apache2
Job for apache2.service failed because the control process exited with error code. See "systemctl status apache2.service" and "journalctl -xe" for details.
I guess I inadvertently deleted or corrupted something??
So I did the following......................
ubuntu@ip-172-31-7-154:~$ sudo journalctl -xe
Sep 03 21:06:46 ip-172-31-7-154 apache2[1326]: (2)No such file or directory: AH02291: Cannot access directory '/var/log/apache2/' for main error log
Sep 03 21:06:46 ip-172-31-7-154 apache2[1326]: (2)No such file or directory: AH02291: Cannot access directory '/var/log/apache2/' for error log of vhost defined at /etc/apache2/sites-enable
Sep 03 21:06:46 ip-172-31-7-154 apache2[1326]: AH00014: Configuration check failed
Sep 03 21:06:46 ip-172-31-7-154 apache2[1326]: Action 'configtest' failed.
Sep 03 21:06:46 ip-172-31-7-154 apache2[1326]: The Apache error log may have more information.
Sep 03 21:06:46 ip-172-31-7-154 systemd[1]: apache2.service: Control process exited, code=exited status=1
Sep 03 21:06:46 ip-172-31-7-154 sudo[1323]: pam_unix(sudo:session): session closed for user root
Sep 03 21:06:46 ip-172-31-7-154 systemd[1]: Failed to start LSB: Apache2 web server.
-- Subject: Unit apache2.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit apache2.service has failed.
--
-- The result is failed.
Sep 03 21:06:46 ip-172-31-7-154 systemd[1]: apache2.service: Unit entered failed state.
Sep 03 21:06:46 ip-172-31-7-154 systemd[1]: apache2.service: Failed with result 'exit-code'.
Sep 03 21:06:52 ip-172-31-7-154 systemd[1]: Failed to start MySQL Community Server.
-- Subject: Unit mysql.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit mysql.service has failed.
--
-- The result is failed.
Sep 03 21:06:52 ip-172-31-7-154 systemd[1]: mysql.service: Unit entered failed state.
Sep 03 21:06:52 ip-172-31-7-154 systemd[1]: mysql.service: Failed with result 'exit-code'.
Sep 03 21:06:53 ip-172-31-7-154 systemd[1]: mysql.service: Service hold-off time over, scheduling restart.
Sep 03 21:06:53 ip-172-31-7-154 systemd[1]: Stopped MySQL Community Server.
-- Subject: Unit mysql.service has finished shutting down
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit mysql.service has finished shutting down.
Sep 03 21:06:53 ip-172-31-7-154 systemd[1]: Starting MySQL Community Server...
-- Subject: Unit mysql.service has begun start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit mysql.service has begun starting up.
Sep 03 21:06:53 ip-172-31-7-154 audit[1364]: AVC apparmor="DENIED" operation="open" profile="/usr/sbin/mysqld" name="/proc/1364/status" pid=1364 comm="mysqld" requested_mask="r" denied_mask
Sep 03 21:06:53 ip-172-31-7-154 audit[1364]: AVC apparmor="DENIED" operation="open" profile="/usr/sbin/mysqld" name="/sys/devices/system/node/" pid=1364 comm="mysqld" requested_mask="r" den
Sep 03 21:06:53 ip-172-31-7-154 audit[1364]: AVC apparmor="DENIED" operation="open" profile="/usr/sbin/mysqld" name="/proc/1364/status" pid=1364 comm="mysqld" requested_mask="r" denied_mask
Sep 03 21:06:53 ip-172-31-7-154 kernel: audit: type=1400 audit(1504472813.078:3643): apparmor="DENIED" operation="open" profile="/usr/sbin/mysqld" name="/proc/1364/status" pid=1364 comm="my
Sep 03 21:06:53 ip-172-31-7-154 kernel: audit: type=1400 audit(1504472813.078:3644): apparmor="DENIED" operation="open" profile="/usr/sbin/mysqld" name="/sys/devices/system/node/" pid=1364
Sep 03 21:06:53 ip-172-31-7-154 kernel: audit: type=1400 audit(1504472813.078:3645): apparmor="DENIED" operation="open" profile="/usr/sbin/mysqld" name="/proc/1364/status" pid=1364 comm="my
Sep 03 21:06:53 ip-172-31-7-154 systemd[1]: mysql.service: Main process exited, code=exited, status=1/FAILURE
Sep 03 21:07:08 ip-172-31-7-154 sudo[1404]: ubuntu : TTY=pts/0 ; PWD=/home/ubuntu ; USER=root ; COMMAND=/bin/journalctl -xe
Sep 03 21:07:08 ip-172-31-7-154 sudo[1404]: pam_unix(sudo:session): session opened for user root by ubuntu(uid=0)
lines 2327-2375/2375 (END)
Any comments, ideas, suggestions would be much appreciated.
Thanks............................Murray
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: [users@httpd] Apache Restart Failure
Posted by Eric Covener <co...@gmail.com>.
On Sun, Sep 3, 2017 at 6:44 PM, Murray Hills <mu...@outlook.com> wrote:
> Thanks so much Eric for your suggestion which seems to have fixed the problem.
>
> The reason I deleted the /var/log/apache2/ was because my Inodes were full and somebody suggested I do it. I see now it was a bad idea.
>
> Do you have any suggestion on how I could fix this Inode's problem shown...............
>
> ubuntu@ip-172-31-7-154:~$ df -i
> Filesystem Inodes IUsed IFree IUse% Mounted on
> udev 124464 360 124104 1% /dev
> tmpfs 126787 449 126338 1% /run
> /dev/xvda1 524288 522638 1650 100% /
> tmpfs 126787 1 126786 1% /dev/shm
> tmpfs 126787 5 126782 1% /run/lock
> tmpfs 126787 16 126771 1% /sys/fs/cgroup
> tmpfs 126793 4 126789 1% /run/user/1000
>
> Thanks.................Murray
Not really on-topic here.
https://unix.stackexchange.com/questions/117093/find-where-inodes-are-being-used
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
RE: [users@httpd] Apache Restart Failure
Posted by Murray Hills <mu...@outlook.com>.
Hi Nick,
Yes I had a warning that I was out of disk space (I checked and found it wasn't normal disk space) but when I ran....................
$ sudo df -i
I could see inodes 100% full.
So I ran.......................
$ find / -xdev -printf '%h\n' | sort | uniq -c | sort -k 1 -n
And found these are the main culprits ............
1155 /usr/src/linux-headers-4.4.0-62/include/linux
1155 /usr/src/linux-headers-4.4.0-65/include/linux
1155 /usr/src/linux-headers-4.4.0-66/include/linux
1155 /usr/src/linux-headers-4.4.0-70/include/linux
1155 /usr/src/linux-headers-4.4.0-71/include/linux
1155 /usr/src/linux-headers-4.4.0-72/include/linux
1155 /usr/src/linux-headers-4.4.0-75/include/linux
1155 /usr/src/linux-headers-4.4.0-78/include/linux
1155 /usr/src/linux-headers-4.4.0-79/include/linux
1155 /usr/src/linux-headers-4.4.0-81/include/linux
1155 /usr/src/linux-headers-4.4.0-83/include/linux
1155 /usr/src/linux-headers-4.4.0-87/include/linux
1155 /usr/src/linux-headers-4.4.0-89/include/linux
1155 /usr/src/linux-headers-4.4.0-91/include/linux
1155 /usr/src/linux-headers-4.4.0-92/include/linux
1514 /usr/src/linux-headers-4.4.0-62-generic/include/config
1516 /usr/src/linux-headers-4.4.0-65-generic/include/config
1516 /usr/src/linux-headers-4.4.0-66-generic/include/config
1516 /usr/src/linux-headers-4.4.0-70-generic/include/config
1516 /usr/src/linux-headers-4.4.0-71-generic/include/config
1516 /usr/src/linux-headers-4.4.0-72-generic/include/config
1516 /usr/src/linux-headers-4.4.0-75-generic/include/config
1517 /usr/src/linux-headers-4.4.0-78-generic/include/config
1517 /usr/src/linux-headers-4.4.0-79-generic/include/config
1517 /usr/src/linux-headers-4.4.0-81-generic/include/config
1517 /usr/src/linux-headers-4.4.0-83-generic/include/config
1517 /usr/src/linux-headers-4.4.0-87-generic/include/config
1517 /usr/src/linux-headers-4.4.0-89-generic/include/config
1517 /usr/src/linux-headers-4.4.0-91-generic/include/config
1517 /usr/src/linux-headers-4.4.0-92-generic/include/config
1517 /usr/src/linux-headers-4.4.0-93-generic/include/config
Is it okay to delete these??
I not sure what old shm segments are and where they would be and how to get rid of them. Where do I get ipcs form?
Thanks.....................Murray
-----Original Message-----
From: Nick Kew [mailto:niq@apache.org]
Sent: Monday, 4 September 2017 11:37 AM
To: users@httpd.apache.org
Subject: Re: [users@httpd] Apache Restart Failure
On Sun, 2017-09-03 at 22:44 +0000, Murray Hills wrote:
> Thanks so much Eric for your suggestion which seems to have fixed the problem.
>
> The reason I deleted the /var/log/apache2/ was because my Inodes were full and somebody suggested I do it. I see now it was a bad idea.
Your inodes were full???
If by that you mean you previously had an error about a full filesystem, it could be that you have old shm segments lying around. Your apache server could leave them if it crashed or is killed (as opposed to an orderly shutdown or restart), or due to a third-party module.
Check that using ipcs.
--
Nick Kew
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: [users@httpd] Apache Restart Failure
Posted by Nick Kew <ni...@apache.org>.
On Sun, 2017-09-03 at 22:44 +0000, Murray Hills wrote:
> Thanks so much Eric for your suggestion which seems to have fixed the problem.
>
> The reason I deleted the /var/log/apache2/ was because my Inodes were full and somebody suggested I do it. I see now it was a bad idea.
Your inodes were full???
If by that you mean you previously had an error about a full filesystem,
it could be that you have old shm segments lying around. Your apache
server could leave them if it crashed or is killed (as opposed to an
orderly shutdown or restart), or due to a third-party module.
Check that using ipcs.
--
Nick Kew
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
RE: [users@httpd] Apache Restart Failure
Posted by Murray Hills <mu...@outlook.com>.
Thanks so much Eric for your suggestion which seems to have fixed the problem.
The reason I deleted the /var/log/apache2/ was because my Inodes were full and somebody suggested I do it. I see now it was a bad idea.
Do you have any suggestion on how I could fix this Inode's problem shown...............
ubuntu@ip-172-31-7-154:~$ df -i
Filesystem Inodes IUsed IFree IUse% Mounted on
udev 124464 360 124104 1% /dev
tmpfs 126787 449 126338 1% /run
/dev/xvda1 524288 522638 1650 100% /
tmpfs 126787 1 126786 1% /dev/shm
tmpfs 126787 5 126782 1% /run/lock
tmpfs 126787 16 126771 1% /sys/fs/cgroup
tmpfs 126793 4 126789 1% /run/user/1000
Thanks.................Murray
-----Original Message-----
From: Eric Covener [mailto:covener@gmail.com]
Sent: Monday, 4 September 2017 9:34 AM
To: users@httpd.apache.org
Subject: Re: [users@httpd] Apache Restart Failure
> Sep 03 21:06:46 ip-172-31-7-154 apache2[1326]: (2)No such file or directory: AH02291: Cannot access directory '/var/log/apache2/' for main error log
I'd suggest restoring or creating this directory for a start
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: [users@httpd] Apache Restart Failure
Posted by Eric Covener <co...@gmail.com>.
> Sep 03 21:06:46 ip-172-31-7-154 apache2[1326]: (2)No such file or directory: AH02291: Cannot access directory '/var/log/apache2/' for main error log
I'd suggest restoring or creating this directory for a start
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org