Skip to main content

debian - Apache 2.4 reload fails

itemprop="text">

My Apache won't reload after doing
some changes, in this case after adding a new VHOST via Webmin.
It's not the
first time it happens, last time I resolved reinstalling Apache, indeed not a
satisfactory way to solve the
problem.



In Webmin I get this
error



Failed to
start apache :
:

Starting apache2 (via systemctl):
apache2.service.


So I
try to reload Apache manually vis
ssh



This is what
happens



root@myvps:/#
/etc/init.d/apache2 reload
Reloading apache2 configuration (via systemctl):
apache2.serviceJob for apache2.service failed. See 'systemctl status apache2.service'
and 'journalctl -xn' for details.
failed!



So
this is the journalctl -xn
response



Jan 04 08:55:51 myvps
systemd[1]: Reload failed for LSB: Apache2 web server.
-- Subject: Unit
apache2.service has finished reloading its configuration
-- Defined-By:
systemd
-- Support:
lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit
apache2.service has finished reloading its
configuration
--

-- The result is failed.
Jan
04 08:56:01 myvps CRON[3403]: pam_unix(cron:session): session opened for user root by
(uid=0)
Jan 04 08:56:01 myvps CRON[3404]: (root) CMD (cd / &&
run-parts --report /etc/cron.hourly)
Jan 04 08:56:01 myvps CRON[3403]:
pam_unix(cron:session): session closed for user root
Jan 04 08:56:02 myvps
systemd[1]: Reloading LSB: Apache2 web server.
-- Subject: Unit
apache2.service has begun with reloading its configuration
-- Defined-By:
systemd
-- Support:
freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit
apache2.service has begun with reloading its configuration

Jan 04
08:56:02 myvps systemd[1]: Failed to reset devices.list on
/system.slice/apache2.service: No such file or directory
Jan 04 08:56:03 myvps
apache2[3420]: Reloading web server: apache2 failed!
Jan 04 08:56:03 myvps
apache2[3420]: Apache2 is not running ... (warning).
Jan 04 08:56:03 myvps
systemd[1]: apache2.service: control process exited, code=exited status=1
Jan
04 08:56:03 myvps systemd[1]: Reload failed for LSB: Apache2 web server.
--
Subject: Unit apache2.service has finished reloading its configuration
--
Defined-By: systemd
--
-- Unit apache2.service has finished
reloading its configuration
--

-- The result is
failed.


and this is
the systemctl status apache2.service
one



Jan 04 09:23:43 myvps
apache2[3819]: Action 'start' failed.
Jan 04 09:23:43 myvps apache2[3819]: The
Apache error log may have more information.
Jan 04 09:23:43 myvps
apache2[3819]: .
Jan 04 09:23:43 myvps systemd[1]: Started LSB: Apache2 web
server.
-- Subject: Unit apache2.service has finished
start-up

-- Defined-By: systemd
-- Support:
lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit
apache2.service has finished starting up.
--
-- The start-up result
is done.
Jan 04 09:24:03 myvps systemd[1]: Reloading LSB: Apache2 web
server.
-- Subject: Unit apache2.service has begun with reloading its
configuration
-- Defined-By: systemd
--

-- Unit
apache2.service has begun with reloading its configuration
Jan 04 09:24:03
myvps systemd[1]: Failed to reset devices.list on /system.slice/apache2.service: No such
file or directory
Jan 04 09:24:03 myvps apache2[3868]: Reloading web server:
apache2 failed!
Jan 04 09:24:03 myvps apache2[3868]: Apache2 is not running
... (warning).
Jan 04 09:24:03 myvps systemd[1]: apache2.service: control
process exited, code=exited status=1
Jan 04 09:24:03 myvps systemd[1]: Reload
failed for LSB: Apache2 web server.
-- Subject: Unit apache2.service has
finished reloading its configuration
-- Defined-By:
systemd
--
-- Unit apache2.service has finished reloading its
configuration

--
-- The result is
failed.


These
are the caracteristics of the
VPS




  • Debian
    Linux 8

  • Apache
    2.4.10

  • Webmin
    1.780


  • Kernel and CPU Linux 2.6.32-042stab108.8
    on x86_64

  • BIND
    9.9.5



some
others details from the Apache error
log:



[Mon Jan 04
05:16:05.615503 2016] [mpm_event:notice] [pid 367:tid 140186227066752] AH00489:
Apache/2.4.10 (Debian) OpenSSL/1.0.1k configured -- resuming normal
operations
[Mon Jan 04 05:16:05.615527 2016] [core:notice] [pid 367:tid
140186227066752] AH00094: Command line: '/usr/sbin/apache2'
[Mon Jan 04
06:22:05.208150 2016] [core:error] [pid 428:tid 140185949918976] [client
clientIP:clientPort] AH00135: Invalid method in request quit
[Mon Jan 04
08:34:33.316012 2016] [mpm_event:notice] [pid 367:tid 140186227066752] AH00493: SIGUSR1
received. Doing graceful restart

(98)Address already in use:
AH00072: make_sock: could not bind to address vhostIp:vhostPort
[Mon Jan 04
08:34:33.343511 2016] [mpm_event:alert] [pid 367:tid 140186227066752] no listening
sockets available, shutting down
[Mon Jan 04 08:34:33.343518 2016] [:emerg]
[pid 367:tid 140186227066752] AH00019: Unable to open logs,
exiting


my
apache2.conf

rel="nofollow
noreferrer">http://pastebin.com/xcedmPi0



my
VirtualHost configurations
files

000-default.conf

href="http://pastebin.com/QYgMtTaK" rel="nofollow
noreferrer">http://pastebin.com/QYgMtTaK



webmin.conf
pastebin.com/wFAe1uyS



Anybody
could help?



Thanks.



Answer




It looks like from the error log, you have either misconfigured your
virtualhost or duplicate Listen 80 entries in your apache
config files.






(98)Address already in use: AH00072: make_sock: could not bind to

address
vhostIp:vhostPort




In
your default virtualhost config file, try changing *> to and restart
apache. For a name based virtual host you don't need to specify ip
address.



Also check your
/etc/apache2/ports.conf file for possible duplicate entry for
port
declaration.




Update
from OP:
Problem was solved by deleting a line in the ports.conf
Listen 443 Listen vpsIp:5673 (line
added by Webmin during the failed vhost creation)



Comments

Popular posts from this blog

linux - iDRAC6 Virtual Media native library cannot be loaded

When attempting to mount Virtual Media on a iDRAC6 IP KVM session I get the following error: I'm using Ubuntu 9.04 and: $ javaws -version Java(TM) Web Start 1.6.0_16 $ uname -a Linux aud22419-linux 2.6.28-15-generic #51-Ubuntu SMP Mon Aug 31 13:39:06 UTC 2009 x86_64 GNU/Linux $ firefox -version Mozilla Firefox 3.0.14, Copyright (c) 1998 - 2009 mozilla.org On Windows + IE it (unsurprisingly) works. I've just gotten off the phone with the Dell tech support and I was told it is known to work on Linux + Firefox, albeit Ubuntu is not supported (by Dell, that is). Has anyone out there managed to mount virtual media in the same scenario?

hp proliant - Smart Array P822 with HBA Mode?

We get an HP DL360 G8 with an Smart Array P822 controller. On that controller will come a HP StorageWorks D2700 . Does anybody know, that it is possible to run the Smart Array P822 in HBA mode? I found only information about the P410i, who can run HBA. If this is not supported, what you think about the LSI 9207-8e controller? Will this fit good in that setup? The Hardware we get is used but all original from HP. The StorageWorks has 25 x 900 GB SAS 10K disks. Because the disks are not new I would like to use only 22 for raid6, and the rest for spare (I need to see if the disk count is optimal or not for zfs). It would be nice if I'm not stick to SAS in future. As OS I would like to install debian stretch with zfs 0.71 as file system and software raid. I have see that hp has an page for debian to. I would like to use hba mode because it is recommend, that zfs know at most as possible about the disk, and I'm independent from the raid controller. For us zfs have many benefits,

apache 2.2 - Server Potentially Compromised -- c99madshell

So, low and behold, a legacy site we've been hosting for a client had a version of FCKEditor that allowed someone to upload the dreaded c99madshell exploit onto our web host. I'm not a big security buff -- frankly I'm just a dev currently responsible for S/A duties due to a loss of personnel. Accordingly, I'd love any help you server-faulters could provide in assessing the damage from the exploit. To give you a bit of information: The file was uploaded into a directory within the webroot, "/_img/fck_uploads/File/". The Apache user and group are restricted such that they can't log in and don't have permissions outside of the directory from which we serve sites. All the files had 770 permissions (user rwx, group rwx, other none) -- something I wanted to fix but was told to hold off on as it wasn't "high priority" (hopefully this changes that). So it seems the hackers could've easily executed the script. Now I wasn't able