🎄 Happy Holidays! 🥳
Most of Solace is closed December 24–January 1 so our employees can spend time with their families. We will re-open Thursday, January 2, 2024. Please expect slower response times during this period and open a support ticket for anything needing immediate assistance.
Happy Holidays!
Please note: most of Solace is closed December 25–January 2, and will re-open Tuesday, January 3, 2023.
How to create session with Solace Messaging tcp protocol being in orgnization vpn network.
Hi Team,
Session creation is failing while being in organization VPN. so tried with proxy settings as well given in
but no luck. I tried with multiple debug.
string host = $"tcp://mr-connection-l7ua5omxxxx.messaging.solace.cloud:55555%httpc://rb-proxy-de.bosch.com:8080";
string username = "solace-cloud-client";
string vpnname = "solace1sttryout";
string password = "pflxxxxxxxxxxxxxxxxxxxqp";
SessionProperties sessionProps = new SessionProperties() { Host = host, VPNName = VPNName, UserName = UserName, Password = Password, ReconnectRetries = DefaultReconnectRetries, SSLValidateCertificate = false, //SSLClientCertificateFile = sslFile }; // Connect to the Solace messaging router Console.WriteLine("Connecting as {0}@{1} on {2}...", UserName, VPNName, host); using (ISession session = context.CreateSession(sessionProps, null, null)) { ReturnCode returnCode = session.Connect(); if (returnCode == ReturnCode.SOLCLIENT_OK) { Console.WriteLine("Session successfully connected."); PublishMessage(session); } else { Console.WriteLine("Error connecting, return code: {0}", returnCode); } }
tried with without proxy and with proxy both failed.
also tried but no luck.
string host = $"tcps://mr-connection-l7ua5omxxxx.messaging.solace.cloud:55433%httpc://rb-proxy-de.bosch.com:8080";
Answers
-
Can you provide error messages for your various attempts?
0 -
@amackenzie , thanks for picking up the question, error is as below while debugging in c#.net.
SolaceSystems.Solclient.Messaging.OperationErrorException
HResult=0x80131500
Message=Failed to connect session
Source=SolaceSystems.Solclient.Messaging
StackTrace:
at SolaceSystems.Solclient.Utils.Types.Utilities.GuardAgainstFailOrNotReady(ReturnCode returnCode, String message, Boolean includeSdkError, ISolLogger logger)
at SolaceSystems.Solclient.Messaging.Native.SessionImpl.Connect()
at Tutorial.TopicPublisher.Run(IContext context, String host) in C:\Users\zzu2kor\git source\ConsoleAppSample\SolaceMessaging\SolaceMessaging\Program.cs:line 86
at Tutorial.TopicPublisher.Main(String[] args) in C:\Users\zzu2kor\OneDrive - Bosch Group\tryouts\git source\ConsoleAppSample\SolaceMessaging\SolaceMessaging\Program.cs:line 165This exception was originally thrown at this call stack:
[External Code]
Tutorial.TopicPublisher.Run(SolaceSystems.Solclient.Messaging.IContext, string) in Program.cs
Tutorial.TopicPublisher.Main(string[]) in Program.csprogram is taken from
0 -
@Aaron @marc @amackenzie , Not getting any solution of the above issue, event I checked in with no firewall setting. And not getting any clue why the session creation is failing. Would be great if you provide as code snippet. The git sample program is giving issue in creating session in debug mode.
0 -
Hi @Shambhu,
Unfortunately that error doesn't give us obvious next steps. Have you opened a support ticket yet? They will be able to privately chat about your environment details and find a resolution.
Sorry I couldn't be more helpful!
0