users@glassfish.java.net

How do I solve an export exception, port 0 already in use on Darwin build?

From: <glassfish_at_javadesktop.org>
Date: Sun, 09 Mar 2008 01:18:30 PST

I started with the binary build for Mac OS X on FreeBSD with a few name changes to Darwin and got a few errors. After completing the build process from http://blogs.sun.com/hyau/entry/glassfish_on_freebsd_too (Thanks, by the way to both Homer and Alex) I get the same errors. It looks like the system is trying to start up RMI or a related service on port 0. I can't find anywhere where I can configure this. Below is my startup error. Have you seen it before and can you point me in the right direction to fix it? I've also posted this question to Homer's install page. I'm using v2u1 with diablo java 5 on FreeBSD 6.2 for this particular install. I've tried several different domain configurations and always end up here.

[#|2008-03-09T01:47:18.792-0700|INFO|sun-appserver9.1|javax.enterprise.system.core|_ThreadID=11;_ThreadName=pool-1-thread-2;com.sun.enterprise
.interceptor.DynamicInterceptor;|MBeanServer started: com.sun.enterprise.interceptor.DynamicInterceptor|#]

[#|2008-03-09T01:47:22.176-0700|WARNING|sun-appserver9.1|javax.enterprise.system.tools.admin|_ThreadID=10;_ThreadName=main;|ADM5801:Admin serv
er channel creation failed.|#]

[#|2008-03-09T01:47:22.215-0700|SEVERE|sun-appserver9.1|javax.enterprise.system.core|_ThreadID=10;_ThreadName=main;|UnknownException during st
artup. Disable quick startup by setting system property com.sun.enterprise.server.ss.ASQuickStartup to false
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
        at com.sun.enterprise.admin.server.core.channel.AdminChannel.createRMIChannel(AdminChannel.java:111)
        at com.sun.enterprise.admin.server.core.AdminChannelLifecycle.onInitialization(AdminChannelLifecycle.java:74)
        at com.sun.enterprise.server.ss.ASLazyKernel.initializeAdminService(ASLazyKernel.java:213)
        at com.sun.enterprise.server.ss.ASLazyKernel.startASSocketServices(ASLazyKernel.java:98)
        at com.sun.enterprise.server.ondemand.OnDemandServer.onInitialization(OnDemandServer.java:92)
        at com.sun.enterprise.server.PEMain.run(PEMain.java:401)
        at com.sun.enterprise.server.PEMain.main(PEMain.java:338)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at com.sun.enterprise.server.PELaunch.main(PELaunch.java:412)
Caused by: java.rmi.server.ExportException: Port already in use: 0; nested exception is:
        java.net.BindException: Can't assign requested address
        at sun.rmi.transport.tcp.TCPTransport.listen(TCPTransport.java:249)
        at sun.rmi.transport.tcp.TCPTransport.exportObject(TCPTransport.java:184)
        at sun.rmi.transport.tcp.TCPEndpoint.exportObject(TCPEndpoint.java:382)
        at sun.rmi.transport.LiveRef.exportObject(LiveRef.java:116)
        at sun.rmi.server.UnicastServerRef.exportObject(UnicastServerRef.java:180)
        at java.rmi.server.UnicastRemoteObject.exportObject(UnicastRemoteObject.java:293)
        at java.rmi.server.UnicastRemoteObject.exportObject(UnicastRemoteObject.java:256)
        at java.rmi.server.UnicastRemoteObject.<init>(UnicastRemoteObject.java:155)
        at com.sun.enterprise.admin.server.core.channel.AdminChannelServer.<init>(AdminChannelServer.java:102)
        at com.sun.enterprise.admin.server.core.channel.AdminChannel.createServerObject(AdminChannel.java:251)
        at com.sun.enterprise.admin.server.core.channel.AdminChannel.createRMIChannel(AdminChannel.java:106)
        ... 11 more
Caused by: java.net.BindException: Can't assign requested address
        at sun.nio.ch.Net.bind(Native Method)
        at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:119)
        at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:59)
        at com.sun.enterprise.server.ss.provider.ASServerSocket.bind(ASServerSocket.java:296)
        at com.sun.enterprise.server.ss.provider.ASServerSocketImpl.listen(ASServerSocketImpl.java:166)
        at java.net.ServerSocket.bind(ServerSocket.java:320)
        at java.net.ServerSocket.<init>(ServerSocket.java:185)
        at com.sun.enterprise.admin.server.core.channel.LocalRMIServerSocketFactory.createServerSocket(LocalRMIServerSocketFactory.java:92)
        at sun.rmi.transport.tcp.TCPEndpoint.newServerSocket(TCPEndpoint.java:622)
        at sun.rmi.transport.tcp.TCPTransport.listen(TCPTransport.java:237)
        ... 21 more
|#]

[#|2008-03-09T01:47:22.456-0700|WARNING|sun-appserver9.1|javax.enterprise.system.stream.err|_ThreadID=10;_ThreadName=main;|java.lang.RuntimeEx
ception: Admin Server Channel is not initialized
        at com.sun.enterprise.admin.server.core.channel.AdminChannel.assertAdminServerChannelNotNull(AdminChannel.java:373)
        at com.sun.enterprise.admin.server.core.channel.AdminChannel.setRMIChannelAborting(AdminChannel.java:199)
        at com.sun.enterprise.admin.server.core.AdminChannelLifecycle.onAbort(AdminChannelLifecycle.java:116)
        at com.sun.enterprise.server.ss.ASLazyKernel.abortAdminService(ASLazyKernel.java:226)
        at com.sun.enterprise.server.ss.ASLazyKernel.exitServer(ASLazyKernel.java:121)
        at com.sun.enterprise.server.ss.ASLazyKernel.startASSocketServices(ASLazyKernel.java:112)
        at com.sun.enterprise.server.ondemand.OnDemandServer.onInitialization(OnDemandServer.java:92)
        at com.sun.enterprise.server.PEMain.run(PEMain.java:401)
        at com.sun.enterprise.server.PEMain.main(PEMain.java:338)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at com.sun.enterprise.server.PELaunch.main(PELaunch.java:412)
|#]
[Message sent by forum member 'jrobey' (jrobey)]

http://forums.java.net/jive/thread.jspa?messageID=263068