users@glassfish.java.net

Re: FreeBSD glassfish

From: Binod <Binod.Pg_at_Sun.COM>
Date: Wed, 08 Nov 2006 23:11:18 +0530

Can you try the following simple program and post the result on
this alias.

- Binod.

import java.net.*;
import java.nio.channels.*;

public class t {
    public static void main(String[] args) throws Exception {
         ServerSocket s1 = new ServerSocket(0);
         ServerSocket s2 = new ServerSocket(0);

         ServerSocketChannel sc1 = ServerSocketChannel.open();
         sc1.socket().bind(new InetSocketAddress(0));

         ServerSocketChannel sc2 = ServerSocketChannel.open();
         sc2.socket().bind(new InetSocketAddress(0));

         System.out.println("s1 is:" + s1.getLocalPort());
         System.out.println("s2 is:" + s2.getLocalPort());

         System.out.println("nio s1 is:" + sc1.socket().getLocalPort());
         System.out.println("nio s2 is:" + sc2.socket().getLocalPort());
    }

}


Kenneth Clark wrote:

> When I start the domain now I get a heap of errors in the server.log
> file. I think the root meesage is
>
>
> [#|2006-11-06T22:52:19.309+0200|SEVERE|sun-appserver-pe9.0|javax.enterprise.system.core|_ThreadID=10;_ThreadName=main;com.sun.enterprise.admin.server.core.AdminServiceLifeCycle_at_157ea4a;com.sun.appserv.server
>
> .ServerLifecycleException: java.rmi.server.ExportException: Port
> already in use: 0; nested exception is:
> java.net.BindException: Can't assign requested address;|Service
> com.sun.enterprise.admin.server.core.AdminServiceLifeCycle_at_157ea4a
> cannot be initialized! : com.sun.appserv.server.ServerLifecycleExcep
> tion: java.rmi.server.ExportException: Port already in use: 0; nested
> exception is:
> java.net.BindException: Can't assign requested address
>
>
> Homer Yau wrote:
>
>> Hi Kenneth,
>>
>> Now that the domain is created successfully.
>> Have you try to start the domain? ("./asadmin start-domain") What
>> happen this time?
>>
>> Thanks,
>> Homer
>>
>> Kenneth Clark wrote:
>>
>>> ant -f setup.xml is suycccessful
>>>
>>> Homer Yau wrote:
>>>
>>>> Hi Kenneth,
>>>>
>>>> Have you try to delete the domain1 and try to recreate again?
>>>> When running "ant -f setup.xml" command, is it successful?
>>>>
>>>> Thanks,
>>>> -HY
>>>>
>>>> Kenneth Clark wrote:
>>>>
>>>>> I am running KDE and trying to start Glassfish on top of that.
>>>>> Originally I got this error and changed the default ports you
>>>>> mentioned and continue to get the errors
>>>>>
>>>>> as far as I know port 0 is being used buy the XWindows (I might be
>>>>> wrong, new to this whole Unix thing)
>>>>>
>>>>> The reason I am running KDE is because this is my workstation
>>>>>
>>>>> Homer Yau wrote:
>>>>>
>>>>>> Hi Kenneth,
>>>>>>
>>>>>> For me, GlassFish build and startup just fine in FreeBSD 6.0
>>>>>> and 6.1.
>>>>>>
>>>>>> Is there any port conflict and configure issue? How do you
>>>>>> create the domain?
>>>>>> In the domain.xml, are those 4848, 8080, 8181, 3700, 3820, 3920
>>>>>> default port set correctly?
>>>>>>
>>>>>> Thanks,
>>>>>> Homer
>>>>>>
>>>>>> Kenneth Clark wrote:
>>>>>>
>>>>>>> Hi
>>>>>>>
>>>>>>> Thanks for the reply.
>>>>>>>
>>>>>>> I managed to get past the unknownHost excpetion by assigning a
>>>>>>> domain name to the machine. Now I have another problem (I added
>>>>>>> the stuff you recommended and still no joy)
>>>>>>>
>>>>>>> Below is an excerpt from the server.log file for domain1
>>>>>>>
>>>>>>> [#|2006-11-06T22:52:19.309+0200|SEVERE|sun-appserver-pe9.0|javax.enterprise.system.core|_ThreadID=10;_ThreadName=main;com.sun.enterprise.admin.server.core.AdminServiceLifeCycle_at_157ea4a;com.sun.appserv.server
>>>>>>>
>>>>>>> .ServerLifecycleException: java.rmi.server.ExportException: Port
>>>>>>> already in use: 0; nested exception is:
>>>>>>> java.net.BindException: Can't assign requested
>>>>>>> address;|Service
>>>>>>> com.sun.enterprise.admin.server.core.AdminServiceLifeCycle_at_157ea4a
>>>>>>> cannot be initialized! :
>>>>>>> com.sun.appserv.server.ServerLifecycleExcep
>>>>>>> tion: java.rmi.server.ExportException: Port already in use: 0;
>>>>>>> nested exception is:
>>>>>>> java.net.BindException: Can't assign requested address
>>>>>>>
>>>>>>> Why is it trying to bind to port 0? Is there anywhere I can
>>>>>>> change this?
>>>>>>>
>>>>>>>
>>>>>>> Jeanfrancois Arcand wrote:
>>>>>>>
>>>>>>>> Hi,
>>>>>>>>
>>>>>>>> Kenneth Clark wrote:
>>>>>>>>
>>>>>>>>> I had a look at etc hosts and it contains
>>>>>>>>> ::1 localhost
>>>>>>>>> 127.0.0.1 localhost mymachine
>>>>>>>>>
>>>>>>>>> The glassfish will be running on my localhost. I am failing to
>>>>>>>>> see how this can cause a problem as it runs on local host on
>>>>>>>>> my windows machine. Am I missing something?
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> If you add:
>>>>>>>>
>>>>>>>> <jvm-options>-Dcom.sun.enterprise.server.ss.ASQuickStartup=false</jvm-options>
>>>>>>>>
>>>>>>>>
>>>>>>>> in domain.xml, does it work?
>>>>>>>>
>>>>>>>> Thanks
>>>>>>>>
>>>>>>>> -- Jeanfrancois
>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> Manfred Riem wrote:
>>>>>>>>>
>>>>>>>>>> Make sure you have /etc/hosts properly configured.
>>>>>>>>>> Kind regards,
>>>>>>>>>> Manfred Riem
>>>>>>>>>> mriem_at_manorrock.org
>>>>>>>>>> http://www.manorrock.org/
>>>>>>>>>> Founding Java Champion
>>>>>>>>>> -----Original Message-----
>>>>>>>>>> From: Kenneth Clark [mailto:kenneth.bsd_at_rabiddog.co.za] Sent:
>>>>>>>>>> Sunday, November 05, 2006 11:16 PM
>>>>>>>>>> To: users_at_glassfish.dev.java.net
>>>>>>>>>> Subject: FreeBSD glassfish
>>>>>>>>>>
>>>>>>>>>> Hi
>>>>>>>>>>
>>>>>>>>>> I am trying to run Glassfish V1 on FreeBSD but everytime I
>>>>>>>>>> try ant -f
>>>>>>>>>> setup.xml it returns
>>>>>>>>>>
>>>>>>>>>> create.domain:
>>>>>>>>>> [exec] Nov 6, 2006 8:02:07 AM
>>>>>>>>>> com.sun.enterprise.util.ASenvPropertyReader setSystemProperties
>>>>>>>>>> [exec] SEVERE: property_reader.unknownHost
>>>>>>>>>> [exec] java.net.UnknownHostException: mymachine.: mymachine.
>>>>>>>>>> [exec] at
>>>>>>>>>> java.net.InetAddress.getLocalHost(InetAddress.java:1308)
>>>>>>>>>>
>>>>>>>>>> I downloaded the Mac version as I read somewhere that someone
>>>>>>>>>> had it running
>>>>>>>>>> on FreeBSD
>>>>>>>>>>
>>>>>>>>>> Any ideas?
>>>>>>>>>>
>>>>>>>>>> Thanks a mill
>>>>>>>>>>
>>>>>>>>>> ---------------------------------------------------------------------
>>>>>>>>>>
>>>>>>>>>> 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
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> ---------------------------------------------------------------------
>>>>>>>>>
>>>>>>>>> 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
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>> ---------------------------------------------------------------------
>>>>>>>
>>>>>>> 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
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> 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
>>>>
>>>>
>>>>
>>>
>>> ---------------------------------------------------------------------
>>> 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
>>
>>
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>