Aman Vaishya
Aman Vaishya

Reputation: 199

Unable to connect to Solace

I am trying to connect Solace using my Java code

properties.setProperty(JCSMPProperties.HOST, "XXXXXXXXXX:80");
properties.setProperty(JCSMPProperties.USERNAME, "USERNAME");
properties.setProperty(JCSMPProperties.PASSWORD,  "PASSWORD");
properties.setProperty(JCSMPProperties.VPN_NAME, "VPN_NAME");
//properties.setProperty(JCSMPProperties.)
final JCSMPSession session = JCSMPFactory.onlyInstance().createSession(properties);
session.connect();

while connecting I am getting the following error and I have no clue as of why.

Error communicating with the router. cause: java.io.IOException: Could not read valid SMF Header from network. found smf version=0 
Caused by: java.io.IOException: Could not read valid SMF Header from network. found smf version=0

Can someone please explain me why we get this error. Thanks in advance.

Upvotes: 2

Views: 1482

Answers (1)

Himanshu Gupta
Himanshu Gupta

Reputation: 717

I see you are connecting to port 80. Is that correct? It should be 55555.

For example,

final JCSMPProperties properties = new JCSMPProperties();
properties.setProperty(JCSMPProperties.HOST, "hostname:55555");
properties.setProperty(JCSMPProperties.USERNAME, "USERNAME");
properties.setProperty(JCSMPProperties.PASSWORD, "PASSWORD");
properties.setProperty(JCSMPProperties.VPN_NAME, "VPN_NAME");
final JCSMPSession session = JCSMPFactory.onlyInstance().createSession(properties);

session.connect();

Upvotes: 1

Related Questions