Sometimes when I run my project, that connects to JBoss, it will hang.
For example here is the log output for when it hangs:
Dec 14, 2021 11:57:58 AM org.jboss.ejb.client.EJBClient <clinit>
INFO: JBoss EJB Client version 1.0.5.Final
Dec 14, 2021 11:57:58 AM org.xnio.Xnio <clinit>
INFO: XNIO Version 3.0.3.GA
Dec 14, 2021 11:57:58 AM org.xnio.nio.NioXnio <clinit>
INFO: XNIO NIO Implementation Version 3.0.3.GA
Dec 14, 2021 11:57:58 AM org.jboss.remoting3.EndpointImpl <clinit>
INFO: JBoss Remoting version 3.2.3.GA
Dec 14, 2021 11:57:58 AM org.jboss.ejb.client.remoting.VersionReceiver handleMessage
INFO: Received server version 2 and marshalling strategies [river]
Dec 14, 2021 11:57:58 AM org.jboss.ejb.client.remoting.RemotingConnectionEJBReceiver associate
INFO: Successful version handshake completed for receiver context EJBReceiverContext{clientContext=org.jboss.ejb.client.EJBClientContext#29f5ca0b, receiver=Remoting connection EJB receiver [connection=Remoting connection <71c88986>,channel=jboss.ejb,nodename=DevApp00:DevApp00]} on channel Channel ID ec955d48 (outbound) of Remoting connection 04a8743d to devapp00.magcore.XXXXXXXXXXXXX.com/XX.XX.XX.XXX:XXXX
Dec 14, 2021 11:57:59 AM org.jboss.ejb.client.remoting.VersionReceiver handleMessage
INFO: Received server version 2 and marshalling strategies [river]
Dec 14, 2021 11:57:59 AM org.jboss.ejb.client.remoting.RemotingConnectionEJBReceiver associate
INFO: Successful version handshake completed for receiver context EJBReceiverContext{clientContext=org.jboss.ejb.client.EJBClientContext#29f5ca0b, receiver=Remoting connection EJB receiver [connection=Remoting connection <6d5bcb39>,channel=jboss.ejb,nodename=DevApp01:DevApp01]} on channel Channel ID c9163bbe (outbound) of Remoting connection 50ba181a to devapp01.magcore.XXXXXXXXXXXXX.com/XX.XX.XX.XXX:XXXX
Dec 14, 2021 11:57:59 AM org.jboss.ejb.client.remoting.VersionReceiver handleMessage
INFO: Received server version 2 and marshalling strategies [river]
Dec 14, 2021 11:57:59 AM org.jboss.ejb.client.remoting.RemotingConnectionEJBReceiver associate
INFO: Successful version handshake completed for receiver context EJBReceiverContext{clientContext=org.jboss.ejb.client.EJBClientContext#29f5ca0b, receiver=Remoting connection EJB receiver [connection=Remoting connection <7900f3c9>,channel=jboss.ejb,nodename=DevApp01:DevApp01]} on channel Channel ID aa5e4733 (outbound) of Remoting connection 6075ef24 to /XX.XX.XX.XXX:XXXX
Here is the log output when it doesn't hang:
Dec 14, 2021 11:58:42 AM org.jboss.ejb.client.EJBClient <clinit>
INFO: JBoss EJB Client version 1.0.5.Final
Dec 14, 2021 11:58:42 AM org.xnio.Xnio <clinit>
INFO: XNIO Version 3.0.3.GA
Dec 14, 2021 11:58:42 AM org.xnio.nio.NioXnio <clinit>
INFO: XNIO NIO Implementation Version 3.0.3.GA
Dec 14, 2021 11:58:42 AM org.jboss.remoting3.EndpointImpl <clinit>
INFO: JBoss Remoting version 3.2.3.GA
Dec 14, 2021 11:58:43 AM org.jboss.ejb.client.remoting.VersionReceiver handleMessage
INFO: Received server version 2 and marshalling strategies [river]
Dec 14, 2021 11:58:43 AM org.jboss.ejb.client.remoting.RemotingConnectionEJBReceiver associate
INFO: Successful version handshake completed for receiver context EJBReceiverContext{clientContext=org.jboss.ejb.client.EJBClientContext#4ae0a5dc, receiver=Remoting connection EJB receiver [connection=Remoting connection <71ed5401>,channel=jboss.ejb,nodename=DevApp00:DevApp00]} on channel Channel ID b0b91086 (outbound) of Remoting connection 11244593 to devapp00.magcore.XXXXXXXXXXXXX.com/XX.XX.XX.XXX:XXXX
Dec 14, 2021 11:58:43 AM org.jboss.ejb.client.remoting.VersionReceiver handleMessage
INFO: Received server version 2 and marshalling strategies [river]
Dec 14, 2021 11:58:43 AM org.jboss.ejb.client.remoting.RemotingConnectionEJBReceiver associate
INFO: Successful version handshake completed for receiver context EJBReceiverContext{clientContext=org.jboss.ejb.client.EJBClientContext#4ae0a5dc, receiver=Remoting connection EJB receiver [connection=Remoting connection <3f7dbbe3>,channel=jboss.ejb,nodename=DevApp01:DevApp01]} on channel Channel ID a49da456 (outbound) of Remoting connection 7900f3c9 to devapp01.magcore.XXXXXXXXXXXXX.com/XX.XX.XX.XXX:XXXX
Dec 14, 2021 11:58:43 AM org.jboss.ejb.client.ClusterContext registerEJBReceiver
INFO: Added a new EJB receiver in cluster context ejb for node DevApp01:DevApp01. Total nodes in cluster context = 1
Dec 14, 2021 11:58:43 AM org.jboss.ejb.client.ClusterContext registerEJBReceiver
INFO: Added a new EJB receiver in cluster context ejb for node DevApp00:DevApp00. Total nodes in cluster context = 2
Here is my jboss-ejb-client.properties
endpoint.name=client-endpoint
remote.connectionprovider.create.options.org.xnio.Options.SSL_ENABLED=false
invocation.timeout=3000
reconnect.tasks.timeout=2000
remote.connections=dev1,dev2
remote.clusters=ejb
# Dev1 - Node 1
remote.connection.dev1.connect.options.org.xnio.Options.SASL_POLICY_NOANONYMOUS=false
remote.connection.dev1.connect.options.org.jboss.remoting3.RemotingOptions.HEARTBEAT_INTERVAL=300000
remote.connection.dev1.host=devapp00.magcore.XXXXXXXXXXXXX.com
remote.connection.dev1.port=XXXX
remote.connection.dev1.username=XXXXXXXXXX
remote.connection.dev1.password=XXXXXXXXXX
# Dev2 - Node 2
remote.connection.dev2.connect.options.org.xnio.Options.SASL_POLICY_NOANONYMOUS=false
remote.connection.dev2.connect.options.org.jboss.remoting3.RemotingOptions.HEARTBEAT_INTERVAL=300000
remote.connection.dev2.host=devapp01.magcore.XXXXXXXXXXXXX.com
remote.connection.dev2.port=XXXX
remote.connection.dev2.username=XXXXXXXXXX
remote.connection.dev2.password=XXXXXXXXXX
# cluster 1
remote.cluster.ejb.connect.timeout=2500
remote.cluster.ejb.connect.options.org.xnio.Options.SASL_POLICY_NOANONYMOUS=false
remote.cluster.ejb.connect.options.org.xnio.Options.SSL_ENABLED=false
remote.cluster.ejb.username=XXXXXXXXXX
#Dev Password
remote.cluster.ejb.password=XXXXXXXXXX
This morning I tried 26 times and is hung every time, but it doesn't always hang.
If I deploy this via WebStart, it seems to work just fine.
Interestingly, it seems as if it is hanging on setting up the cluster. I don't know why I didn't see this before, but it doesn't really help me solve the problem.
Related
I used Tomcat Persistence manager with MongoDB as a persistence store.I am getting lot of problems related to this.
Tomcat not going to shutdown properly. I need to kill it later.
It showing log like this.
Tomcat Log::: Jun 28, 2016 6:36:23 AM org.apache.catalina.core.StandardServer await
INFO: A valid shutdown command was received via the shutdown port.Stopping the Server instance.
Jun 28, 2016 6:36:23 AM org.apache.coyote.AbstractProtocol pause
INFO: Pausing ProtocolHandler ["http-bio-9082"]
Jun 28, 2016 6:36:23 AM org.apache.coyote.AbstractProtocol pause
INFO: Pausing ProtocolHandler ["ajp-bio-8009"]
Jun 28, 2016 6:36:23 AM org.apache.catalina.core.StandardService stopInternal
INFO: Stopping service Catalina
Jun 28, 2016 6:36:23 AM com.mongodb.diagnostics.logging.JULLogger log
INFO: Closed connection [connectionId{localValue:24, serverValue:619}] to <host ip>:<port> because the underlying connection was closed.
After that no response.Then I manually killed that process.
MongoDB collection creating documents more than I expected(approxiamately 100 times). I took reference from these pages.
Tomcat Persistence manager
Mongo Store
Can Any One help regarding these issues?
Working from the hello world sample, what can I do on tleilax to allow doge to connect to the locally running OpenEJB server? I've read through the documentation on how startup OpenEJB, but must be missing a step from the manual.
On tleilax, deploying Hello.jar:
thufir#tleilax:~$ openejb deploy Hello.jar
Mar 07, 2015 10:34:30 PM org.apache.openejb.client.EventLogger log
INFO: RemoteInitialContextCreated{providerUri=ejbd://localhost:4201}
Mar 07, 2015 10:34:31 PM org.apache.openejb.client.EventLogger log
INFO: ConnectionOpened{uri=ejbd://localhost:4201}
Mar 07, 2015 10:34:31 PM org.apache.openejb.client.EventLogger log
INFO: ServerAdded{server=ejbds://127.0.0.1:4203} ClusterMetaDataUpdated{provider=ejbd://localhost:4201, version=1425796337772, uris=2}
Mar 07, 2015 10:34:31 PM org.apache.openejb.client.EventLogger log
INFO: ServerAdded{server=ejbd://127.0.0.1:4201} ClusterMetaDataUpdated{provider=ejbd://localhost:4201, version=1425796337772, uris=2}
Mar 07, 2015 10:34:31 PM org.apache.openejb.client.EventLogger log
INFO: ServerRemoved{server=ejbd://localhost:4201} ClusterMetaDataUpdated{provider=ejbd://localhost:4201, version=1425796337772, uris=2}
Application deployed successfully at "Hello.jar"
App(id=/home/thufir/apache-openejb-4.7.1/apps/Hello.jar)
EjbJar(id=Hello, path=/home/thufir/apache-openejb-4.7.1/apps/Hello.jar)
Ejb(ejb-name=HelloBean, id=HelloBean)
Jndi(name=HelloBeanRemote)
Jndi(name=global/Hello/HelloBean!org.acme.Hello)
Jndi(name=global/Hello/HelloBean)
some output from tleilax openejb showing the deploy:
INFO: OpenWebBeans Container has started, it took 241 ms.
Mar 07, 2015 10:34:32 PM org.apache.openejb.assembler.classic.Assembler startEjbs
INFO: Created Ejb(deployment-id=HelloBean, ejb-name=HelloBean, container=My Stateless Container)
Mar 07, 2015 10:34:32 PM org.apache.openejb.assembler.classic.Assembler startEjbs
INFO: Started Ejb(deployment-id=HelloBean, ejb-name=HelloBean, container=My Stateless Container)
Mar 07, 2015 10:34:32 PM org.apache.openejb.assembler.classic.Assembler createApplication
INFO: Deployed Application(path=/home/thufir/apache-openejb-4.7.1/apps/Hello.jar)
scanning tleilax for open ports:
thufir#doge:~$
thufir#doge:~$ nmap 192.168.1.3
Starting Nmap 6.46 ( http://nmap.org ) at 2015-03-07 22:42 PST
Nmap scan report for 192.168.1.3
Host is up (0.00092s latency).
Not shown: 998 closed ports
PORT STATE SERVICE
22/tcp open ssh
119/tcp open nntp
Nmap done: 1 IP address (1 host up) scanned in 0.06 seconds
thufir#doge:~$
the bound services on tleilax:
Mar 07, 2015 10:32:17 PM org.apache.openejb.server.SimpleServiceManager start
INFO: ** Bound Services **
Mar 07, 2015 10:32:17 PM org.apache.openejb.server.SimpleServiceManager printRow
INFO: NAME IP PORT
Mar 07, 2015 10:32:17 PM org.apache.openejb.server.SimpleServiceManager printRow
INFO: httpejbd 127.0.0.1 4204
Mar 07, 2015 10:32:17 PM org.apache.openejb.server.SimpleServiceManager printRow
INFO: multipoint 127.0.0.1 4212
Mar 07, 2015 10:32:17 PM org.apache.openejb.server.SimpleServiceManager printRow
INFO: admin 127.0.0.1 4200
Mar 07, 2015 10:32:17 PM org.apache.openejb.server.SimpleServiceManager printRow
INFO: ejbd 127.0.0.1 4201
Mar 07, 2015 10:32:17 PM org.apache.openejb.server.SimpleServiceManager printRow
INFO: multicast 239.255.2.3 6142
Mar 07, 2015 10:32:17 PM org.apache.openejb.server.SimpleServiceManager printRow
INFO: ejbds 127.0.0.1 4203
Mar 07, 2015 10:32:17 PM org.apache.openejb.server.SimpleServiceManager printRow
INFO: multipulse 239.255.2.3 6142
Mar 07, 2015 10:32:17 PM org.apache.openejb.server.SimpleServiceManager start
INFO: -------
Mar 07, 2015 10:32:17 PM org.apache.openejb.server.SimpleServiceManager start
INFO: Ready!
So, the server is ready on tleilax. Why can't the client connect properly?
thufir#doge:~$
thufir#doge:~$ java -classpath .:NetBeansProjects/HelloClient/dist/HelloClient.jar:apache-openejb-4.7.1/lib/openejb-client-4.7.1.jar:netbeans-8.0.2/enterprise/modules/ext/javaee-api-7.0.jar org.acme.HelloClient
Mar 07, 2015 10:49:46 PM org.apache.openejb.client.EventLogger log
INFO: RemoteInitialContextCreated{providerUri=ejbd://192.168.1.3:4201}
Mar 07, 2015 10:49:46 PM org.apache.openejb.client.EventLogger log
WARNING: ConnectionFailed{uri=ejbd://192.168.1.3:4201 cause=java.io.IOException: Cannot connect to server 'ejbd://192.168.1.3:4201'. Check that the server is started and that the specified serverURL is correct.}
Mar 07, 2015 10:49:46 PM org.apache.openejb.client.EventLogger log
WARNING: BootstrappingConnection{provider=ejbd://192.168.1.3:4201}
Mar 07, 2015 10:49:46 PM org.apache.openejb.client.EventLogger log
WARNING: ConnectionFailed{uri=ejbd://192.168.1.3:4201 cause=java.io.IOException: Cannot connect to server 'ejbd://192.168.1.3:4201'. Check that the server is started and that the specified serverURL is correct.}
Mar 07, 2015 10:49:46 PM org.apache.openejb.client.EventLogger log
SEVERE: ConnectionStrategyFailed{strategy=StickyConnectionStrategy, cluster=org.apache.openejb.client.ClusterMetaData#7d261f7f, server=ejbd://192.168.1.3:4201}
Exception in thread "main" javax.naming.NamingException: Cannot lookup '/HelloBeanRemote'. [Root exception is java.rmi.RemoteException: Unable to connect; nested exception is:
java.io.IOException: Cannot connect to server 'ejbd://192.168.1.3:4201'. Check that the server is started and that the specified serverURL is correct.]
at org.apache.openejb.client.JNDIContext.lookup(JNDIContext.java:405)
at javax.naming.InitialContext.lookup(InitialContext.java:411)
at org.acme.HelloClient.main(HelloClient.java:16)
Caused by: java.rmi.RemoteException: Unable to connect; nested exception is:
java.io.IOException: Cannot connect to server 'ejbd://192.168.1.3:4201'. Check that the server is started and that the specified serverURL is correct.
at org.apache.openejb.client.Client.processRequest(Client.java:167)
at org.apache.openejb.client.Client.request(Client.java:141)
at org.apache.openejb.client.JNDIContext.request(JNDIContext.java:211)
at org.apache.openejb.client.JNDIContext.lookup(JNDIContext.java:399)
... 2 more
Caused by: java.io.IOException: Cannot connect to server 'ejbd://192.168.1.3:4201'. Check that the server is started and that the specified serverURL is correct.
at org.apache.openejb.client.SocketConnectionFactory$SocketConnection.failure(SocketConnectionFactory.java:334)
at org.apache.openejb.client.SocketConnectionFactory$SocketConnection.open(SocketConnectionFactory.java:308)
at org.apache.openejb.client.SocketConnectionFactory.getConnection(SocketConnectionFactory.java:162)
at org.apache.openejb.client.ConnectionManager.getConnection(ConnectionManager.java:112)
at org.apache.openejb.client.AbstractConnectionStrategy.connect(AbstractConnectionStrategy.java:105)
at org.apache.openejb.client.AbstractConnectionStrategy.connect(AbstractConnectionStrategy.java:81)
at org.apache.openejb.client.ConnectionManager.getConnection(ConnectionManager.java:88)
at org.apache.openejb.client.Client.processRequest(Client.java:165)
... 5 more
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 org.apache.openejb.client.SocketConnectionFactory$SocketConnection.open(SocketConnectionFactory.java:300)
... 11 more
thufir#doge:~$
thufir#doge:~$
For what it's worth, I checked that the HelloClient runs locally from tleilax fine:
thufir#tleilax:~$
thufir#tleilax:~$ java -classpath .:HelloClient.jar:apache-openejb-4.7.1/lib/openejb-client-4.7.1.jar:netbeans-8.0.2/enterprise/modules/ext/javaee-api-7.0.jar org.acme.HelloClient
Mar 07, 2015 10:56:46 PM org.apache.openejb.client.EventLogger log
INFO: RemoteInitialContextCreated{providerUri=ejbd://127.0.0.1:4201}
Mar 07, 2015 10:56:46 PM org.apache.openejb.client.EventLogger log
INFO: ConnectionOpened{uri=ejbd://127.0.0.1:4201}
Mar 07, 2015 10:56:46 PM org.apache.openejb.client.EventLogger log
INFO: ServerAdded{server=ejbds://127.0.0.1:4203} ClusterMetaDataUpdated{provider=ejbd://127.0.0.1:4201, version=1425796337772, uris=2}
Hello World!!!!
thufir#tleilax:~$
Of course, the client running locally on tleilax connects to 127.0.0.1, while the client on doge connects, or tries to connect, to the ip adress for tleilax: 192.168.1.3; the ip address is hardcoded in the sample.
I currently have a JBoss instance running with standalone-ha.xml as the config file. JBoss 7.1.1 Final. I have deployed a basic HelloBean inside a .jar called ClusterTestEJB inside an .ear called ClusterTest.
HelloBean:
package com.sample;
import javax.ejb.Remote;
import javax.ejb.Stateless;
import org.jboss.ejb3.annotation.Clustered;
#Stateless
#Clustered
#Remote
public class HelloBean implements HelloBeanItf {
int counter = 0;
public String doSomething() {
return "HelloBean Called";
}
}
The HelloBeanItf is as follows:
package com.sample;
public interface HelloBeanItf {
public String doSomething();
}
I got the code from a tutorial I was following.
So I have everything seemingly working. I am now trying to write a java client to invoke that EJB. Here is that code:
import java.util.Properties;
import javax.naming.Context;
import javax.naming.InitialContext;
import javax.naming.NamingException;
import com.sample.HelloBeanItf;
public class Client {
public static void main(String[] args){
Properties p = new Properties();
p.put(Context.INITIAL_CONTEXT_FACTORY, "org.jboss.naming.remote.client.InitialContextFactory");
p.put("jboss.naming.client.ejb.context", true);
p.put(Context.SECURITY_PRINCIPAL, "user");
p.put(Context.SECURITY_CREDENTIALS, "password");
p.put(Context.PROVIDER_URL, "remote://mynode:4447");
InitialContext ctx;
try {
ctx = new InitialContext(p);
} catch (NamingException e) {
// TODO Auto-generated catch block
e.printStackTrace();
return;
}
HelloBeanItf ejb = null;
try {
ejb = (HelloBeanItf) ctx.lookup("java:ClusterTest/ClusterTestEJB//HelloBean!com.sample.HelloBeanItf");
} catch (NamingException e) {
// TODO Auto-generated catch block
e.printStackTrace();
return;
}
for (int ii=0;ii<10;ii++) {
ejb.doSomething();
}
System.out.println("Terminated");
}
}
Here is client side log output:
Bad level value for property: java.util.logging.ConsoleHandler.level
Apr 03, 2014 10:49:30 PM org.jboss.logging.LoggerProviders find
DEBUG: Logging Provider: org.jboss.logging.JDKLoggerProvider
Apr 03, 2014 10:49:30 PM org.jboss.naming.remote.client.InitialContextFactory findClientProperties
DEBUG: Looking for jboss-naming-client.properties using classloader sun.misc.Launcher$AppClassLoader#6921dcac
Apr 03, 2014 10:49:30 PM org.jboss.naming.remote.client.InitialContextFactory getOptionMapFromProperties
DEBUG: jboss.naming.client.endpoint.create.options. has the following options {}
Apr 03, 2014 10:49:30 PM org.jboss.naming.remote.client.InitialContextFactory getOptionMapFromProperties
DEBUG: jboss.naming.client.remote.connectionprovider.create.options. has the following options {}
Apr 03, 2014 10:49:30 PM org.xnio.Xnio <clinit>
INFO: XNIO Version 3.0.3.GA
Apr 03, 2014 10:49:30 PM org.xnio.nio.NioXnio <clinit>
INFO: XNIO NIO Implementation Version 3.0.3.GA
Apr 03, 2014 10:49:30 PM org.jboss.remoting3.EndpointImpl <clinit>
INFO: JBoss Remoting version 3.2.3.GA
Apr 03, 2014 10:49:30 PM org.xnio.nio.WorkerThread run
DEBUG: Started channel thread 'Remoting "config-based-naming-client-endpoint" read-1', selector sun.nio.ch.WindowsSelectorImpl#3a151cc3
Apr 03, 2014 10:49:30 PM org.xnio.nio.WorkerThread run
DEBUG: Started channel thread 'Remoting "config-based-naming-client-endpoint" write-1', selector sun.nio.ch.WindowsSelectorImpl#42d2821b
Apr 03, 2014 10:49:30 PM org.jboss.naming.remote.client.InitialContextFactory getOptionMapFromProperties
DEBUG: jboss.naming.client.connect.options. has the following options {}
Apr 03, 2014 10:49:32 PM org.jboss.ejb.client.EJBClientPropertiesLoader loadEJBClientProperties
DEBUG: Looking for jboss-ejb-client.properties using classloader sun.misc.Launcher$AppClassLoader#6921dcac
Apr 03, 2014 10:49:32 PM org.jboss.ejb.client.remoting.ConfigBasedEJBClientContextSelector <init>
DEBUG: EJB client context org.jboss.ejb.client.EJBClientContext#51bc1897 will have no EJB receivers associated with it since there was no EJB client configuration available to create the receivers
Apr 03, 2014 10:49:32 PM org.jboss.ejb.client.remoting.RemotingConnectionEJBReceiver$1 handleDone
DEBUG: Channel Channel ID 828f699b (outbound) of Remoting connection 0d818ff0 to node1-w7.wv-lab.mentorg.com/139.181.88.6:4447 opened for context EJBReceiverContext{clientContext=org.jboss.ejb.client.EJBClientContext#7c572f78, receiver=Remoting connection EJB receiver [connection=Remoting connection <6981170d>,channel=jboss.ejb,nodename=node1]} Waiting for version handshake message from server
Apr 03, 2014 10:49:32 PM org.jboss.ejb.client.remoting.VersionReceiver handleMessage
INFO: Received server version 1 and marshalling strategies [river]
Apr 03, 2014 10:49:32 PM org.jboss.ejb.client.remoting.RemotingConnectionEJBReceiver associate
INFO: Successful version handshake completed for receiver context EJBReceiverContext{clientContext=org.jboss.ejb.client.EJBClientContext#7c572f78, receiver=Remoting connection EJB receiver [connection=Remoting connection <6981170d>,channel=jboss.ejb,nodename=node1]} on channel Channel ID 828f699b (outbound) of Remoting connection 0d818ff0 to node1-w7.wv-lab.mentorg.com/139.181.88.6:4447
Apr 03, 2014 10:49:32 PM org.jboss.ejb.client.remoting.RemotingConnectionEJBReceiver modulesAvailable
DEBUG: Received module availability report for 3 modules
Apr 03, 2014 10:49:32 PM org.jboss.ejb.client.remoting.RemotingConnectionEJBReceiver modulesAvailable
DEBUG: Registering module EJBModuleIdentifier{appName='', moduleName='ClusterWebApp', distinctName=''} availability for receiver context EJBReceiverContext{clientContext=org.jboss.ejb.client.EJBClientContext#7c572f78, receiver=Remoting connection EJB receiver [connection=Remoting connection <6981170d>,channel=jboss.ejb,nodename=node1]}
Apr 03, 2014 10:49:32 PM org.jboss.ejb.client.remoting.RemotingConnectionEJBReceiver modulesAvailable
DEBUG: Registering module EJBModuleIdentifier{appName='ClusterTest', moduleName='ClusterTest', distinctName=''} availability for receiver context EJBReceiverContext{clientContext=org.jboss.ejb.client.EJBClientContext#7c572f78, receiver=Remoting connection EJB receiver [connection=Remoting connection <6981170d>,channel=jboss.ejb,nodename=node1]}
Apr 03, 2014 10:49:32 PM org.jboss.ejb.client.remoting.RemotingConnectionEJBReceiver modulesAvailable
DEBUG: Registering module EJBModuleIdentifier{appName='ClusterTest', moduleName='ClusterTestEJB', distinctName=''} availability for receiver context EJBReceiverContext{clientContext=org.jboss.ejb.client.EJBClientContext#7c572f78, receiver=Remoting connection EJB receiver [connection=Remoting connection <6981170d>,channel=jboss.ejb,nodename=node1]}
Apr 03, 2014 10:49:32 PM org.jboss.ejb.client.remoting.ClusterNode resolveDestination
DEBUG: Checking for a match of client address /fe80:0:0:0:0:5efe:ac1e:5010%14 with client mapping ClientMapping{sourceNetworkAddress=/0:0:0:0:0:0:0:0, sourceNetworkMaskBits=0, destinationAddress='139.181.88.6', destinationPort=4447}
Apr 03, 2014 10:49:32 PM org.jboss.ejb.client.remoting.ClusterNode resolveDestination
DEBUG: Client mapping ClientMapping{sourceNetworkAddress=/0:0:0:0:0:0:0:0, sourceNetworkMaskBits=0, destinationAddress='139.181.88.6', destinationPort=4447} matches client address /fe80:0:0:0:0:5efe:ac1e:5010%14
Apr 03, 2014 10:49:32 PM org.jboss.ejb.client.remoting.ClusterTopologyMessageHandler processMessage
DEBUG: Received a cluster node(s) addition message, for cluster named ejb with 1 nodes [ClusterNode{clusterName='ejb', nodeName='node1', clientMappings=[ClientMapping{sourceNetworkAddress=/0:0:0:0:0:0:0:0, sourceNetworkMaskBits=0, destinationAddress='139.181.88.6', destinationPort=4447}], resolvedDestination=[Destination address=139.181.88.6, destination port=4447]}]
Apr 03, 2014 10:49:32 PM org.jboss.ejb.client.EJBClientContext getEJBReceiver
DEBUG: org.jboss.ejb.client.RandomDeploymentNodeSelector#5254e73f deployment node selector selected node1 node for appname=ClusterTest,modulename=ClusterTestEJB,distinctname=
Apr 03, 2014 10:49:33 PM org.jboss.ejb.client.EJBClientContext getEJBReceiver
DEBUG: org.jboss.ejb.client.RandomDeploymentNodeSelector#5254e73f deployment node selector selected node1 node for appname=ClusterTest,modulename=ClusterTestEJB,distinctname=
Apr 03, 2014 10:49:33 PM org.jboss.ejb.client.EJBClientContext getEJBReceiver
DEBUG: org.jboss.ejb.client.RandomDeploymentNodeSelector#5254e73f deployment node selector selected node1 node for appname=ClusterTest,modulename=ClusterTestEJB,distinctname=
Apr 03, 2014 10:49:33 PM org.jboss.remoting3.remote.ClientConnectionOpenListener$Authentication$1 run
DEBUG: Client authentication failed for mechanism DIGEST-MD5: javax.security.sasl.SaslException: DIGEST-MD5: Cannot perform callback to acquire realm, authentication ID or password [Caused by javax.security.auth.callback.UnsupportedCallbackException]
Apr 03, 2014 10:49:33 PM org.jboss.ejb.client.EJBClientContext getEJBReceiver
DEBUG: org.jboss.ejb.client.RandomDeploymentNodeSelector#5254e73f deployment node selector selected node1 node for appname=ClusterTest,modulename=ClusterTestEJB,distinctname=
Apr 03, 2014 10:49:33 PM org.jboss.remoting3.remote.RemoteConnection handleException
ERROR: JBREM000200: Remote connection failed: javax.security.sasl.SaslException: Authentication failed: all available authentication mechanisms failed
Apr 03, 2014 10:49:33 PM org.jboss.ejb.client.remoting.RemotingConnectionClusterNodeManager getEJBReceiver
INFO: Could not create a connection for cluster node ClusterNode{clusterName='ejb', nodeName='node1', clientMappings=[ClientMapping{sourceNetworkAddress=/0:0:0:0:0:0:0:0, sourceNetworkMaskBits=0, destinationAddress='139.181.88.6', destinationPort=4447}], resolvedDestination=[Destination address=139.181.88.6, destination port=4447]} in cluster ejb
java.lang.RuntimeException: javax.security.sasl.SaslException: Authentication failed: all available authentication mechanisms failed
at org.jboss.ejb.client.remoting.IoFutureHelper.get(IoFutureHelper.java:91)
at org.jboss.ejb.client.remoting.RemotingConnectionClusterNodeManager.getEJBReceiver(RemotingConnectionClusterNodeManager.java:117)
at org.jboss.ejb.client.ClusterContext$EJBReceiverAssociationTask.run(ClusterContext.java:333)
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: javax.security.sasl.SaslException: Authentication failed: all available authentication mechanisms failed
at org.jboss.remoting3.remote.ClientConnectionOpenListener$Capabilities.handleEvent(ClientConnectionOpenListener.java:365)
at org.jboss.remoting3.remote.ClientConnectionOpenListener$Capabilities.handleEvent(ClientConnectionOpenListener.java:214)
at org.xnio.ChannelListeners.invokeChannelListener(ChannelListeners.java:72)
at org.xnio.channels.TranslatingSuspendableChannel.handleReadable(TranslatingSuspendableChannel.java:189)
at org.xnio.channels.TranslatingSuspendableChannel$1.handleEvent(TranslatingSuspendableChannel.java:103)
at org.xnio.ChannelListeners.invokeChannelListener(ChannelListeners.java:72)
at org.xnio.nio.NioHandle.run(NioHandle.java:90)
at org.xnio.nio.WorkerThread.run(WorkerThread.java:184)
at ...asynchronous invocation...(Unknown Source)
at org.jboss.remoting3.EndpointImpl.doConnect(EndpointImpl.java:270)
at org.jboss.remoting3.EndpointImpl.doConnect(EndpointImpl.java:251)
at org.jboss.remoting3.EndpointImpl.connect(EndpointImpl.java:349)
at org.jboss.remoting3.EndpointImpl.connect(EndpointImpl.java:333)
at org.jboss.ejb.client.remoting.RemotingConnectionClusterNodeManager.getEJBReceiver(RemotingConnectionClusterNodeManager.java:115)
... 6 more
Apr 03, 2014 10:49:33 PM org.jboss.ejb.client.EJBClientContext getEJBReceiver
DEBUG: org.jboss.ejb.client.RandomDeploymentNodeSelector#5254e73f deployment node selector selected node1 node for appname=ClusterTest,modulename=ClusterTestEJB,distinctname=
Apr 03, 2014 10:49:33 PM org.jboss.ejb.client.EJBClientContext getEJBReceiver
DEBUG: org.jboss.ejb.client.RandomDeploymentNodeSelector#5254e73f deployment node selector selected node1 node for appname=ClusterTest,modulename=ClusterTestEJB,distinctname=
Apr 03, 2014 10:49:33 PM org.jboss.ejb.client.EJBClientContext getEJBReceiver
DEBUG: org.jboss.ejb.client.RandomDeploymentNodeSelector#5254e73f deployment node selector selected node1 node for appname=ClusterTest,modulename=ClusterTestEJB,distinctname=
Apr 03, 2014 10:49:34 PM org.jboss.ejb.client.EJBClientContext getEJBReceiver
DEBUG: org.jboss.ejb.client.RandomDeploymentNodeSelector#5254e73f deployment node selector selected node1 node for appname=ClusterTest,modulename=ClusterTestEJB,distinctname=
Apr 03, 2014 10:49:34 PM org.jboss.ejb.client.EJBClientContext getEJBReceiver
DEBUG: org.jboss.ejb.client.RandomDeploymentNodeSelector#5254e73f deployment node selector selected node1 node for appname=ClusterTest,modulename=ClusterTestEJB,distinctname=
Apr 03, 2014 10:49:34 PM org.jboss.ejb.client.EJBClientContext getEJBReceiver
DEBUG: org.jboss.ejb.client.RandomDeploymentNodeSelector#5254e73f deployment node selector selected node1 node for appname=ClusterTest,modulename=ClusterTestEJB,distinctname=
Terminated
I have tried the following:
Removing the remoting security realm, removing the username and password. I am not sure what else to try at this point.
First time poster, so let me know if more details are needed or if you have questions.
Thanks for the help!
For the record, the inability to execute the EJB was fixed by upgrading from 7.1.1. to 7.1.3. After the upgrade, I was still getting the SASL exception, but the EJB was executing successfully.
The SASL exception was resolved by switching to using the ejb-client instead of the remote-naming libraries and adding clustering properties. Remote naming does not do load balancing anyway, so the switch was necessary for me.
when i run my JSP page on apache tomcat 7 in my eclipse, server output shows up in 30000ms or more some times it never starts up, at first output got in lessthan 700ms,
Any help or suggession on this problem...
sample output...
NFO: Starting Servlet Engine: Apache Tomcat/7.0.12
Mar 18, 2014 10:42:39 PM org.apache.catalina.util.SessionIdGenerator createSecureRandom
INFO: Creation of SecureRandom instance for session ID generation using [SHA1PRNG] took [156] milliseconds.
Mar 18, 2014 10:42:58 PM org.apache.coyote.AbstractProtocolHandler start
INFO: Starting ProtocolHandler ["http-bio-8080"]
Mar 18, 2014 10:42:58 PM org.apache.coyote.AbstractProtocolHandler start
INFO: Starting ProtocolHandler ["ajp-bio-8009"]
Mar 18, 2014 10:42:58 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 30553 ms
Consider the following 2 suggestions:
1)As I commented above check if more then one application is running on the same server.This could be the primary reason.May be 3 or 4 applications might be running once you start your tomcat service.
2)May be some library that you are using for your application is creating some problem,for example the library might be initializing some file storage or may be something else.For this you will have to debug and check your stacktraces.
Hi i am not able to start tomcat 7 server from eclipse.
When i give start from eclipse i get the following error log.
Jan 11, 2013 10:10:27 AM org.apache.catalina.core.AprLifecycleListener init
INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\Program Files\Java\jre7\bin;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:/Program Files/Java/jre7/bin/client;C:/Program Files/Java/jre7/bin;C:/Program Files/Java/jre7/lib/i386;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Users\Jayant\Desktop\data\adt-bundle-windows-x86\eclipse;;.
Jan 11, 2013 10:10:28 AM org.apache.coyote.AbstractProtocolHandler init
INFO: Initializing ProtocolHandler ["http-bio-8080"]
Jan 11, 2013 10:10:28 AM org.apache.coyote.AbstractProtocolHandler init
INFO: Initializing ProtocolHandler ["ajp-bio-8009"]
Jan 11, 2013 10:10:28 AM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 1165 ms
Jan 11, 2013 10:10:28 AM org.apache.catalina.core.StandardService startInternal
INFO: Starting service Catalina
Jan 11, 2013 10:10:28 AM org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/7.0.12
Jan 11, 2013 10:10:28 AM org.apache.coyote.AbstractProtocolHandler start
INFO: Starting ProtocolHandler ["http-bio-8080"]
Jan 11, 2013 10:10:28 AM org.apache.coyote.AbstractProtocolHandler start
INFO: Starting ProtocolHandler ["ajp-bio-8009"]
Jan 11, 2013 10:10:28 AM org.apache.catalina.startup.Catalina start
INFO: Server startup in 507 ms
Jan 11, 2013 10:10:28 AM org.apache.catalina.core.StandardServer await
SEVERE: StandardServer.await: create[localhost:8005]:
java.net.BindException: Address already in use: JVM_Bind
at java.net.DualStackPlainSocketImpl.bind0(Native Method)
at java.net.DualStackPlainSocketImpl.socketBind(Unknown Source)
at java.net.AbstractPlainSocketImpl.bind(Unknown Source)
at java.net.PlainSocketImpl.bind(Unknown Source)
at java.net.ServerSocket.bind(Unknown Source)
at java.net.ServerSocket.<init>(Unknown Source)
at org.apache.catalina.core.StandardServer.await(StandardServer.java:422)
at org.apache.catalina.startup.Catalina.await(Catalina.java:707)
at org.apache.catalina.startup.Catalina.start(Catalina.java:653)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:303)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:431)
Jan 11, 2013 10:10:28 AM org.apache.coyote.AbstractProtocolHandler pause
INFO: Pausing ProtocolHandler ["http-bio-8080"]
Jan 11, 2013 10:10:29 AM org.apache.coyote.AbstractProtocolHandler pause
INFO: Pausing ProtocolHandler ["ajp-bio-8009"]
Jan 11, 2013 10:10:30 AM org.apache.catalina.core.StandardService stopInternal
INFO: Stopping service Catalina
Jan 11, 2013 10:10:30 AM org.apache.coyote.AbstractProtocolHandler stop
INFO: Stopping ProtocolHandler ["http-bio-8080"]
Jan 11, 2013 10:10:30 AM org.apache.coyote.AbstractProtocolHandler stop
INFO: Stopping ProtocolHandler ["ajp-bio-8009"]
Now i am getting the following error.
Jan 11, 2013 10:18:59 AM org.apache.catalina.core.AprLifecycleListener init
INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\Program Files\Java\jre7\bin;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:/Program Files/Java/jre7/bin/client;C:/Program Files/Java/jre7/bin;C:/Program Files/Java/jre7/lib/i386;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Users\Jayant\Desktop\data\adt-bundle-windows-x86\eclipse;;.
Jan 11, 2013 10:19:00 AM org.apache.coyote.AbstractProtocolHandler init
INFO: Initializing ProtocolHandler ["http-bio-8080"]
Jan 11, 2013 10:19:00 AM org.apache.coyote.AbstractProtocolHandler init
INFO: Initializing ProtocolHandler ["ajp-bio-8009"]
Jan 11, 2013 10:19:00 AM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 872 ms
Jan 11, 2013 10:19:00 AM org.apache.catalina.core.StandardService startInternal
INFO: Starting service Catalina
Jan 11, 2013 10:19:00 AM org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/7.0.12
Jan 11, 2013 10:19:00 AM org.apache.coyote.AbstractProtocolHandler start
INFO: Starting ProtocolHandler ["http-bio-8080"]
Jan 11, 2013 10:19:00 AM org.apache.coyote.AbstractProtocolHandler start
INFO: Starting ProtocolHandler ["ajp-bio-8009"]
Jan 11, 2013 10:19:00 AM org.apache.catalina.startup.Catalina start
INFO: Server startup in 535 ms
Jan 11, 2013 10:20:13 AM org.apache.catalina.core.StandardServer await
WARNING: StandardServer.await: Invalid command 'GET / HTTP/1.1' received
Jan 11, 2013 10:20:19 AM org.apache.catalina.core.StandardServer await
WARNING: StandardServer.await: Invalid command '' received
Go to server.xml file and change
<Server port="8005" shutdown="SHUTDOWN">
to
<Server port="8006" shutdown="SHUTDOWN">
The admin port is for receiving admin commands,and the HTTP port is for receiving HTTP requests. You must use different ports. What happened is: the HTTP connector could not start, because the server already opened that port. Your browser/client/whatever sent the request to the admin port , the server does not understand HTTP and logs this error.
Try Reinstalling Tomcat to another port.
In Windows 10 port 8005 is already reserved (for something). Change to for example 8089 (or any free port) in tomcat/conf/server.xml
use:
pkill -f tomcat
to get rid of any existing or un-responsive tomcat instances or processes.
start tomcat.
I was having this problem (port 8005 already being used) and the root cause was due to an existing tomcat process already running on my machine. So, what I needed to do was basically kill the existing process and start up tomcat again.
The common mistake is to use the same Shutdown and Connector port in your server.xml configuration file.
These ports should be different and here is the right example:
<Server port="8005" shutdown="SHUTDOWN">
<Connector port="8983" protocol="HTTP/1.1"
By default Tomcat listens on port 8005 for SHUTDOWN command and it should be always different to Connector port.
If your port is still already in use, try sudo lsof -i:8005 for finding why.
If you are using linux system, then type ps -ef|grep tomcat on terminal. Then find the process id(PID). then type kill -9 on the terminal. Now , start the tomcat server.
2 ways to solve this issue:
1> Go the tomcat server installation directory and open the server.xml file, check if the
Connector and server ports are different. If not make them different ports and then check if nothing is run on these ports
2> Open command prompt from start and type netstat -ano | findstr 8010 to check if the port are being used. if they are used then you get the
TCP 0.0.0.0:8005 0.0.0.0:0 LISTENING 4
TCP [::]:8005 [::]:0 LISTENING 4
then
a> kill the process using the process id (4 in my case) from the task manager
If they are not being used then you see nothing in cmd
If you have multiple apps, check if any of the other apps use the same server port defined in the server.xml file. This was the case for me.
For me (as I was using tomcat server on VS Code).
Tomcat provides a interface called "configure tomcat", there are a options below service status like start, stop etc. The reason I think your terminal showing error is due to internally tomcat is already using that port so you can stop the port from there and start your tomcat server from your IDE terminal.
For detail description and If you OS is windows, search Services and inside you can see the option 'Apache Tomcat'
for people using IntelliJ
Goto Run --> Edit configurations
In the configuration that exists for Tomcat server, change the Admin port
What you can do is rather then killing process you can goto tomcat directory/conf/server.xml, Here you can change shutdown port(8005) to some other port. Also change default port (8080) and other to Different one. So you can run several instance of your Tomcat on single Machine. Restart Your Server (if still issue persists) Recreate it in Eclipse.