CONNECT_FAILED_ERROR : All hosts failed DNS resolution

Options
tbhargava18
tbhargava18 Member Posts: 9 ✭✭
I am trying to establish connection from my nodejs app(angular) to solace and I am getting CONNECT_FAILED_ERROR : All hosts failed DNS resolution (error subcode 145). I am not sure what I am missing. I am able to connect to solace from my backend service using the same host and port details. From UI its giving me error

Answers

  • uherbst
    uherbst Member, Employee Posts: 121 Solace Employee
    Options

    Hi @tbhargava18 ,

    would you show us your connect details ?

    Thank you

    Uli

  • tbhargava18
    tbhargava18 Member Posts: 9 ✭✭
    Options

    I cannot share the exact details, but url looks something like below:


    url : tcps://abc.net:55443

    vpnName :abc_xyz

    Username and password

  • uherbst
    uherbst Member, Employee Posts: 121 Solace Employee
    Options

    Can you resolve abc.net from the system, where your application is running ?

    (If it is a pod in k8s: try to resolve abc.net from inside a shell in your pod).

  • tbhargava18
    tbhargava18 Member Posts: 9 ✭✭
    Options

    i am trying the connection from my local machine and I am able to resolve the host from my system.

    Also, I use the same details to connect from a backend service and it works. From UI it doesnt. When I open the solace dashboard using the address abc.net from my browser, I see the connection is not secure and ERR_CERT_AUTHORITY_INVALID. Could that be causing issue ?

  • Tamimi
    Tamimi Member, Administrator, Employee Posts: 497 admin
    edited February 22 #6
    Options

    Hey @tbhargava18 could you provide a code snippet on how you are attempting to connect to the broker?

    Side note, did you get the chance of checking the solace community angular github repo? Might be helpful to get ideas on how to use angular with solace

  • tbhargava18
    tbhargava18 Member Posts: 9 ✭✭
    Options

    Attached the code snippet

  • tbhargava18
    tbhargava18 Member Posts: 9 ✭✭
    Options

    I tried changing the protocol to use ws://abc.net:55443 and I see it trying to establish a connection but I now get "CONNECTION_ERROR" subCode 44.

  • ric
    ric Member Posts: 1 New User
    Options

    Any solution for the above issue. I am getting the same issue