ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum IndexWebSphere Message Broker Supportconnect to IIB node remotely - java code

Post new topicReply to topic
connect to IIB node remotely - java code View previous topic :: View next topic
Author Message
vasilev
PostPosted: Tue Jan 21, 2020 5:16 am Post subject: connect to IIB node remotely - java code Reply with quote

Apprentice

Joined: 31 Oct 2014
Posts: 25
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
Vasilev.link - IT Consulting Services
Back to top
View user's profile Send private message Visit poster's website
fjb_saper
PostPosted: Tue Jan 21, 2020 6:11 am Post subject: Re: connect to IIB node remotely - java code Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20251
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
View user's profile Send private message Send e-mail
vasilev
PostPosted: Tue Jan 21, 2020 6:38 am Post subject: Reply with quote

Apprentice

Joined: 31 Oct 2014
Posts: 25
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
Vasilev.link - IT Consulting Services
Back to top
View user's profile Send private message Visit poster's website
vasilev
PostPosted: Tue Jan 28, 2020 10:39 pm Post subject: Reply with quote

Apprentice

Joined: 31 Oct 2014
Posts: 25
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
Vasilev.link - IT Consulting Services
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:
Post new topicReply to topic Page 1 of 1

MQSeries.net Forum IndexWebSphere Message Broker Supportconnect to IIB node remotely - java code
Jump to:



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
Protected by Anti-Spam ACP


Theme by Dustin Baccetti
Powered by phpBB 2001, 2002 phpBB Group

Copyright MQSeries.net. All rights reserved.