You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Dan Gravell <da...@enigmatec.net> on 2005/01/12 16:33:36 UTC
[users@httpd] Launching Apache "normally" works fine, launching from a Java program
gives "alloc_listener: failed to get a socket for 0.0.0.0"
Strange one this!
I have installed Apache v2.0.52 onto my Windows XP box. Launching it
from the command line and as a service works fine.
When I launch it from a Java class it gives the following:
[Wed Jan 12 15:11:20 2005] [crit] (OS 10106)The requested service
provider could not be loaded or initialized. : alloc_listener: failed
to get a socket for 0.0.0.0
Syntax error on line 120 of C:/Program Files/Apache
Group/Apache2/conf/httpd.conf:
Listen setup failed
With an exit value of "1".
Now I know this isn't a Java mailing list, so I'm not asking for help
with Runtime.exec, however I did wonder if anyone here had any idea what
might cause Apache to be started with perhaps a different environment of
some kind. Reading up on error 10106 it means the networking service
isn't properly installed or is corrupted. I've tried refreshing my TCP
stack and the like, but this wouldn't explain why it works fine when
invoked in a "normal" manner.
Hoping someone might at least have some ideas as to where to start looking.
Thanks,
Dan
---------------------------------------------------------------------
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: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: [users@httpd] Launching Apache "normally" works fine, launching
from a Java program gives "alloc_listener: failed to get a socket for 0.0.0.0"
Posted by Dan Gravell <da...@enigmatec.net>.
After about a day of being frustrated by this, and then noticing
something similar when running wget, my attentions shifted to my own
code. Sure enough, I was not using the Runtime.exec() method correctly.
An argument allows "environment variables" to be specified. Instead of
passing null in, as I should do to inherit the current settings, I was
passing in an empty array. Clearly this blank list of environment
variables means Apache can't work for whatever reason.
Sorry for clogging up the mailing list, but in the faintest likelihood
of anyone seeing similar I thought I'd reply.
Dan
Dan Gravell wrote:
> Strange one this!
>
> I have installed Apache v2.0.52 onto my Windows XP box. Launching it
> from the command line and as a service works fine.
>
> When I launch it from a Java class it gives the following:
>
> [Wed Jan 12 15:11:20 2005] [crit] (OS 10106)The requested service
> provider could not be loaded or initialized. : alloc_listener: failed
> to get a socket for 0.0.0.0
> Syntax error on line 120 of C:/Program Files/Apache
> Group/Apache2/conf/httpd.conf:
> Listen setup failed
>
> With an exit value of "1".
>
> Now I know this isn't a Java mailing list, so I'm not asking for help
> with Runtime.exec, however I did wonder if anyone here had any idea what
> might cause Apache to be started with perhaps a different environment of
> some kind. Reading up on error 10106 it means the networking service
> isn't properly installed or is corrupted. I've tried refreshing my TCP
> stack and the like, but this wouldn't explain why it works fine when
> invoked in a "normal" manner.
>
> Hoping someone might at least have some ideas as to where to start looking.
>
> Thanks,
> Dan
>
>
> ---------------------------------------------------------------------
> 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: users-unsubscribe@httpd.apache.org
> " from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
---------------------------------------------------------------------
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: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: [users@httpd] Launching Apache "normally" works fine, launching
from a Java program gives "alloc_listener: failed to get a socket for 0.0.0.0"
Posted by Dan Gravell <da...@enigmatec.net>.
Thank you for your quick reply. No, Apache is not already running.
The line is:
Listen 80
Where the socket to bind to is configured. I've tried variations, such as:
Listen 127.0.0.1
Listen 127.0.0.1:80
Listen 127.0.0.1:8080
Listen 8080
No luck, and no I don't have anything else using that port!
I've installed the same code on two different boxes and the same thing
happens.
Dan
Aman Raheja wrote:
> I would want to clarify... it seems you are launching apache from java
> code... have you checked that apache is not running before your code
> invokes it...
> also it gives error on a specific line on your config file, what is that
> line - could that help?
> Aman Raheja
>
> Dan Gravell wrote:
>
>> Strange one this!
>>
>> I have installed Apache v2.0.52 onto my Windows XP box. Launching it
>> from the command line and as a service works fine.
>>
>> When I launch it from a Java class it gives the following:
>>
>> [Wed Jan 12 15:11:20 2005] [crit] (OS 10106)The requested service
>> provider could not be loaded or initialized. : alloc_listener: failed
>> to get a socket for 0.0.0.0
>> Syntax error on line 120 of C:/Program Files/Apache
>> Group/Apache2/conf/httpd.conf:
>> Listen setup failed
>>
>> With an exit value of "1".
>>
>> Now I know this isn't a Java mailing list, so I'm not asking for help
>> with Runtime.exec, however I did wonder if anyone here had any idea
>> what might cause Apache to be started with perhaps a different
>> environment of some kind. Reading up on error 10106 it means the
>> networking service isn't properly installed or is corrupted. I've
>> tried refreshing my TCP stack and the like, but this wouldn't explain
>> why it works fine when invoked in a "normal" manner.
>>
>> Hoping someone might at least have some ideas as to where to start
>> looking.
>>
>> Thanks,
>> Dan
>>
>>
>> ---------------------------------------------------------------------
>> 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: users-unsubscribe@httpd.apache.org
>> " from the digest: users-digest-unsubscribe@httpd.apache.org
>> For additional commands, e-mail: users-help@httpd.apache.org
>>
>>
>
>
> ---------------------------------------------------------------------
> 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: users-unsubscribe@httpd.apache.org
> " from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
---------------------------------------------------------------------
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: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: [users@httpd] Launching Apache "normally" works fine, launching
from a Java program gives "alloc_listener: failed to get a socket for 0.0.0.0"
Posted by Aman Raheja <ar...@techquotes.com>.
I would want to clarify... it seems you are launching apache from java
code... have you checked that apache is not running before your code
invokes it...
also it gives error on a specific line on your config file, what is that
line - could that help?
Aman Raheja
Dan Gravell wrote:
> Strange one this!
>
> I have installed Apache v2.0.52 onto my Windows XP box. Launching it
> from the command line and as a service works fine.
>
> When I launch it from a Java class it gives the following:
>
> [Wed Jan 12 15:11:20 2005] [crit] (OS 10106)The requested service
> provider could not be loaded or initialized. : alloc_listener: failed
> to get a socket for 0.0.0.0
> Syntax error on line 120 of C:/Program Files/Apache
> Group/Apache2/conf/httpd.conf:
> Listen setup failed
>
> With an exit value of "1".
>
> Now I know this isn't a Java mailing list, so I'm not asking for help
> with Runtime.exec, however I did wonder if anyone here had any idea
> what might cause Apache to be started with perhaps a different
> environment of some kind. Reading up on error 10106 it means the
> networking service isn't properly installed or is corrupted. I've
> tried refreshing my TCP stack and the like, but this wouldn't explain
> why it works fine when invoked in a "normal" manner.
>
> Hoping someone might at least have some ideas as to where to start
> looking.
>
> Thanks,
> Dan
>
>
> ---------------------------------------------------------------------
> 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: users-unsubscribe@httpd.apache.org
> " from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>
---------------------------------------------------------------------
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: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org