Debian Stable with Apache 2.0.54 (Dreamhost dedicated server)
I'm kind of stuck here and need some fresh ideas. Sorry if this is a
bit long.
I have a front/back (reverse proxy) server setup. I have an init.d
script that starts both servers.
The front end server listens on ports 82 and 1443 (SSL), and reverse
proxies to ports 10082 and 11443 on the back end server.
Upon a reboot only the back-end server starts. The front end server
exits with the error saying it cannot bind to port 1443. Here's what
I see in my boot log:
Cannot assign requested address: make_sock: could not bind
to address 208.97.158.169:1443
no listening sockets available, shutting down
Unable to open logs
Why can't it bind to port 1443? Because the port is inuse? But it
doesn't seem to be in use.
So I run iptables and netstat right before and right after trying to
start Apache, but I don't see anything that would prevent binding to
port 1443. See logs below.
So what's preventing Apache from binding to that port?
Now, if right after I boot I go in and run the init.d script manually
the server starts up without any problem. I.e.:
sudo /etc/init.d/ifp_httpd start
Then the front end server starts and binds to port 82 and 1443.
The init.d script starts late in the boot process:
$ ls -1 /etc/rc2.d/ | tail
S21quotarpc
S23ntp-server
S25mdadm
S30sysctl
S89cron
S91ifp_httpd <<<<<---- here's the init.d script
S99jabber
S99stop-bootlogd
S99ud
Here's the log where I run netstat -ntlp, netstat -ntp, iptables -L
right before and right after starting apache for both the front and
back servers. You can see there's nothing listening or using port
1443.
The script first (attempts) to start the "front" server on ports
82/1443. Then it starts the "back" server on the high ports.
Before doing this in both cases netstat and iptables is run.
ifp_httpd: start: ---- BEFORE STARTING APACHE ----
listening ports
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State
PID/Program name
tcp 0 0 0.0.0.0:802 0.0.0.0:* LISTEN
1468/rpc.statd
tcp 0 0 0.0.0.0:5666 0.0.0.0:* LISTEN
1413/inetd
tcp 0 0 0.0.0.0:79 0.0.0.0:* LISTEN
1413/inetd
tcp 0 0 0.0.0.0:111 0.0.0.0:* LISTEN
1246/portmap
tcp 0 0 0.0.0.0:113 0.0.0.0:* LISTEN
1422/oidentd
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN
1464/sshd
tcp 0 0 0.0.0.0:23 0.0.0.0:* LISTEN
1413/inetd
tcp 0 0 127.0.0.1:5432 0.0.0.0:* LISTEN
1435/postmaster
connections
Active Internet connections (w/o servers)
Proto Recv-Q Send-Q Local Address Foreign Address State
PID/Program name
iptables
Chain INPUT (policy ACCEPT)
target prot opt source destination
Chain FORWARD (policy ACCEPT)
target prot opt source destination
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
/usr/sbin/apache2 -k start -f
/home/moseley/WS2/server_root/test_production/front_httpd.conf
Server on port 82/1443
Apache start for front/test_production: (99)Cannot assign requested address:
make_sock: could not bind to address 208.97.158.169:1443
no listening sockets available, shutting down
Unable to open logs
Failed
--- AFTER STARTING APACHE ---
listening ports
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State
PID/Program name
tcp 0 0 0.0.0.0:802 0.0.0.0:* LISTEN
1468/rpc.statd
tcp 0 0 0.0.0.0:5666 0.0.0.0:* LISTEN
1413/inetd
tcp 0 0 0.0.0.0:79 0.0.0.0:* LISTEN
1413/inetd
tcp 0 0 0.0.0.0:111 0.0.0.0:* LISTEN
1246/portmap
tcp 0 0 0.0.0.0:113 0.0.0.0:* LISTEN
1422/oidentd
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN
1464/sshd
tcp 0 0 0.0.0.0:23 0.0.0.0:* LISTEN
1413/inetd
tcp 0 0 127.0.0.1:5432 0.0.0.0:* LISTEN
1435/postmaster
connections
Active Internet connections (w/o servers)
Proto Recv-Q Send-Q Local Address Foreign Address State
PID/Program name
ifp_httpd: start: ---- BEFORE STARTING APACHE ----
listening ports
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State
PID/Program name
tcp 0 0 0.0.0.0:802 0.0.0.0:* LISTEN
1468/rpc.statd
tcp 0 0 0.0.0.0:5666 0.0.0.0:* LISTEN
1413/inetd
tcp 0 0 0.0.0.0:79 0.0.0.0:* LISTEN
1413/inetd
tcp 0 0 0.0.0.0:111 0.0.0.0:* LISTEN
1246/portmap
tcp 0 0 0.0.0.0:113 0.0.0.0:* LISTEN
1422/oidentd
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN
1464/sshd
tcp 0 0 0.0.0.0:23 0.0.0.0:* LISTEN
1413/inetd
tcp 0 0 127.0.0.1:5432 0.0.0.0:* LISTEN
1435/postmaster
connections
Active Internet connections (w/o servers)
Proto Recv-Q Send-Q Local Address Foreign Address State
PID/Program name
iptables
Chain INPUT (policy ACCEPT)
target prot opt source destination
Chain FORWARD (policy ACCEPT)
target prot opt source destination
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
/usr/sbin/apache2 -k start -f
/home/moseley/WS2/server_root/test_production/back_httpd.conf
Server on port 10082/11443
Apache start for back/test_production: ok
--- AFTER STARTING APACHE ---
listening ports
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State
PID/Program name
tcp 0 0 127.0.0.1:10082 0.0.0.0:* LISTEN
1505/apache2
tcp 0 0 0.0.0.0:802 0.0.0.0:* LISTEN
1468/rpc.statd
tcp 0 0 0.0.0.0:5666 0.0.0.0:* LISTEN
1413/inetd
tcp 0 0 0.0.0.0:79 0.0.0.0:* LISTEN
1413/inetd
tcp 0 0 0.0.0.0:111 0.0.0.0:* LISTEN
1246/portmap
tcp 0 0 0.0.0.0:113 0.0.0.0:* LISTEN
1422/oidentd
tcp 0 0 127.0.0.1:11443 0.0.0.0:* LISTEN
1505/apache2
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN
1464/sshd
tcp 0 0 0.0.0.0:23 0.0.0.0:* LISTEN
1413/inetd
tcp 0 0 127.0.0.1:5432 0.0.0.0:* LISTEN
1435/postmaster
connections
Active Internet connections (w/o servers)
Proto Recv-Q Send-Q Local Address Foreign Address State
PID/Program name
--
Bill Moseley
[EMAIL PROTECTED]
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: [EMAIL PROTECTED]
" from the digest: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]