|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
connect to IIB node remotely - java code |
« View previous topic :: View next topic » |
Author |
Message
|
vasilev |
Posted: Tue Jan 21, 2020 5:16 am Post subject: connect to IIB node remotely - java code |
|
|
 Acolyte
Joined: 31 Oct 2014 Posts: 71 Location: Germany
|
Hello,
i am trying to connect to some integration node.
all jetty and websocket libraries are included.
Code: |
useSSL = true;
System.setProperty("jdk.tls.client.protocols", "TLSv1,TLSv1.1,TLSv1.2");
System.setProperty("https.protocols", "TLSv1,TLSv1.1,TLSv1.2");
BrokerConnectionParameters bcp = new IntegrationNodeConnectionParameters(brokerHost, brokerPort, userName, password, useSSL);
try {
b = BrokerProxy.getInstance(bcp);
boolean brokerIsResponding = b.hasBeenPopulatedByBroker(true);
} catch ...
|
on the line of getInstance, i get error:
Could not establish remote connection to target integration node (brokerhost:10443) as user 'username'. HTTP error code was 0.
i cannot find this error.
can you help me to understand what can be the problem.
thank you! _________________ Regards
V.Vasilev |
|
Back to top |
|
 |
fjb_saper |
Posted: Tue Jan 21, 2020 6:11 am Post subject: Re: connect to IIB node remotely - java code |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
vasilev wrote: |
Hello,
i am trying to connect to some integration node.
all jetty and websocket libraries are included.
Code: |
useSSL = true;
System.setProperty("jdk.tls.client.protocols", "TLSv1,TLSv1.1,TLSv1.2");
System.setProperty("https.protocols", "TLSv1,TLSv1.1,TLSv1.2");
BrokerConnectionParameters bcp = new IntegrationNodeConnectionParameters(brokerHost, brokerPort, userName, password, useSSL);
try {
b = BrokerProxy.getInstance(bcp);
boolean brokerIsResponding = b.hasBeenPopulatedByBroker(true);
} catch ...
|
on the line of getInstance, i get error:
Could not establish remote connection to target integration node (brokerhost:10443) as user 'username'. HTTP error code was 0.
i cannot find this error.
can you help me to understand what can be the problem.
thank you! |
Is port 10443 really the admin port for the Integration Node?  _________________ MQ & Broker admin |
|
Back to top |
|
 |
vasilev |
Posted: Tue Jan 21, 2020 6:38 am Post subject: |
|
|
 Acolyte
Joined: 31 Oct 2014 Posts: 71 Location: Germany
|
Hi,
yes, it is changed
from integration toolkit i can connect, so no problems with user rights.
when i tried the java code to localhost, without user/pass, it is also fine.
from configuration pov .. as i am reading in the specification, it is correct.
cannot understand where exactly is the problem. _________________ Regards
V.Vasilev |
|
Back to top |
|
 |
vasilev |
Posted: Tue Jan 28, 2020 10:39 pm Post subject: |
|
|
 Acolyte
Joined: 31 Oct 2014 Posts: 71 Location: Germany
|
Hello,
for those who have the same problem - you have to add the truststore:
Code: |
System.setProperty("javax.net.ssl.trustStore", SSLKEY);
System.setProperty("javax.net.ssl.trustStorePassword", SSLPASS); |
_________________ Regards
V.Vasilev |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|
|