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. Any clues?
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
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
Re: [ANNOUNCE] Practical mod_perl is out!
Geoffrey Young wrote: well, the (long) wait is now over - Practical mod_perl is here. weighing in at a whopping 924 pages, Practical mod_perl really needs no introduction for those that are already familiar with the mod_perl Guide. however, from the ORA catalog description: From writing and debugging scripts to keeping your server running without failures, the techniques in this book will help you squeeze every ounce of power out of your server. True to its title, this is the practical guide to mod_perl. O'Reilly has a sample chapter online http://www.oreilly.com/catalog/pmodperl/chapter/ch06.pdf the book's official website is http://www.modperlbook.org/ where you will find links to ways to purchse the book. kudos Stas and Eric! --Geoff I have a mod_perl book but I am looking forward to one that includes mod_perl. I believe, corporate IT should take a serious look at using mod_perl. It is time for the heads to come out of the sand. I am interested in creating a presentation for my employer. I need information that reeks (yes I want it to stink) with credibility. Any pointers in this regard is welcome.
Re: Large Data Set In Mod_Perl
Perrin Harkins wrote: simran wrote: I need to be able to say: * Lookup the _distance_ for the planet _mercury_ on the date _1900-01-01_ On the face of it, a relational database is best for that kind of query. However, if you won't get any fancier than that, you can get by with MLDBM or something similar. Currently i do this using a postgres database, however, my question is, is there a quicker way to do this in mod_perl - would a DB_File or some other structure be better? Query speed comes into question only when there is a heavy use. Postgress has an 'Explain' facility via pgsql. Just add Explain before the query and you will get the cost of the query. By creating proper indexes you can get good optimization. What if you add a table later and you need to join that with the planet table? If you keep your planet data somewhere else, then the access becomes cumbersome as well as slower. There are many ways to speed up Postgresql. I recommend the Posgresql book by Korryand Susan Douglas. I got it from Barnes and Nobles. IMHO stay with the relational database you are on and find ways to optimize. A DBM file will be faster. What you can do is build a key out of planet + date, so that you grab the right record with a single access. Either use MLDBM for storing hashes inside each record, or just a simple join/split approach. This would be a good idea if you are implementing your tool and you know what limitations you will be subjected to. MySQL would probably also be faster than PostgreSQL for this kind of simple read-only querying, but not as fast as a DBM file. SDBM_File is the fastest DBM around, if you can live with the space limitations it has. perhaps something such as copying the whole 800,000 rows to memory (as a hash?) on apache startup? Postgresql may have a way to 'stick' a table in memory like MySQL. That would be the fastest by far, but it will use a boatload of RAM. It's pretty easy to try, so test it and see if you can spare the RAM it requires. - Perrin