Skip to content

Change Apache listen port in ports.conf for Debian#77

Open
btravouillon wants to merge 1 commit intogalaxyproject:mainfrom
btravouillon:fix/upstream_cvmfs_apache_conf_file
Open

Change Apache listen port in ports.conf for Debian#77
btravouillon wants to merge 1 commit intogalaxyproject:mainfrom
btravouillon:fix/upstream_cvmfs_apache_conf_file

Conversation

@btravouillon
Copy link
Contributor

@btravouillon btravouillon commented Apr 13, 2025

The Listen configuration is in /etc/apache2/ports.conf in Debian-based systems. From what I can tell, this has been true at least since Debian 4.0 (Etch).

Without this change, the Listen configuration is as below on a Debian host:

cvmfs-s1:~$ grep -r Listen /etc/apache2/
/etc/apache2/ports.conf:Listen 80
/etc/apache2/ports.conf:	Listen 443
/etc/apache2/ports.conf:	Listen 443
/etc/apache2/apache2.conf:Listen 8008

For every reboot there is a race between squid and apache2 to get listening on port 80.. That's not an issue when apache2 starts first, however this breaks the Stratum 1 when squid starts first.

When apache2 starts first, squid fails to start.

cvmfs-s1:~$ sudo journalctl -u squid|grep commBind
Apr 08 14:18:38 cvmfs-s1 squid[1674511]: commBind Cannot bind socket FD 12 to [::]:80: (98) Address already in use

When squid starts first, apache2 fails to start:

cvmfs-s1:~$ sudo journalctl -u apache2 | grep 'could not bind to'
Apr 13 11:33:10 cvmfs-s1 apachectl[81243]: (98)Address already in use: AH00072: make_sock: could not bind to address [::]:80
Apr 13 11:33:10 cvmfs-s1 apachectl[81243]: (98)Address already in use: AH00072: make_sock: could not bind to address 0.0.0.0:80

The Listen configuration is in /etc/apache2/ports.conf in Debian-based
systems. From what I can tell, this has been true at least since Debian
4.0 (Etch).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant