users@glassfish.java.net

Re: FreeBSD glassfish

From: Binod <Binod.Pg_at_Sun.COM>
Date: Fri, 10 Nov 2006 10:58:40 +0530

Kenneth Clark wrote:

> Hi
>
> Sorry I didn't get back to you sooner.
>
> Here is the resulting output from the last snippet (which looks
> strangely familiar to the problem I am having)

It is the same problem, just that we got it reproduced outside the appserver
(so, not an appserver issue).

>
> Ok, We got the loopback address
> Exception in thread "main" java.net.BindException: Can't assign
> requested address

This basically mean that lo0 is not configured properly or not available.

Try ifconfig -a (Hope it is the same in FreeBSD) and see lo0 is up or not...

Perhaps you need to do "ifconfig lo0 127.0.0.1 up"

- Binod.

> at java.net.PlainSocketImpl.socketBind(Native Method)
> at java.net.PlainSocketImpl.bind(PlainSocketImpl.java:359)
> at java.net.ServerSocket.bind(ServerSocket.java:319)
> at java.net.ServerSocket.<init>(ServerSocket.java:185)
> at tt.main(tt.java:16)
>
>
>
> Binod wrote:
>
>> Kenneth Clark wrote:
>>
>>> I have attached the files, if this is not sufficient let me know
>>
>>
>>
>> Lets see, if we need more :-)
>>
>> Can we try this small java app? Look like there is some problem
>> with loopback address.
>>
>> import java.net.*;
>> import java.nio.channels.*;
>>
>> public class t {
>> public static void main(String[] args) throws Exception {
>>
>> InetAddress address = InetAddress.getByName(null);
>>
>> if (address.isLoopbackAddress()) {
>> System.out.println("Ok, We got the loopback address");
>> } else {
>> System.out.println("Oh! getByName(null) returns non-loop
>> back address");
>> address = null;
>> }
>>
>> ServerSocket s1 = new ServerSocket(0,0,address);
>>
>> System.out.println("s1 is:" + s1.getLocalPort());
>>
>> }
>>
>> }
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
>> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>>
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>