CArtAgO java.rmi.ConnectException Connection refused in a distributed environment - agent

I am trying to connect remotely to a JaCaMo application by CArtAgO infrastructure.
In the server my jcm file is like this:
mas testsvr {
agent bob
workspace world
platform: cartago(infrastructure)
class-path: lib // java class path
asl-path: src/agt, src/agt/inc // agent source path
}
And a client application is like this:
mas testclient {
agent alice
platform: cartago()
node n1 running # 10.0.0.14
class-path: lib // java class path
asl-path: src/agt, src/agt/inc // agent source path
}
When I've run with a server listening I got the following output:
CArtAgO Http Server running on http://127.0.1.1:3273
Jason Http Server running on http://127.0.1.1:3272
Looking for rmi://10.0.0.11/cartago_node
java.rmi.ConnectException: Connection refused to host: 127.0.1.1; nested exception is:
java.net.ConnectException: Connection refused
at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:619)
at sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:216)
at sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:202)
at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:130)
at java.rmi.server.RemoteObjectInvocationHandler.invokeRemoteMethod(RemoteObjectInvocationHandler.java:227)
at java.rmi.server.RemoteObjectInvocationHandler.invoke(RemoteObjectInvocationHandler.java:179)
at com.sun.proxy.$Proxy6.join(Unknown Source)
at cartago.infrastructure.rmi.CartagoInfrastructureLayer.joinRemoteWorkspace(CartagoInfrastructureLayer.java:62)
at cartago.CartagoService.joinRemoteWorkspace(CartagoService.java:372)
at cartago.NodeArtifact.joinRemoteWorkspace(NodeArtifact.java:99)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at cartago.ArtifactOpMethod.exec(ArtifactOpMethod.java:39)
at cartago.Artifact.doOperation(Artifact.java:407)
at cartago.Artifact.access$200(Artifact.java:32)
at cartago.Artifact$ArtifactAdapter.doOperation(Artifact.java:1275)
at cartago.WorkspaceKernel.serveOperation(WorkspaceKernel.java:1136)
at cartago.WorkspaceKernel.access$000(WorkspaceKernel.java:48)
at cartago.WorkspaceKernel$EnvironmentController.run(WorkspaceKernel.java:1477)
When I've run without a server listening the output was:
CArtAgO Http Server running on http://127.0.1.1:3273
Jason Http Server running on http://127.0.1.1:3272
java.rmi.ConnectException: Connection refused to host: 10.0.0.11; nested exception is:
java.net.ConnectException: Connection refused
at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:619)
at sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:216)
at sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:202)
at sun.rmi.server.UnicastRef.newCall(UnicastRef.java:342)
at sun.rmi.registry.RegistryImpl_Stub.lookup(Unknown Source)
at java.rmi.Naming.lookup(Naming.java:101)
at cartago.infrastructure.rmi.CartagoInfrastructureLayer.joinRemoteWorkspace(CartagoInfrastructureLayer.java:58)
at cartago.CartagoService.joinRemoteWorkspace(CartagoService.java:372)
at cartago.NodeArtifact.joinRemoteWorkspace(NodeArtifact.java:99)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at cartago.ArtifactOpMethod.exec(ArtifactOpMethod.java:39)
at cartago.Artifact.doOperation(Artifact.java:407)
at cartago.Artifact.access$200(Artifact.java:32)
at cartago.Artifact$ArtifactAdapter.doOperation(Artifact.java:1275)
at cartago.WorkspaceKernel.serveOperation(WorkspaceKernel.java:1136)
at cartago.WorkspaceKernel.access$000(WorkspaceKernel.java:48)
at cartago.WorkspaceKernel$EnvironmentController.run(WorkspaceKernel.java:1477)
So, it shows that the client found the server but something wrong happened and the connection was refused. What is happening? Which is the default CArtAgO's connection port?

CArtAgO uses Java RMI, the default port is 20100. For LipeRMI connection the default port is 20101. Other constants can be checked in http://www.emse.fr/~boissier/enseignement/maop17-spring/doc/api/cartago-api/index.html?constant-values.html
It is suggested to leave server and client with no restrictions checking whether iptables INPUT, FORWARD and OUTPUT are showing ACCEPT for any case. You can use the following command:
$ iptables -L -v
On linux with JaCaMo application running you can see if the port 20100 was opened by the app (you can use ss or netstat). The response should be "LISTEN" for 20100 port
$ ss -tnl | grep 20100
or
$ netstat -tuplen | grep 20100
It is also necessary to have DNS working for the machines because the connection will use names. You may test it by command ping using machine names. From clients:
$ ping name_server
From server (ping clients)
$ ping name_client1
In case of no DNS server to solve names, it is necessary to edit /etc/hosts file. Considering the server named 'myserver_hostname' on ip 192.168.0.1 and client named 'myclient_hostname' on ip 192.168.0.2, the file on both machines, server and client, may be like this:
127.0.0.1 localhost
#127.0.1.1 myserver_hostname -- RMI will not use it anymore
192.168.0.1 myserver_hostname
192.168.0.2 myclient_hostname

Related

WebSphere v7.0 doesn't start CREATE_LISTENER_FAILED_4

I work with WebSphere v7.0. When I tried to start the server, I get the following error on the console.
[26/08/19 10:02:35:224 CEST] 00000000 WsServerImpl E WSVR0009E: Se ha producido un error durante el inicio
com.ibm.ws.exception.RuntimeError: org.omg.CORBA.INTERNAL: CREATE_LISTENER_FAILED_4 vmcid: 0x49421000 minor code: 56 completed: No
at com.ibm.ws.runtime.component.ORBImpl.start(ORBImpl.java:439)
at com.ibm.ws.runtime.component.ContainerHelper.startComponents(ContainerHelper.java:538)
at com.ibm.ws.runtime.component.ContainerImpl.startComponents(ContainerImpl.java:627)
at com.ibm.ws.runtime.component.ContainerImpl.start(ContainerImpl.java:618)
at com.ibm.ws.runtime.component.ServerImpl.start(ServerImpl.java:502)
at com.ibm.ws.runtime.WsServerImpl.bootServerContainer(WsServerImpl.java:298)
at com.ibm.ws.runtime.WsServerImpl.start(WsServerImpl.java:214)
at com.ibm.ws.runtime.WsServerImpl.main(WsServerImpl.java:666)
at com.ibm.ws.runtime.WsServer.main(WsServer.java:59)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:60)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
at java.lang.reflect.Method.invoke(Method.java:611)
at com.ibm.wsspi.bootstrap.WSLauncher.launchMain(WSLauncher.java:213)
at com.ibm.wsspi.bootstrap.WSLauncher.main(WSLauncher.java:93)
at com.ibm.wsspi.bootstrap.WSLauncher.run(WSLauncher.java:74)
at org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:78)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:92)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:68)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:400)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:177)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:60)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
at java.lang.reflect.Method.invoke(Method.java:611)
at org.eclipse.core.launcher.Main.invokeFramework(Main.java:340)
at org.eclipse.core.launcher.Main.basicRun(Main.java:282)
at org.eclipse.core.launcher.Main.run(Main.java:981)
at com.ibm.wsspi.bootstrap.WSPreLauncher.launchEclipse(WSPreLauncher.java:341)
at com.ibm.wsspi.bootstrap.WSPreLauncher.main(WSPreLauncher.java:111)
Caused by: org.omg.CORBA.INTERNAL: CREATE_LISTENER_FAILED_4 vmcid: 0x49421000 minor code: 56 completed: No
at com.ibm.ws.orbimpl.transport.WSTransport.createListener(WSTransport.java:867)
at com.ibm.ws.orbimpl.transport.WSTransport.initTransports(WSTransport.java:605)
at com.ibm.rmi.iiop.TransportManager.initTransports(TransportManager.java:157)
at com.ibm.rmi.corba.ORB.set_parameters(ORB.java:1303)
at com.ibm.CORBA.iiop.ORB.set_parameters(ORB.java:1690)
at org.omg.CORBA.ORB.init(ORB.java:364)
at com.ibm.ws.orb.GlobalORBFactory.init(GlobalORBFactory.java:92)
at com.ibm.ejs.oa.EJSORBImpl.initializeORB(EJSORBImpl.java:179)
at com.ibm.ejs.oa.EJSServerORBImpl.<init>(EJSServerORBImpl.java:102)
at com.ibm.ejs.oa.EJSORB.init(EJSORB.java:55)
at com.ibm.ws.runtime.component.ORBImpl.start(ORBImpl.java:432)
... 29 more
[26/08/19 10:02:35:135 CEST] 00000000 FfdcProvider W com.ibm.ws.ffdc.impl.FfdcProvid
I checked the port BOOTSTRAP_ADDRESS in the file serverindex.xml
<specialEndpoints xmi:id="NamedEndPoint_1183122129640" endPointName="BOOTSTRAP_ADDRESS">
<endPoint xmi:id="EndPoint_1183122129640" host="F120000.cargas02.sir" port="2809"/>
</specialEndpoints>
The output command netstat -ano is
TCP 0.0.0.0:2809 0.0.0.0:0 LISTENING 4072
How can I fix this error?
Usually an ORB Listener Thread creation failure occurs because either:
Another process is already listening on the port in question (in this case 2809).
The ephemeral port range has been expanded on the OS such that the WebSphere server port ranges (2800 - ~10000) are now included in that range, increasing the possibility of a WAS server port number being assigned to another process as an ephemeral port.
For scenario #1: use netstat -ano or lsof -i :<port#> commands and search for the port to find the process using the port. If a conflicting process is found, change the config/port ussage of that process. Or edit the WebSphere serverindex.xml file in dmgr-profile-root/config/cells/cellName/nodes/nodename (make sure to take a backup beforehand). Change the 2809 port to another port not in use. Save and sync the changes.
For scenario #2: Check the ephemeral port range on the server box (internet search based on the OS will give specific instructions for this). Make sure the low end of the port range is sufficiently greater than the highest WebSphere server ports found in the serverindex.xml file.
Finally, it's also possible the WebSphere server did not properly shutdown and close all ports from its previous run. An OS reboot may be needed to release the port(s).

Apache James 3 unexpectedly quits after few seconds

I always get this whenever I try to add domain
Error connecting to remote JMX agent : Failed to retrieve RMIServer stub: javax.naming.ServiceUnavailableException [Root exception is java.rmi.ConnectException: Connection refused to host: 127.0.0.1; nested exception is:
java.net.ConnectException: Connection refused (Connection refused)]
usage: java org.apache.james.cli.ServerCmd --host <arg> <command>
-h,--host <arg> node hostname or ip address
-p,--port <arg> remote jmx agent port number
AddUser <username> <password>
RemoveUser <username>
ListUsers
Although I discovered that James quits some seconds after starting, I have jaxb jar file, I have put it in every lib folder there is to put.
Is there anything I am doing wrong? Am I to specify input mysql details and if so where, I can't seem to figure this out.

Jenkins: "javax.mail.MessagingException: Could not connect to SMTP host: smtp.gmail.com, port: 465;"

all on a sudden i am not able to trigger emails via Jenkins which is running in rhel 6.2 . It was working fine before. But i am able to sent mails via server.
Below is the error which i am getting..
ERROR: Could not connect to SMTP host: smtp.uk.ri.ad, port: 465
javax.mail.MessagingException: Could not connect to SMTP host: smtp.uk.ri.ad, port: 465;
nested exception is:
java.net.ConnectException: Connection refused
at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:1934)
at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:638)
at javax.mail.Service.connect(Service.java:317)
at javax.mail.Service.connect(Service.java:176)
at javax.mail.Service.connect(Service.java:125)
at javax.mail.Transport.send0(Transport.java:194)
at javax.mail.Transport.send(Transport.java:124)
at hudson.tasks.MailSender.run(MailSender.java:129)
at hudson.tasks.Mailer.perform(Mailer.java:170)
at
hudson.tasks.BuildStepCompatibilityLayer.perform
(BuildStepCompatibilityLayer.java:78)
at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
at
hudson.model.AbstractBuild$AbstractBuildExecution.perform
(AbstractBuild.java:779)
at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps
(AbstractBuild.java:720)
at hudson.model.Build$BuildExecution.post2(Build.java:185)
at hudson.model.AbstractBuild$AbstractBuildExecution.post
(AbstractBuild.java:665)
at hudson.model.Run.execute(Run.java:1753)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
at hudson.model.ResourceController.execute(ResourceController.java:98)
at hudson.model.Executor.run(Executor.java:404)
Caused by: java.net.ConnectException: Connection refused
at java.net.PlainSocketImpl.socketConnect(Native Method)
at
java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:339)
at
java.net.AbstractPlainSocketImpl.connectToAddress
(AbstractPlainSocketImpl.java:200)
at
java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:182)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
at java.net.Socket.connect(Socket.java:579)
at sun.security.ssl.SSLSocketImpl.connect(SSLSocketImpl.java:625)
at com.sun.mail.util.SocketFetcher.createSocket(SocketFetcher.java:286)
at com.sun.mail.util.SocketFetcher.getSocket(SocketFetcher.java:205)
at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:1900)
... 18 more
Finished: SUCCESS
Please help to fix the issue.. Thanks in advance
Someone changed the configs of email server in the machine itself.. So when i wrote the configuration in Jenkins it was attempting to overwrite the machine configuration and eventually timed out so i removed the config and it worked fine..

Check/connect to Redis running within docker from Java(Spring Boot) or Node.js

I quick started with Redis on Windows PC with
docker run -p 6379:6379 redis
(Redis does not have Windows distribution, fork for Windows is not the latest version )
1:C 10 Sep 08:17:03.635 # Warning: no config file specified, using the default config. In order to specify a config file use redis-server /path/to/redis.conf
_._
_.-``__ ''-._
_.-`` `. `_. ''-._ Redis 3.2.3 (00000000/0) 64 bit
.-`` .-```. ```\/ _.,_ ''-._
( ' , .-` | `, ) Running in standalone mode
|`-._`-...-` __...-.``-._|'` _.-'| Port: 6379
| `-._ `._ / _.-' | PID: 1
`-._ `-._ `-./ _.-' _.-'
|`-._`-._ `-.__.-' _.-'_.-'|
| `-._`-._ _.-'_.-' | http://redis.io
`-._ `-._`-.__.-'_.-' _.-'
|`-._`-._ `-.__.-' _.-'_.-'|
| `-._`-._ _.-'_.-' |
`-._ `-._`-.__.-'_.-' _.-'
`-._ `-.__.-' _.-'
`-._ _.-'
`-.__.-'
...
1:M 10 Sep 08:17:03.644 * The server is now ready to accept connections on port 6379
Then however I can't connect from Spring Boot app. With application.properties like
spring.redis.host=localhost
spring.redis.port=6379
got error
Caused by: redis.clients.jedis.exceptions.JedisConnectionException: java.net.ConnectException: Connection refused: connect
at redis.clients.jedis.Connection.connect(Connection.java:164) ~[jedis-2.8.2.jar:na]
at redis.clients.jedis.BinaryClient.connect(BinaryClient.java:80) ~[jedis-2.8.2.jar:na]
at redis.clients.jedis.BinaryJedis.connect(BinaryJedis.java:1677) ~[jedis-2.8.2.jar:na]
at redis.clients.jedis.JedisFactory.makeObject(JedisFactory.java:87) ~[jedis-2.8.2.jar:na]
at org.apache.commons.pool2.impl.GenericObjectPool.create(GenericObjectPool.java:868) ~[commons-pool2-2.4.2.jar:2.4.2]
at org.apache.commons.pool2.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:435) ~[commons-pool2-2.4.2.jar:2.4.2]
at org.apache.commons.pool2.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:363) ~[commons-pool2-2.4.2.jar:2.4.2]
at redis.clients.util.Pool.getResource(Pool.java:49) ~[jedis-2.8.2.jar:na]
... 23 common frames omitted
Caused by: java.net.ConnectException: Connection refused: connect
at java.net.DualStackPlainSocketImpl.waitForConnect(Native Method) ~[na:1.8.0_45]
at java.net.DualStackPlainSocketImpl.socketConnect(DualStackPlainSocketImpl.java:85) ~[na:1.8.0_45]
at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:345) ~[na:1.8.0_45]
at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206) ~[na:1.8.0_45]
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188) ~[na:1.8.0_45]
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:172) ~[na:1.8.0_45]
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392) ~[na:1.8.0_45]
at java.net.Socket.connect(Socket.java:589) ~[na:1.8.0_45]
at redis.clients.jedis.Connection.connect(Connection.java:158) ~[jedis-2.8.2.jar:na]
... 30 common frames omitted
When trying to use Node.js with node_redis example,
I got
Error Error: Redis connection to 127.0.0.1:6379 failed - connect ECONNREFUSED
As you mentioned (in the comments), redis bundled their image with protected-mode set to yes (see here).
How to go around protected-mode
1) Disable protected mode sending the command 'CONFIG SET protected-mode no' from the loopback interface by connecting to Redis from the same host the server is running, however MAKE SURE Redis is not publicly accessible from internet if you do so. Use CONFIG REWRITE to make this change permanent.
2) Alternatively you can disable the protected mode by editing the Redis configuration file, and setting the protected mode option to 'no', and then restarting the server.
3) If you started the server manually (perhaps for testing), restart it with the '--protected-mode no' option.
4) Setup a bind address or an authentication password.
source: redis-github
Build your own image
You could create your own image by pulling redis's and ADDing your own redis.conf to the image ?
Or update the start command in the Dockerfile to disable protected-mode: CMD [ "redis-server", "--protected-mode", "no" ]
You can also take a look at this Dockerfile which contains the modification suggested above (last line): https://github.com/docker-library/redis/blob/23b10607ef1810379d16664bcdb43723aa007266/3.2/Dockerfile
This Dockerfile is provided in a Redis issue on github, it replaces the startup command with CMD [ "redis-server", "--protected-mode", "no" ].
You could just download this Dockerfile and type:
$ docker build -t redis-unprotected:latest .
$ docker run -p 6379:6379 redis-unprotected
Ran into a similar problem today.
Using the redis container's IP address for the JedisConnectionFactory solved the issue for me.
Docker command:
docker inspect --format '{{ .NetworkSettings.IPAddress }}' some-redis-instance
Thanks to Alex answer and comment in https://github.com/docker-library/redis/issues/74
I was able to connect to the Redis using full IP 192.168.99.100:6379
Note that latest 3.2 image has protected mode disabled
https://github.com/docker-library/redis/issues/75

starting FedoOne server

I have followed the installation instructions as shown here
to install the FedOne server,I am using openfire as the xmpp server and I have managed to run the server and the client as supposed.
After a while I thought of deploying an agent and wanted to start the FedOne server again but the run-server.sh fails complaining
`2010-09-20 12:25:30.425:WARN::FAILED SelectChannelConnector#localhost:9879: java.net.BindException: Address already in use
2010-09-20 12:25:30.425:DBUG::EXCEPTION
java.net.BindException: Address already in use
at sun.nio.ch.Net.bind(Native Method)
at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:137)
at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:77)
at org.eclipse.jetty.server.nio.SelectChannelConnector.open(SelectChannelConnector.java:209)
at org.eclipse.jetty.server.nio.SelectChannelConnector.doStart(SelectChannelConnector.java:289)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:55)
at org.eclipse.jetty.server.Server.doStart(Server.java:253)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:55)
at org.waveprotocol.wave.examples.fedone.rpc.ServerRpcProvider.startWebSocketServer(ServerRpcProvider.java:328)
at org.waveprotocol.wave.examples.fedone.ServerMain.run(ServerMain.java:74)
at org.waveprotocol.wave.examples.fedone.ServerMain.main(ServerMain.java:48)
org.eclipse.jetty.server.Server#9300cc STOPPED
+-ServletContextHandler#1469658#1469658/,file:/home/maxsap/Documents/progrs/FedOne/wave-protocol/war/ started
+-ServletHandler#1304043 started
+-[/wave]=>org.waveprotocol.wave.examples.fedone.rpc.WaveClientServlet-7654146{}
+-[/socket]=>org.waveprotocol.wave.examples.fedone.rpc.ServerRpcProvider$WaveWebSocketServlet-33239569{bufferSize=1048576}
+-[/static/]=>org.eclipse.jetty.servlet.DefaultServlet-21909041{}
+-[/webclient/]=>org.eclipse.jetty.servlet.DefaultServlet-21909041{}
+-[/]=>org.waveprotocol.wave.examples.fedone.rpc.WaveClientServlet-9975050{}
+-[/attachment/*]=>org.waveprotocol.wave.examples.fedone.rpc.AttachmentServlet-33355664{}
2010-09-20 12:25:30.426:WARN::FAILED org.eclipse.jetty.server.Server#9300cc: java.net.BindException: Address already in use
2010-09-20 12:25:30.426:DBUG::EXCEPTION
java.net.BindException: Address already in use
at sun.nio.ch.Net.bind(Native Method)
at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:137)
at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:77)
at org.eclipse.jetty.server.nio.SelectChannelConnector.open(SelectChannelConnector.java:209)
at org.eclipse.jetty.server.nio.SelectChannelConnector.doStart(SelectChannelConnector.java:289)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:55)
at org.eclipse.jetty.server.Server.doStart(Server.java:253)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:55)
at org.waveprotocol.wave.examples.fedone.rpc.ServerRpcProvider.startWebSocketServer(ServerRpcProvider.java:328)
at org.waveprotocol.wave.examples.fedone.ServerMain.run(ServerMain.java:74)
at org.waveprotocol.wave.examples.fedone.ServerMain.main(ServerMain.java:48)
Sep 20, 2010 12:25:30 PM org.waveprotocol.wave.examples.fedone.rpc.ServerRpcProvider startWebSocketServer
SEVERE: Fatal error starting http server.
java.net.BindException: Address already in use
at sun.nio.ch.Net.bind(Native Method)
at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:137)
at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:77)
at org.eclipse.jetty.server.nio.SelectChannelConnector.open(SelectChannelConnector.java:209)
at org.eclipse.jetty.server.nio.SelectChannelConnector.doStart(SelectChannelConnector.java:289)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:55)
at org.eclipse.jetty.server.Server.doStart(Server.java:253)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:55)
at org.waveprotocol.wave.examples.fedone.rpc.ServerRpcProvider.startWebSocketServer(ServerRpcProvider.java:328)
at org.waveprotocol.wave.examples.fedone.ServerMain.run(ServerMain.java:74)
at org.waveprotocol.wave.examples.fedone.ServerMain.main(ServerMain.java:48)`
by default the server runs at the port 9898 as shown on the above output,I have tried using netstat and lsof to find what service is using that port but no one does!
also tried to change the port from the configuration but also no luck!
Has anyone had the same problem? if yes have he/she solved it? and how
also is there any linux command that I can query the port and tell me who is using that service?
So it terns out that the server runs after all but for some reason it complains about the bind exception.
The correct way to look for the service given a port is either the one on the comment above or using fuser <protocol> <port>.

Resources