Remote connection of Jboss 7 server fails with Proxy exception - java

I have a Jboss 7 server running & accepting secure connections on port 443.
All along i was testing locally which was working fine . However now when i make connection attempts i get a
"javax.naming.NamingException: Failed to create proxy [Root exception is java.lang.IllegalStateException: ..." .
I tried to follow what is written # EJB invocations from a remote client using JNDI
I guess my jndi.properties & jboss-ejb-client.properties file need changes . I think i got it right but still no success .
1 ) jndi.properties
java.naming.factory.url.pkgs=org.jboss.ejb.client.naming
2 ) jboss-ejb-client.properties
remote.connectionprovider.create.options.org.xnio.Options.SSL_ENABLED=false
remote.connections=default
remote.connection.default.host=10.160.148.61
remote.connection.default.port = 4447
remote.connection.default.connect.options.org.xnio.Options.SASL_POLICY_NOANONYMOUS=false
Any suggestions anyone . Making the port 443 also doesnt help .
My ejb call from the client
InitialContext aJNDI = new InitialContext();
Ppi handle = (Ppi) aJNDI
.lookup("ejb:PPIEAR/PService/PConnect!com.gem.p.PConnection?stateful");
Posting Full stracktrace :
log4j: Finished configuring.
- JBoss EJB Client version 1.0.5.Final
- XNIO Version 3.0.3.GA
- XNIO NIO Implementation Version 3.0.3.GA
- JBoss Remoting version 3.2.3.GA
- Could not register a EJB receiver for connection to remote://10.160.148.61:4447
java.lang.RuntimeException: Operation failed with status WAITING
at org.jboss.ejb.client.remoting.IoFutureHelper.get(IoFutureHelper.java:93)
at org.jboss.ejb.client.remoting.ConfigBasedEJBClientContextSelector.setupEJBReceivers(ConfigBasedEJBClientContextSelector.java:121)
at org.jboss.ejb.client.remoting.ConfigBasedEJBClientContextSelector.<init>(ConfigBasedEJBClientContextSelector.java:78)
at org.jboss.ejb.client.EJBClientContext.<clinit>(EJBClientContext.java:77)
at org.jboss.ejb.client.EJBClient.createSession(EJBClient.java:160)
at org.jboss.ejb.client.naming.ejb.EjbNamingContext.doCreateProxy(EjbNamingContext.java:135)
at org.jboss.ejb.client.naming.ejb.EjbNamingContext.createEjbProxy(EjbNamingContext.java:113)
at org.jboss.ejb.client.naming.ejb.EjbNamingContext.lookup(EjbNamingContext.java:96)
at javax.naming.InitialContext.lookup(Unknown Source)
..

Quoting this page:
WARN: Could not register a EJB receiver for connection to
remote://10.160.148.61:4447 java.lang.RuntimeException: Operation failed
with status WAITING
This is commonly caused by a wrong combination of IP or port in the file jboss-ejb-client.properties.
You might be unable to reach that host address
Maybe you are using a port-offset on that server, so instead of port 4447 you should use 4447 + offset
You could start by testing if you can connect to your target using telnet:
telnet 10.160.148.61 4447

Related

Cant run index.jsp from web aplication

I made Java Enterprise app using Java 15.0.2 and GlassFish 4.1.1.
This is what I got in glassfish output:
`C:\Users\s\Documents\Java\glassfish4\glassfish\bin\asadmin.bat start-domain domain1
Attempting to start domain1.... Please look at the server log for more details.....
C:\Users\s\.jdks\openjdk-15.0.2\bin\java.exe -Dfile.encoding=windows-1252 -classpath C:\Users\s\AppData\Local\Temp\classpath1367306742.jar com.intellij.javaee.oss.process.JavaeeProcess 64094 com.intellij.javaee.oss.glassfish.agent.Glassfish31Agent
[2021-03-19 09:07:21,872] Artifact demo:war exploded: Waiting for server connection to start artifact deployment...
Detected server admin port: 4848
Detected server http port: 8080
`
Unable to ping server at localhost 4848
Use the ping-connection-pool subcommand in remote mode to test if a connection pool is usable. For example, if you create a new JDBC connection pool for an application that is expected to be deployed later, you can test the JDBC pool with this subcommand before the application is deployed. Running a ping will force the creation of the pool if it hasn't already been created.
Before You Begin
According to Oracle Glassfish admin guide
Before you can contact a connection pool, the connection pool must be created with authentication, and the server or database must be running.
Ensure that the server is running.
Remote subcommands require a running server.
Ping a connection pool by using the ping-connection-pool(1) subcommand.

-Dcom.ibm.mq.cfg.useIBMCipherMappings=false not working and getting MQRC_UNSUPPORTED_CIPHER_SUITE

I am using SSLCIPHERSUITE(TLS_RSA_WITH_AES_128_CBC_SHA256) in our application (verified that it is used in the generated binding file) and same ciphersuite is also configured on the channel.
However, I am constantly getting the below error –
2020-03-19 12:52:46,145 [Camel (camelContext) thread #13 - JmsConsumer[queue]] [WARN] o.a.c.c.jms.DefaultJmsMessageListenerContainer [] - Could not refresh JMS Connection for destination 'queue' - retrying in 5000 ms. Cause: JMSWMQ0018: Failed to connect to queue manager 'ABC' with connection mode 'Client' and host name 'null'.; nested exception is com.ibm.mq.MQException: JMSCMQ0001: WebSphere MQ call failed with compcode '2' ('MQCC_FAILED') reason '2400' ('MQRC_UNSUPPORTED_CIPHER_SUITE').
com.ibm.msg.client.jms.DetailedJMSException: JMSWMQ0018: Failed to connect to queue manager 'ABC' with connection mode 'Client' and host name 'null'.
When looked at ibm mq logs at the client end, the ciphersuite it is using is SSL_RSA_WITH_AES_128_CBC_SHA256
Troubleshooting tried:
Using -Dcom.ibm.mq.cfg.useIBMCipherMappings=false. Looks like this is not working for some reason and hence it is using SSL*** instead of TLS***. Tried a different ciphersuite as well and noticed same behavior. Configured same option in JMSAdmin call which generates binding file but no use.
Tried using preferTLS option provided by IBM but not useful in this case
Tried specifying FIPS setting at client end to YES and NO but same issue
Verified Java policy and it is unlimited strength jurisdiction policy
Verified Java version supports TLS**** cipher suite that is configured
Upgraded versions of ibm mq jars to 8.0.0.10 which is wmq client version on linux, also tried 8.0.0.12, 9.0.4.0, 9.1.**
Upgraded jms.jar to 2.0
Got certificates verified from MQ team and they all look right and complete
Can someone please let me know if they have faced similar issue and how it was resolved?
App is also using spring-jms 3.1.0-RELEASE and camel-jms 2.10.0
Finally resolved this issue. Had to configure -Dcom.ibm.mq.cfg.useIBMCipherMappings=false at two places. One in java opts of tomcat server startup and other in JMSAdmin used for generating binding file.

JMS - Couldn't create session factory even if connection to remote provider is OK

I make a jar to connect to JMS provider, it's work fine in a server (a) but doesn't work on a server (b).
I verify that connection to the JMS provider from server (b) is OK via telnet as shown below:
-> telnet -d 10.127.161.247 4447
Trying 10.127.161.247...
Connected to 10.127.161.247.
The logs and exception that it's throw is below :
2018/08/01 11:19:47:921 - Processing command line arguments...
2018/08/01 11:19:47:927 - Preparing the output... Writing to file = true
2018/08/01 11:19:50:315 - Trying to establish connection, attempt: 0
2018/08/01 11:19:52:132 - Connecting to provider: remote://10.127.161.247:4447 using user: oad_user
2018/08/01 11:19:52:132 - Creating a regular (non-secure) connection factory...
2018/08/01 11:19:53:073 - Opening a connection to the JMS provider...
2018/08/01 11:20:24:192 - Attempt failed: Failed to create session factory
javax.jms.JMSException: Failed to create session factory
at org.apache.activemq.artemis.jms.client.ActiveMQConnectionFactory.createConnectionInternal(ActiveMQConnectionFactory.java:675)
at org.apache.activemq.artemis.jms.client.ActiveMQConnectionFactory.createTopicConnection(ActiveMQConnectionFactory.java:267)
at com.alcatel.ossgw.client.jms.JmsSubscriberClient.prepareConnection(JmsSubscriberClient.java:334)
at com.alcatel.ossgw.client.jms.JmsSubscriberClient.connect(JmsSubscriberClient.java:274)
at com.alcatel.ossgw.client.jms.JmsSubscriberClient.listen(JmsSubscriberClient.java:97)
at com.alcatel.ossgw.client.jms.JmsSubscriberClient.main(JmsSubscriberClient.java:536)
Caused by: ActiveMQNotConnectedException[errorType=NOT_CONNECTED message=AMQ119007: Cannot connect to server(s). Tried with all available servers.]
at org.apache.activemq.artemis.core.client.impl.ServerLocatorImpl.createSessionFactory(ServerLocatorImpl.java:818)
at org.apache.activemq.artemis.jms.client.ActiveMQConnectionFactory.createConnectionInternal(ActiveMQConnectionFactory.java:67
I don't how to debug such a problem knowing i'm new in JMS, i'll be grateful for any remarks and ideas..
Many thanks
Did you ever find out why this was happening?
I have a related issue where an active JMS connection suddenly disconnects and the system starts throwing this exception until a system restart is done and then it connects again without fail.

how can we add a document using solr cloud server

While adding a document using solr cloud server I'm getting following exception
60 [main] INFO org.apache.solr.common.cloud.ConnectionManager - Waiting for client to connect to ZooKeeper
65 [main-SendThread(jmajeed.ibsorb.com:8982)] INFO org.apache.zookeeper.ClientCnxn - Opening socket connection to server jmajeed.ibsorb.com/192.168.70.91:8982. Will not attempt to authenticate using SASL (unknown error)
69 [main-SendThread(jmajeed.ibsorb.com:8982)] INFO org.apache.zookeeper.ClientCnxn - Socket connection established to jmajeed.ibsorb.com/192.168.70.91:8982, initiating session
Exception in thread "main" java.lang.RuntimeException: java.util.concurrent.TimeoutException: Could not connect to ZooKeeper 192.168.70.91:8982/#/hotelcontent within 10000 ms
Does anybody has any idea why this is happening??
Thanks.
Have the disturbed the default configuration of solr nodes because by default if you do not specify the port the first node in the cluster will start in 8983 port so check this first. If this is not the problem then check whether the cluster is up or not by accessing admin UI of solr cloud. Then see whether all the shards in the cluster are alive by clicking on the cloud tab.
If everything is fine and still you are facing the above problem then are you trying to access a remote solr cloud server and it is firewall issue.

javax.naming.CommunicationException When enabling a firewall

I'm getting the following error when i'm trying to connect via RMI to a JBoss application
javax.naming.CommunicationException [Root exception is java.lang.ClassNotFoundException: org.jboss.proxy.ClientContainer]
This error occurs only after enabling IPtables on a linux server.
At the moment, we use this application as a logging tool between 2 servers, but it all Ports to be open because RMI uses random ports for the export of objects if i'm not mistaken
We have tested with some small test applications and the following is a viable solution when using firewalls with RMI:
UnicastRemoteObject.exportObject(server, 1244);
I export the object over port 1244
The following ports are open at this moment:
1244: The RMI-export object
1066: Binding with RMI on the server
1099: Registering on the management server
Is there anybody that could push me in the right direction to get this implementation working?
Thanks in advance!

Categories

Resources