You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Stas Bekman <st...@stason.org> on 2004/03/06 05:33:18 UTC

Re: [RELEASE CANDIDATE] please test mod_perl-1.99_13-dev.tar.gz: make test failes on solaris 9

Jie Gao wrote:
> SunOS banquo 5.9 Generic_112233-11 sun4u sparc
> 
> Apache/2.0.48 mod_perl/1.99_13-dev Perl/v5.8.3 (threaded)
> 
> Make test fails:
> 
> % gmake test
> ...
> [warning] root mode: changing the files ownership to 'nobody' (60001:60001)
> [warning] testing whether 'nobody' is able to -rwx /u0/local/src/mod_perl-1.99_13-dev/t
> /usr/local/perl-5.8.3_threaded/bin/perl -Mlib=/u0/local/src/mod_perl-1.99_13-dev/Apache-Test/lib
> -MApache::TestRun -e 'eval { Apache::TestRun::run_root_fs_test(60001, 60001,
> q[/u0/local/src/mod_perl-1.99_13-dev/t]) }';
> 
> 
> [warning] result: OK
> /usr/local/apache_2.0.48/bin/httpd -d /u0/local/src/mod_perl-1.99_13-dev/t -f
> /u0/local/src/mod_perl-1.99_13-dev/t/conf/httpd.conf -D APACHE2 -D PERL_USEITHREADS
> using Apache/2.0.48 (worker MPM)
> 
> waiting 300 seconds for server to start: .....[Sat Mar 06 15:12:30 2004] [info] 27 Apache:: modules loaded
> [Sat Mar 06 15:12:30 2004] [info] 5 APR:: modules loaded
> [Sat Mar 06 15:12:30 2004] [info] base server + 16 vhosts ready to run tests
> ..(126)Cannot assign requested address: make_sock: could not bind to address [::1]:8549
> no listening sockets available, shutting down
> Unable to open logs

Are you sure you aren't already running mod_perl at ports 8529 and 8549? Do:

ps auxc | grep httpd

and kill any running httpd processes (of course not productional ones ;) It 
starts at 8549, after finding the port 8529 busy.

I also assume that you are running on ipv6, because of [::1]:8549

I should have reminded that any problem reports must follow the guidelines 
from: http://perl.apache.org/bugs/

Thanks!

__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com

-- 
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html


Re: [RELEASE CANDIDATE] please test mod_perl-1.99_13-dev.tar.gz: make test failes on solaris 9

Posted by Stas Bekman <st...@stason.org>.
Jie Gao wrote:
[...]
>>That's great, Jie. Could you rewrite it not to use any external applications,
>>but pure perl? The problem with external apps is that args and location vary
>>from platform to platfrom and even from one release to another. Also using
>>perl we won't need to write a separate implementation for each platform. e.g.
>>$^O tells you the OS name. Not sure what's the best way to implement a quick
>>simple ping, CPAN has a few implementations but if we can avoid creating extra
>>dependencies at this level that would be great. Perhaps creating a pair of
>>sockets (local and INET) could make for a quick test.
> 
> 
> This problem is Solaris (8, 9) specific, and "uname" and "ping" hardly
> changes at all, and in fact, they _should_ not change its existing
> behaviour at all, otherwise it will break a lot of things for sure.

we both know that "should" and the reality don't always match. But the real 
thing I'm trying to solve is not to write a separate branch for each supported 
OS, but have one piece of code that checks them all. Granted we can have a 
hash of hints to resolve the problem suited for each platform. So please bear 
with me.

> So this should work (for a long time to come):
> 
> if ($^O eq 'solaris') {
>     my $release = `/bin/uname -r`;

can't you get this info from Config.pm?

% perl -le 'use Config; print $Config{osvers}'
2.6.0-1mdkenterprise

>     chomp $release;
>     if (defined $release && $release >= 5.8) {
>         my $ret = 0xffff & system('/usr/sbin/ping localhost 3 > /dev/null 2>&1');

and /usr/sbin is not in the normal user's PATH? If it is I'd prefer to call 
Apache::Util::which('ping'). or may be someone can contibute a lightweighted 
tcp ping implementation based on the core modules (w/o creating extra deps on 
CPAN modules).

>         unless ($ret == 0) {
>             print "localhost is down. Please check your loopback interface. Look into /etc/inet/ipnodes, and if you are not using IPv6, comment out the line \"::1  localhost\" and try this test again.\n";
>         }

So I'd like to see this generic test:

1) which ping
2) run ping if found
3) if failed print a generic error message (e.g. can't resolve 'localhost') or 
a custom one if exists (like you added above).

Ideally I'd love to see 1+2 replaced with a pure perl tcp ping implementation.

__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com

-- 
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html


Re: [RELEASE CANDIDATE] please test mod_perl-1.99_13-dev.tar.gz: make test failes on solaris 9

Posted by Stas Bekman <st...@stason.org>.
Jie Gao wrote:
> 
> 
> On Sat, 6 Mar 2004, Stas Bekman wrote:
> 
> 
>>Date: Sat, 06 Mar 2004 15:25:35 -0800
>>From: Stas Bekman <st...@stason.org>
>>To: Jie Gao <ji...@mail.usyd.edu.au>
>>Cc: mod_perl Mailing List <mo...@perl.apache.org>
>>Subject: Re: [RELEASE CANDIDATE] please test mod_perl-1.99_13-dev.tar.gz:
>>    make test failes on solaris 9
>>
>>Jie Gao wrote:
>>[...]
>>
>>>I've got it work. What I did was to comment out the ipv6 entry in Solaris's
>>>Internet host table:
>>>
>>>% more /etc/inet/ipnodes
>>>#
>>># Internet host table
>>>#
>>>#::1            localhost
>>>127.0.0.1       localhost
>>>
>>>/etc/nsswitch.conf has the following as default:
>>>
>>>ipnodes:    files
>>>
>>>Nevertheless, it seems some system call was used not correctly to resolve
>>>an IPv4 address.
>>
>>Very good, Jie. Any idea how we could test at the test configuration time
>>whether your ipv6 config is proper and that the resolving will work during the
>>test time? let's say you unedit that file. Could you adjust A-T to figure
>>things out, or at least suggest to the user what's wrong?
> 
> 
> Solaris claims IPv6 is off by default; so this one is a bug. There are a couple
> of ways of getting around this on Solaris in your test script:
> 
> 1. Use 127.0.0.1 instead of localhost. IPv6's use is very rare anyway.

That's changing quickly. We get more and more reports because of ipv6.

> 2. Ping localhost. If it fails, ask the user to check the loopback interface,
>   with the suggestion that /etc/inet/ipnodes should be checked:
> 
> ---------------------------------------------------------------------------
> my $sys_name = `/bin/uname -s`;
>    chomp $sys_name;
> 
> if (defined $sys_name && $sys_name eq 'SunOS') {
>     my $release = `/bin/uname -r`;
>     chomp $release;
>     if (defined $release && $release >= 5.8) {
>         my $ret = 0xffff & system('/usr/sbin/ping localhost 3 > /dev/null 2>&1');
>         unless ($ret == 0) {
>             print "localhost is down. Please check your loopback interface. Look into /etc/inet/ipnodes and
> if you are not using IPv
> 6, comment out the line \"::1  localhost\" and try this test again.\n";
> 
>         }
>     }
> }

That's great, Jie. Could you rewrite it not to use any external applications, 
but pure perl? The problem with external apps is that args and location vary 
from platform to platfrom and even from one release to another. Also using 
perl we won't need to write a separate implementation for each platform. e.g. 
$^O tells you the OS name. Not sure what's the best way to implement a quick 
simple ping, CPAN has a few implementations but if we can avoid creating extra 
dependencies at this level that would be great. Perhaps creating a pair of 
sockets (local and INET) could make for a quick test.

__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com

-- 
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html


Re: [RELEASE CANDIDATE] please test mod_perl-1.99_13-dev.tar.gz: make test failes on solaris 9

Posted by Stas Bekman <st...@stason.org>.
Jie Gao wrote:
[...]
> I've got it work. What I did was to comment out the ipv6 entry in Solaris's
> Internet host table:
> 
> % more /etc/inet/ipnodes
> #
> # Internet host table
> #
> #::1            localhost
> 127.0.0.1       localhost
> 
> /etc/nsswitch.conf has the following as default:
> 
> ipnodes:    files
> 
> Nevertheless, it seems some system call was used not correctly to resolve
> an IPv4 address.

Very good, Jie. Any idea how we could test at the test configuration time 
whether your ipv6 config is proper and that the resolving will work during the 
test time? let's say you unedit that file. Could you adjust A-T to figure 
things out, or at least suggest to the user what's wrong?

> BTW, the flags "-Ir" were illegal for Solaris's grep, and using grep without
> these flags returned nothing.

each Unix-flavor OS reinvents their own flags for the common apps :(

__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com

-- 
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html


Re: [RELEASE CANDIDATE] please test mod_perl-1.99_13-dev.tar.gz: make test failes on solaris 9

Posted by Stas Bekman <st...@stason.org>.
> OK, here you are:

Thanks, Jie. So we are on Solaris. It doesn't sound like a mod_perl problem, 
but Apache and/or Apache-Test's one.

> [Sat Mar 06 15:41:32 2004] [info] base server + 16 vhosts ready to run tests
> ...(126)Cannot assign requested address: make_sock: could not bind to address [::1]:8549
> no listening sockets available, shutting down
> Unable to open logs


Please try the following:

1) If it reports port 8549, that means that your port 8529 is not available. 
Please check with netstat or whatever it is on Solaris who holds port 8529.

2) Can you start Apache on itself?

3) Can you test Apache-Test (see another announce I did at the same time as 
this one)?

4) Please post the output of:

grep -Ir 8549 t/conf/

this [::1]:8549 looks suspicios if you are on ipv4.

5) If none of the above helps please try to revert this patch:
http://marc.theaimsgroup.com/?l=apache-modperl-cvs&m=107739532515332&w=2


__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com

-- 
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html


Re: [RELEASE CANDIDATE] please test mod_perl-1.99_13-dev.tar.gz: make test failes on solaris 9

Posted by Stas Bekman <st...@stason.org>.
Jie Gao wrote:

>>I also assume that you are running on ipv6, because of [::1]:8549
> 
> 
> Ah! That could be the problem, as I am _not_ running on ipv6: no ipv6
> interfaces are up or even configured. How did the test get it?

Sorry, Jie I can't do any guesses before you post a proper bug report.

>>I should have reminded that any problem reports must follow the guidelines
>>from: http://perl.apache.org/bugs/

-- 
__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com

-- 
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html