Hello Patrik,

The problem with this behaviour, is with how the ServerSocket class
handles this. When you want a Java ServerSocket to bind to all IP's, you
use the special 0.0.0.0 IP address. This works fine normally.

However, if there is one IP being used, for example by IIS, the creation
of the ServerSocket will fail, so there's no point in having Orion
running since no ServerSocket is created.

As far as I know (I could be wrong), 0.0.0.0 should actually mean "all
available" IP:s and deal with the situation fine, but obviously it
doesn't in your case. I can't say for sure, but this could be a jvm bug
or something similar.

Now you might say, if 0.0.0.0 fails, you can open 1 ServerSocket per
available IP and not care about the IP:s it can get. Besides the
possible performance issues, the problem with this is how to actually
get a collection of all available IP:s on a box. The obvious way to do
it would be to use
InetAddress.getAllByName(InetAddress.getLocalHost().getHostName());

That should return an array of all IP:s, but unfortunately it doesn't on
certain systems. This could be an issue with how these systems resolve
localhost.

We are looking for a way to solve this, and there might be a way to work
around it in a portable way and if there is, we'll implement it.

If we don't find a work-around we'll mail Sun to ask about it since you
want it. But I have to warn you that this could be outside our control
to get a quick fix.

Regards,
Karl Avedal

Patrik Andersson wrote:

>
>
> I know all that. But that doesn't help that orion won't start if there
> is another webserver that owns an ip address on port 80 that orion
> tries to use. This has to be a bug. I can accept that orion takes all
> available addresses. But it shouldn't try to use other addresses if
> that means that it doesn't start.
>
> -----Original Message-----
> From: Mike Cannon-Brookes [mailto:[EMAIL PROTECTED]]
> Sent: den 29 juni 2000 16:18
> To: Orion-Interest
> Subject: RE: Orion steeling IP addresses.
>
> This is defined in your web-site file in the config directory. The
> default
> is IP="ALL" (obviously because Orion doesn't know your IP). Change
> this to
> whatever IP / block of IPs you want.
>
> Mike
>
> Member of The "Unofficial" Friends of Orion Support Team ;)
>
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]On Behalf Of Patrik
> Andersson
> Sent: Thursday, 29 June 2000 11:54
> To: Orion-Interest
> Subject: Orion steeling IP addresses.
>
> I've run into something that took a while to solve. Orion steels all
> available ip addresses on port 80 on the machine it's running on. This
> is
> not an acceptable behavior since this machine also hosts other sites
> using
> IIS. We added a site to the IIS on ip:A port 80. At the same time
> orion was
> running another site running on ip:B on port 8000. When I restarted
> orion it
> said something like: HttpServer: address in use: bind. It took a while
> to
> locate the problem I can tell you. Why won't my site work if no other
> site
> is using it's ip address?
> Patrik Andersson


Reply via email to