Score:0

nginx and httpd. (99: Cannot assign requested address)

eg flag

i have a dedicated not managed server and use centos7 as OS, after a reboot and a new secondary ssd on my server, the httpd and nginx services no longer start.

the ips configuration was not touched and has been working for two years, the additional ips were added in

/etc/sysconfig/network-scripts

like ifcfg-enInterface:0 ifcfg-enInterface:1 ifcfg-enInterface:2 ifcfg-enInterface:3

with the command ifconfig the extra interfaces not appears enInterface:0...enInterface:3, just the enInterface, lo, docker,etc, but no enInterface:0...enInterface:3

with the ip addr show enInterface:0 command I get a response from the ip configuration, but appears the ip of the main interface enInterface not the ip of enInterface:0

I get the following errors when checking the status of the services:

systemctl status httpd
May 18 10:06:53 srv1.mydomain.com httpd[23715]: (99)Cannot assign requested address: AH00072: make_sock: could not bind to address MYIP:8080

systemctl status nginx
May 18 10:06:53 srv1.mydomain.com nginx[23716]: nginx: [emerg] bind() to MYIP:443 failed (99: Cannot assign requested address)

i modify the httpd.service file to:

After=network.target remote-fs.target nss-lookup.target network-online.target
Wants=network-online.target

and the nginx.service to

After=network-online.target remote-fs.target nss-lookup.target network-online.target
Wants=network-online.target

but the httpd and nginx services still do not start.

i think the problem besides on the extra ips, but the config was not touched

any ideas to up the extras ips enInterface:0,..., enInterface:3

thanks in advance

archygriswald avatar
cn flag
I basically have the same problem right now. After upgrade from Debian 11 to 12 nginx not starting after reboot. (network config was not touched I think, though) I have to manually start nginx: `systemctl start nginx`, then it works. Any insight to this would really be apprieciated.
djdomi avatar
za flag
show the output of `lsof -i :8080`
juanbits avatar
eg flag
@djdomi the output of that command is empty
djdomi avatar
za flag
then show the complete nginx and apache configuration included with the vhosts and by the way, fix the question, only one issue at a time, as you stated the Webservers seems not to start
djdomi avatar
za flag
by the way, since I read the question in a silent moment, there are multiple questions in here. so please update the question due a possible [x and y problem](https://faq-database.de/doku.php?id=en:x-and-y-problem)
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.