Duplicate Socket Address when creating new server

1 post / 0 new
#1 Sat, 07/05/2014 - 07:15
lostandfound

Duplicate Socket Address when creating new server

Every time I create a new a server Apache(httpd) fails to restart and produces the error:

Failed to start service :
Starting httpd: (98)Address already in use: make_sock: could not bind to address [1a01:1a1:1:1111::1a11:1111]:8080
no listening sockets available, shutting down
Unable to open logs
[FAILED]

To fix this I go Virtualmin>Webmin>Servers>Apache Webserver>Global Configuration>Networking & Addresses:

Here it is easy to spot the problem as under: Listen on addresses and ports there is a duplicate listing for the IPV6 address. Removing the entry line and setting the line to "None" fixes things and Apache can be restarted and runs normally.

I had been creating new servers from templates and thought the template had an incorrect entry somewhere but had been unable to spot and would always give up searching as there was an easy fix.

Now, however, I am creating servers using the incredible Virtualmin cli clone/ duplicate feature (which is awesome!!!!) . Creating new servers this way causes the duplicate entry in addresses.

While the fix takes seconds, Apache stopping like that means current sessions on the server are terminated and that is a bit of an issue.

I have tried to find duplicate entries of but have been unable to. In the global httpd.conf I have

Listen 99.999.99.9:8080
Listen 1A01:1A1:1:1010::99.999.99.9:8080
Listen *:443

I have Varnish running on the server hence the 8080. Also I have obviously change the IP addresses.

Any suggestions?