You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by martymusk <ma...@email.it> on 2008/01/16 12:51:01 UTC

Port already in use 1099

Hy,
I'm working with ws-notification example (instance1, instance2, instance3).
I'm working with eclipse.
When instance 1 run, it work fine, but when I run instance 2, the following
error occurs:


DEBUG - ManagementContext              - Failed to create local registry
java.rmi.server.ExportException: Port already in use: 1099; nested exception
is: 
	java.net.BindException: Address already in use
	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 sun.rmi.registry.RegistryImpl.setup(RegistryImpl.java:92)
	at sun.rmi.registry.RegistryImpl.<init>(RegistryImpl.java:78)
	at java.rmi.registry.LocateRegistry.createRegistry(LocateRegistry.java:186)
	at
org.apache.activemq.broker.jmx.ManagementContext.createConnector(ManagementContext.java:382)
	at
org.apache.activemq.broker.jmx.ManagementContext.findMBeanServer(ManagementContext.java:301)
	at
org.apache.activemq.broker.jmx.ManagementContext.getMBeanServer(ManagementContext.java:154)


Why this?
Can somebody help me, please!

Thank you very much!

Martina
-- 
View this message in context: http://www.nabble.com/Port-already-in-use-1099-tp14878716s12049p14878716.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: Port already in use 1099

Posted by Willem Jiang <wi...@gmail.com>.
Here is the code which take from the CXF managment to show how to avoid 
the 1099 Port already in use Exception.

      if (serviceUrl.indexOf("localhost") > -1
            && url.getProtocol().compareToIgnoreCase("rmi") == 0) {
            try {
                int port = getURLLocalHostPort(serviceUrl);
                try {
                    LocateRegistry.createRegistry(port);
                } catch (Exception ex) {
                    // the registry may had been created
                    LocateRegistry.getRegistry(port);
                }
              
            } catch (Exception ex) {
                LOG.log(Level.SEVERE, "CREATE_REGISTRY_FAULT_MSG", new 
Object[]{ex});
            }
        }

Willem.

Willem Jiang wrote:
> Hi Martina
>
> 1099 is the default rmi registry listen port. When you run more than 
> on instance , only one rmi registry can start rightly.
>
> Maybe we need to change the activemq's jmx server looking up code to 
> connector the already start up registry if the registry is created.
>
> Willem.
>
>
> martymusk wrote:
>> Hy,
>> I'm working with ws-notification example (instance1, instance2, 
>> instance3).
>> I'm working with eclipse.
>> When instance 1 run, it work fine, but when I run instance 2, the 
>> following
>> error occurs:
>>
>>
>> DEBUG - ManagementContext              - Failed to create local registry
>> java.rmi.server.ExportException: Port already in use: 1099; nested 
>> exception
>> is:     java.net.BindException: Address already in use
>>     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 sun.rmi.registry.RegistryImpl.setup(RegistryImpl.java:92)
>>     at sun.rmi.registry.RegistryImpl.<init>(RegistryImpl.java:78)
>>     at 
>> java.rmi.registry.LocateRegistry.createRegistry(LocateRegistry.java:186)
>>     at
>> org.apache.activemq.broker.jmx.ManagementContext.createConnector(ManagementContext.java:382) 
>>
>>     at
>> org.apache.activemq.broker.jmx.ManagementContext.findMBeanServer(ManagementContext.java:301) 
>>
>>     at
>> org.apache.activemq.broker.jmx.ManagementContext.getMBeanServer(ManagementContext.java:154) 
>>
>>
>>
>> Why this?
>> Can somebody help me, please!
>>
>> Thank you very much!
>>
>> Martina
>>   
>
>


Re: Port already in use 1099

Posted by Willem Jiang <wi...@gmail.com>.
Hi Martina

1099 is the default rmi registry listen port. When you run more than on 
instance , only one rmi registry can start rightly.

Maybe we need to change the activemq's jmx server looking up code to 
connector the already start up registry if the registry is created.

Willem.


martymusk wrote:
> Hy,
> I'm working with ws-notification example (instance1, instance2, instance3).
> I'm working with eclipse.
> When instance 1 run, it work fine, but when I run instance 2, the following
> error occurs:
>
>
> DEBUG - ManagementContext              - Failed to create local registry
> java.rmi.server.ExportException: Port already in use: 1099; nested exception
> is: 
> 	java.net.BindException: Address already in use
> 	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 sun.rmi.registry.RegistryImpl.setup(RegistryImpl.java:92)
> 	at sun.rmi.registry.RegistryImpl.<init>(RegistryImpl.java:78)
> 	at java.rmi.registry.LocateRegistry.createRegistry(LocateRegistry.java:186)
> 	at
> org.apache.activemq.broker.jmx.ManagementContext.createConnector(ManagementContext.java:382)
> 	at
> org.apache.activemq.broker.jmx.ManagementContext.findMBeanServer(ManagementContext.java:301)
> 	at
> org.apache.activemq.broker.jmx.ManagementContext.getMBeanServer(ManagementContext.java:154)
>
>
> Why this?
> Can somebody help me, please!
>
> Thank you very much!
>
> Martina
>   


Re: Port already in use 1099

Posted by Thomas Termin <tt...@blue-elephant-systems.com>.
If you want to run more then one instance of servicemix you have zo
change the port for all other instances in the config file

Thomas

lhe77 wrote:
> Martina,
> 
> it seems like that every instance wants to occupy port 1099 which is in fact
> impossible.
> I don't know the example, but you can bind a port only one time.
> 
> Regards,
> Lars
> 
> 
> 
> 
> martymusk wrote:
> 
>>Hy,
>>I'm working with ws-notification example (instance1, instance2,
>>instance3).
>>I'm working with eclipse.
>>When instance 1 run, it work fine, but when I run instance 2, the
>>following error occurs:
>>
>>
>>DEBUG - ManagementContext              - Failed to create local registry
>>java.rmi.server.ExportException: Port already in use: 1099; nested
>>exception is: 
>>	java.net.BindException: Address already in use
>>	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 sun.rmi.registry.RegistryImpl.setup(RegistryImpl.java:92)
>>	at sun.rmi.registry.RegistryImpl.<init>(RegistryImpl.java:78)
>>	at
>>java.rmi.registry.LocateRegistry.createRegistry(LocateRegistry.java:186)
>>	at
>>org.apache.activemq.broker.jmx.ManagementContext.createConnector(ManagementContext.java:382)
>>	at
>>org.apache.activemq.broker.jmx.ManagementContext.findMBeanServer(ManagementContext.java:301)
>>	at
>>org.apache.activemq.broker.jmx.ManagementContext.getMBeanServer(ManagementContext.java:154)
>>
>>
>>Why this?
>>Can somebody help me, please!
>>
>>Thank you very much!
>>
>>Martina
>>
> 
> 


-- 
Thomas Termin
_______________________________
blue elephant systems GmbH
Wollgrasweg 49
D-70599 Stuttgart

Tel    :  (+49) 0711 - 45 10 17 676
Fax    :  (+49) 0711 - 45 10 17 573
WWW    :  http://www.blue-elephant-systems.com
Email  :  Thomas.Termin@blue-elephant-systems.com

blue elephant systems GmbH
Firmensitz      : Wollgrasweg 49, D-70599 Stuttgart
Registergericht : Amtsgericht Stuttgart, HRB 24106
Geschäftsführer : Holger Dietrich, Thomas Gentsch, Joachim Hoernle


Re: Port already in use 1099

Posted by lhe77 <la...@compart.net>.
Martina,

it seems like that every instance wants to occupy port 1099 which is in fact
impossible.
I don't know the example, but you can bind a port only one time.

Regards,
Lars




martymusk wrote:
> 
> Hy,
> I'm working with ws-notification example (instance1, instance2,
> instance3).
> I'm working with eclipse.
> When instance 1 run, it work fine, but when I run instance 2, the
> following error occurs:
> 
> 
> DEBUG - ManagementContext              - Failed to create local registry
> java.rmi.server.ExportException: Port already in use: 1099; nested
> exception is: 
> 	java.net.BindException: Address already in use
> 	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 sun.rmi.registry.RegistryImpl.setup(RegistryImpl.java:92)
> 	at sun.rmi.registry.RegistryImpl.<init>(RegistryImpl.java:78)
> 	at
> java.rmi.registry.LocateRegistry.createRegistry(LocateRegistry.java:186)
> 	at
> org.apache.activemq.broker.jmx.ManagementContext.createConnector(ManagementContext.java:382)
> 	at
> org.apache.activemq.broker.jmx.ManagementContext.findMBeanServer(ManagementContext.java:301)
> 	at
> org.apache.activemq.broker.jmx.ManagementContext.getMBeanServer(ManagementContext.java:154)
> 
> 
> Why this?
> Can somebody help me, please!
> 
> Thank you very much!
> 
> Martina
> 

-- 
View this message in context: http://www.nabble.com/Port-already-in-use-1099-tp14878716s12049p14878764.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.