Re: Apache2 fails to listen on open port

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Following up on the mod_gnutls entry in ports.conf, I commented out the entry and restarted apache. It didn’t fix the problem.

dnessett@Mount:/etc/apache2$ cat ports.conf
# If you just change the port or add more ports here, you will likely also
# have to change the VirtualHost statement in
# /etc/apache2/sites-enabled/000-default.conf

#Listen 80

<IfModule ssl_module>
Listen 4443
</IfModule>

<IfDefine IgnoreBlockComment>
<IfModule mod_gnutls.c>
Listen 443
</IfModule>
</IfDefine>

# vim: syntax=apache ts=4 sw=4 sts=4 sr noet
dnessett@Mount:/etc/apache2$ 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.
dnessett@Mount:/etc/apache2$ sudo systemctl status apache2
● apache2.service - The Apache HTTP Server
   Loaded: loaded (/lib/systemd/system/apache2.service; enabled-runtime; vendor preset: enabled)
  Drop-In: /lib/systemd/system/apache2.service.d
           └─apache2-systemd.conf
   Active: failed (Result: exit-code) since Thu 2022-12-15 18:38:56 MST; 5min ago
  Process: 1771 ExecStart=/usr/sbin/apachectl start (code=exited, status=1/FAILURE)

Dec 15 18:38:56 Mount systemd[1]: Starting The Apache HTTP Server...
Dec 15 18:38:56 Mount apachectl[1771]: (98)Address already in use: AH00072: make_sock: could not bind to address 127.0.0.1:4443
Dec 15 18:38:56 Mount apachectl[1771]: no listening sockets available, shutting down
Dec 15 18:38:56 Mount apachectl[1771]: AH00015: Unable to open logs
Dec 15 18:38:56 Mount apachectl[1771]: Action 'start' failed.
Dec 15 18:38:56 Mount apachectl[1771]: The Apache error log may have more information.
Dec 15 18:38:56 Mount systemd[1]: apache2.service: Control process exited, code=exited status=1
Dec 15 18:38:56 Mount systemd[1]: apache2.service: Failed with result 'exit-code'.
Dec 15 18:38:56 Mount systemd[1]: Failed to start The Apache HTTP Server.
dnessett@Mount:/etc/apache2$

On Dec 15, 2022, at 5:56 PM, Frank Gingras <thumbs@xxxxxxxxxx> wrote:

Grep every single config file (recursively) for the Listen directive.

On Thu, Dec 15, 2022 at 7:54 PM Daniel Ferradal <dferradal@xxxxxxxxxx> wrote:
What does the apache error log say (not systemd)?

Also, am I seeing right? you specified "Listen localhost:4443 ssl;"
with a semicolon at the end?

Also specify it with ips , don't use names with Listen directive.

El vie, 16 dic 2022 a las 1:45, John Iliffe (<john.iliffe@xxxxxxxxx>) escribió:
>
> Try
>
> systenctl httpd stop,
>
> then when ps -ef | grep httpd shows that httpd is gone
>
> systemctl httpd start
>
> to give the system time to release all the resources.
>
> John
> ======
> On Thu, 2022-12-15 at 17:28 -0700, Dan Nessett wrote:
> > Thanks for the info. However, I don’t believe any of the problems suggested in
> > the wiki apply.
> >
> > 1. The output from both lsof and netstat -plant indicate no other process is
> > using port 4443 either before or after apache2 is started
> >
> > 2. There does not seem to be conflicting Listen commands in the apache sites-
> > available files.
> >
> > 3. The Listen in 000-default.conf is: Listen localhost:4443 ssl; and the
> > Virtual Host entry is: <VirtualHost localhost:4443> ServerName
> > coop.mountolive.com:4443 … localhost and coop.mountolive.com are both valid
> > values as is port 4443.
> >
> > 4. I believe systemctl status apache2.service starts apache2 as root
> >
> > 5. SELinux is not active, i.e.,
> >
> >       semanage port -l|grep http
> >       Command 'semanage' not found, but can be installed with:
> >       sudo apt install policycoreutils-python-utils
> >
> > I have attached output from the terminal commands that tests these hypotheses
> > to this message, as it is fairly long and including it in the body of the
> > message might make it hard to analyze.
> >
> > By the way, the apache2 version is: Server version: Apache/2.4.29 (Ubuntu)
> > Server built:   2022-06-23T12:51:37
> >
> > > On Dec 15, 2022, at 4:12 PM, Frank Gingras <thumbs@xxxxxxxxxx> wrote:
> > >
> > > Consider our wiki article for this:
> > >
> > > https://cwiki.apache.org/confluence/display/HTTPD/CouldNotBindToAddress
> > >
> > > >
> > > > ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
> > > > For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx
> > > >
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
> For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx
>


--
Daniel Ferradal
HTTPD Project
#httpd help at Libera.Chat

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx



[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux