Re: Apache config problem .. please help
Anyway, all this started from an attempt to access env. vars from legacy scripts running under registry. What is the easiest way to get env. var access without the accompanying performance penalty that mod_perl documentation talks about? If you need to have your scripts run unmodified, have PerlSetupEnv Off in all sections that you don't need to access the CGI env vars, and have it On only in those Locations that run legacy scripts. http://perl.apache.org/search/swish.cgi?query=PerlSetupEnvsbm=SecEsubmit=search __ Stas BekmanJAm_pH -- Just Another mod_perl Hacker http://stason.org/ mod_perl Guide --- http://perl.apache.org mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com http://modperlbook.org http://apache.org http://ticketmaster.com
Re: Apache config problem .. please help
I made a simple mod_perl change to the config and when restarting Apache I got this error: (98)Address already in use: make_sock: could not bind to address 0.0.0.0:2250 no listening sockets available, shutting down /usr/local/apache/bin/apachectl: line 87: 16512 Segmentation fault $HTTPD $ARGV I then backed out the change and retried, got the same error. killall httpd then try it again :) Dennis
Re: Apache config problem .. please help
Hi there, On Thu, 3 Jul 2003, Dennis Stout wrote: I made a simple mod_perl change to the config and when restarting Apache I got this error: (98)Address already in use: make_sock: could not bind to address 0.0.0.0:2250 no listening sockets available, shutting down /usr/local/apache/bin/apachectl: line 87: 16512 Segmentation fault $HTTPD $ARGV I then backed out the change and retried, got the same error. killall httpd then try it again :) In other words there's an Apache still running when you're trying to start a second one which wants to listen on the same socket that the first Apache is already listening on. That isn't permitted. But you shouldn't be getting segmentation faults in that case so something else is probably wrong too. Did you build from source? Did you follow the instructions in the Guide? Linux? 1.3.27/1.27? DSO? Maybe you can post the information requested in the docs? 73, Ged.
Re: Apache config problem .. please help
Ged Haywood wrote: Hi there, On Thu, 3 Jul 2003, Dennis Stout wrote: I made a simple mod_perl change to the config and when restarting Apache I got this error: (98)Address already in use: make_sock: could not bind to address 0.0.0.0:2250 no listening sockets available, shutting down /usr/local/apache/bin/apachectl: line 87: 16512 Segmentation fault $HTTPD $ARGV I then backed out the change and retried, got the same error. killall httpd then try it again :) httpd was not running and I have been running Apache 2x with mod_perl 1.99x for over two months now. It started with a problem I traced to env. var $ENV{HTTP_ACCEPT}. I figured out that I needed PerlOptions +SetupENV. So I added this, stopped and tried to start Apache. That's when I got this shock. In other words there's an Apache still running when you're trying to start a second one which wants to listen on the same socket that the first Apache is already listening on. That isn't permitted. But you shouldn't be getting segmentation faults in that case so something else is probably wrong too. Did you build from source? Did you follow the instructions in the Guide? Linux? 1.3.27/1.27? DSO? Maybe you can post the information requested in the docs? 73, Ged. The 'top' output is : 3:38am up 8 days, 22:58, 1 user, load average: 0.00, 0.00, 0.00 22 processes: 21 sleeping, 1 running, 0 zombie, 0 stopped CPU states: 0.0% user, 0.3% system, 0.0% nice, 99.6% idle Mem: 970768K av, 212504K used, 758264K free,7852K shrd, 98668K buff Swap: 530104K av,3216K used, 526888K free 88104K cached PID USER PRI NI SIZE RSS SHARE STAT %CPU %MEM TIME COMMAND 16688 kairanga 10 0 996 996 800 R 0.3 0.1 0:00 top 1 root 0 076 6448 S 0.0 0.0 0:10 init 2 root 0 0 00 0 SW0.0 0.0 0:00 kflushd 3 root 8 0 00 0 SW0.0 0.0 34:03 kupdate 4 root 0 0 00 0 SW0.0 0.0 9:07 kswapd 5 root 0 0 00 0 SW0.0 0.0 0:00 keventd 57 root 0 0 232 232 0 S 0.0 0.0 0:00 rc.M 77 root 2 0 272 272 160 S 0.0 0.0 2:20 syslogd 80 root 0 0 640 640 128 S 0.0 0.0 0:00 klogd 82 root 0 0 368 324 220 S 0.0 0.0 0:04 sshd 86 root 6 0 336 336 240 S 0.0 0.0 0:00 crond 93 root 2 0 692 488 292 S 0.0 0.0 0:03 sendmail 100 root 0 0 2352 1708 936 S 0.0 0.1 0:07 poprelayd 102 root 0 0 2668 1248 292 S 0.0 0.1 0:00 miniserv.pl 104 root 0 0 220 168 148 S 0.0 0.0 0:00 inetd 105 root 0 0 184 184 0 S 0.0 0.0 0:00 safe_mysqld 127 mysql 0 0 2384 2384 1364 S 0.0 0.2 0:00 mysqld 129 mysql 0 0 2384 2384 1364 S 0.0 0.2 0:00 mysqld 130 mysql 0 0 2384 2384 1364 S 0.0 0.2 0:00 mysqld 16316 root 0 0 1284 1268 1124 S 0.0 0.1 0:00 sshd 16318 kairanga 0 0 1364 1352 1208 S 0.0 0.1 0:00 sshd 16319 kairanga 3 0 1240 1240 964 S 0.0 0.1 0:00 bash There has been no change to Apache httpd.conf other than the addition of PerlOptions +SetupEnv which I commented out anyway. How can I get a list of ports being used so I can kill the processes? As far as I can tell httpd is not running. The IP is 208.179.25.28 I dont see any apparent signs of hacking either.
RE: Apache config problem .. please help
You can use netstat -a to list all the ports in use--look for your configured port or 'http' you might wanna try ps -ef | grep http to search for a process not in top's display (can you see all? Try setting n=100 and expanding xterm (if using one)). If 'ps -ef | grep http' returns nothing check to make sure your PID file isn't still there. Most likely /usr/local/apache/logs/httpd.pid . If it is there and you're sure httpd's not running remove the file and try /usr/local/apache/bin/apachectl stop /usr/local/apache/bin/apachectl start good luck, bill -Original Message- From: Ranga Nathan [mailto:[EMAIL PROTECTED] Sent: Thursday, July 03, 2003 1:51 PM Cc: mod_perl Mailing List Subject: Re: Apache config problem .. please help Ged Haywood wrote: Hi there, On Thu, 3 Jul 2003, Dennis Stout wrote: I made a simple mod_perl change to the config and when restarting Apache I got this error: (98)Address already in use: make_sock: could not bind to address 0.0.0.0:2250 no listening sockets available, shutting down /usr/local/apache/bin/apachectl: line 87: 16512 Segmentation fault $HTTPD $ARGV I then backed out the change and retried, got the same error. killall httpd then try it again :) httpd was not running and I have been running Apache 2x with mod_perl 1.99x for over two months now. It started with a problem I traced to env. var $ENV{HTTP_ACCEPT}. I figured out that I needed PerlOptions +SetupENV. So I added this, stopped and tried to start Apache. That's when I got this shock. In other words there's an Apache still running when you're trying to start a second one which wants to listen on the same socket that the first Apache is already listening on. That isn't permitted. But you shouldn't be getting segmentation faults in that case so something else is probably wrong too. Did you build from source? Did you follow the instructions in the Guide? Linux? 1.3.27/1.27? DSO? Maybe you can post the information requested in the docs? 73, Ged. The 'top' output is : 3:38am up 8 days, 22:58, 1 user, load average: 0.00, 0.00, 0.00 22 processes: 21 sleeping, 1 running, 0 zombie, 0 stopped CPU states: 0.0% user, 0.3% system, 0.0% nice, 99.6% idle Mem: 970768K av, 212504K used, 758264K free,7852K shrd, 98668K buff Swap: 530104K av,3216K used, 526888K free 88104K cached PID USER PRI NI SIZE RSS SHARE STAT %CPU %MEM TIME COMMAND 16688 kairanga 10 0 996 996 800 R 0.3 0.1 0:00 top 1 root 0 076 6448 S 0.0 0.0 0:10 init 2 root 0 0 00 0 SW0.0 0.0 0:00 kflushd 3 root 8 0 00 0 SW0.0 0.0 34:03 kupdate 4 root 0 0 00 0 SW0.0 0.0 9:07 kswapd 5 root 0 0 00 0 SW0.0 0.0 0:00 keventd 57 root 0 0 232 232 0 S 0.0 0.0 0:00 rc.M 77 root 2 0 272 272 160 S 0.0 0.0 2:20 syslogd 80 root 0 0 640 640 128 S 0.0 0.0 0:00 klogd 82 root 0 0 368 324 220 S 0.0 0.0 0:04 sshd 86 root 6 0 336 336 240 S 0.0 0.0 0:00 crond 93 root 2 0 692 488 292 S 0.0 0.0 0:03 sendmail 100 root 0 0 2352 1708 936 S 0.0 0.1 0:07 poprelayd 102 root 0 0 2668 1248 292 S 0.0 0.1 0:00 miniserv.pl 104 root 0 0 220 168 148 S 0.0 0.0 0:00 inetd 105 root 0 0 184 184 0 S 0.0 0.0 0:00 safe_mysqld 127 mysql 0 0 2384 2384 1364 S 0.0 0.2 0:00 mysqld 129 mysql 0 0 2384 2384 1364 S 0.0 0.2 0:00 mysqld 130 mysql 0 0 2384 2384 1364 S 0.0 0.2 0:00 mysqld 16316 root 0 0 1284 1268 1124 S 0.0 0.1 0:00 sshd 16318 kairanga 0 0 1364 1352 1208 S 0.0 0.1 0:00 sshd 16319 kairanga 3 0 1240 1240 964 S 0.0 0.1 0:00 bash There has been no change to Apache httpd.conf other than the addition of PerlOptions +SetupEnv which I commented out anyway. How can I get a list of ports being used so I can kill the processes? As far as I can tell httpd is not running. The IP is 208.179.25.28 I dont see any apparent signs of hacking either. CONFIDENTIALITY NOTICE: This E-Mail is intended only for the use of the individual or entity to which it is addressed and may contain information that is privileged, confidential and exempt from disclosure under applicable law. If you have received this communication in error, please do not distribute and delete the original message. Please notify the sender by E-Mail at the address shown. Thank you for your compliance.
Re: Apache config problem .. please help
I know this is not of much help, but I have had situations where a badly terminating process would prevent subsequent processes from using that port. on windows, i never found a solution other than to reboot. on solaris 7, i never found a solution other than to wait 8 minutes. I did some reading and found socket inet options to change how such programs bound thge port so as to allow others to use it in more friendly a fashion but such a change wasnt possible with the process in question. -- gedanken
Re: Apache config problem .. please help
Hi there, On Thu, 3 Jul 2003, Ranga Nathan wrote: In other words there's an Apache still running The 'top' output is : [snip] How can I get a list of ports being used so I can kill the processes? As I said, there may be more wrong than just what's obvious. It looks like the obvious explanation that another Apache is running is not the right one. At the risk of asking questions I wouldn't have to ask if you'd posted the information I asked for, why port 2205? That's not what I'd expect to see, but without more information I'm groping about in the dark. What's trying to use that port? MySQL perhaps? Why not stop it first, or change the port that Apache is trying to use, or the port that whatever apachectl is trying to start is trying to use, or... As far as I can tell httpd is not running. The IP is 208.179.25.28 c2h5oh:~$ ping 208.179.25.28 PING 208.179.25.28 (208.179.25.28): 56 data bytes 64 bytes from 208.179.25.28: icmp_seq=0 ttl=236 time=389.6 ms --- 208.179.25.28 ping statistics --- 2 packets transmitted, 1 packets received, 50% packet loss round-trip min/avg/max = 389.6/389.6/389.6 ms c2h5oh:~$ telnet 208.179.25.28 80 Trying 208.179.25.28... telnet: Unable to connect to remote host: Connection refused Looks like you're right. Have you read the stuff I mentioned? I dont see any apparent signs of hacking either. Don't go tilting at windmills just yet. :) 73, Ged.
Re: Apache config problem .. please help
Gedanken wrote: I know this is not of much help, but I have had situations where a badly terminating process would prevent subsequent processes from using that port. on windows, i never found a solution other than to reboot. on solaris 7, i never found a solution other than to wait 8 minutes. I did some reading and found socket inet options to change how such programs bound thge port so as to allow others to use it in more friendly a fashion but such a change wasnt possible with the process in question. The problem is resolved. Unbenownst to me - I need to investigate this - the Listen IP:port line in Apache had the wrong IP address. I really dont know how this happened. The number is so different yet syntactically correct to be a keystroke error. Thanks everyone for pitching in. For one I can now use ' netstat' utility to check ports being used,. Thanks Ged! I keep talking to my corporate IT people about open source , and they constantly ask me 'who will support it? what do they get out of it?' . I can not even begin to explain to them the 'connectedness' across the 'net. Should people always measure everything in terms of money? Anyway, all this started from an attempt to access env. vars from legacy scripts running under registry. What is the easiest way to get env. var access without the accompanying performance penalty that mod_perl documentation talks about? Regards