cannot establish connection to broker after changing the client username

Qais
Qais Member Posts: 9
edited September 2020 in PubSub+ Event Portal #1


:/ I did the following first

  • created a client username with client profile = default and acl-profile = test-profile
  • The acle-profile (test-profile) has Client Connect Default Action=allow , publish = Publish Default Action, and Subscribe Default Action = disallow
  • the Subscribe Default Action has Exception = */global/export/germany/>
  • I get timeout error and "Error subscribing: cannot perform operation CTRL while in state SessionDisconnected :/
Tagged:

Comments

  • marc
    marc Member, Administrator, Moderator, Employee Posts: 959 admin

    Hi @Qais,
    I went through the steps you outlined to make sure there weren't any steps missing and it worked successfully for me. It seems weird that you are in a state of SessionDisconnected...that error sounds like it would be caused by the app losing connectivity to the broker vs. a username/password or ACL permissions issue. Any chance you're having network issues or think something could be preventing the connection from staying up?

    When it comes to testing out if it's an ACL issue it would actually be more useful if you could use the "Try Me!" menu option within the Broker Web UI itself. You can get to it by choosing the "Manage Service" button at the top right side of the Solace Cloud Console when within a Message Service. It has a few more features than the CodePen one and will give you an error that says "Subscription ACL Denied" if you try to subscribe to a topic that your client-username doesn't have permission to listen on.

    Hope that helps!

  • Qais
    Qais Member Posts: 9

    Hi Marc, thank you for your prompt reply!
    I tried it in the "Try Me!) Web UI. The Connection does not fail but it keeps trying to connect for hours. With no success of connecting.
    I am not sure about the password I enter. Do I reuse the password from connect->Solace Web Messaging->password (see attachment). ? I mean when I create a "Client Username" under Manage -> Access Control -> Client Usernames and try to use this Client Username during "Try Me" connection, do I need a new password or I can use the one from the solace web messaging (in the attachement)?

  • marc
    marc Member, Administrator, Moderator, Employee Posts: 959 admin

    Hi @Qais,
    You should be able to use any client-username that you setup under "Manage -> Access Control -> Client Usernames" or the default solace-cloud-client that you'd find under Solace Web Messaging. It definitely shouldn't take a long time to connect. Can you purposefully try an incorrect password and see if you get a "The username or password is incorrect" error or if it just continues to spin?

    If you don't get the error can you open the console in your browser and see if there are any errors that might hint at the issue?

  • Qais
    Qais Member Posts: 9

    I get now "The username or password is incorrect" . I know for certain that the password is correct and the username is just as in the client-username. Weird :D

  • Aaron
    Aaron Member, Administrator, Moderator, Employee Posts: 636 admin

    You could try resetting the password to your new test-username client username, just to make sure..? In the PubSub+ Manager, under Access Control -> Client Usernames -> edit your new one, and hit the "change password". Not sure if that will help. Otherwise, to narrow down the issue, try changing the ACL Profile for your test-username back to the default ACL Profile, just to allow you to pub/sub from any topic... just as a test. But that shouldn't impact your connectivity.

    BTW, does using the default pre-filled-in values ("solace-cloud-client") username and stuff work every time? No issues connecting?

  • Qais
    Qais Member Posts: 9
    edited September 2020 #7

    @Aaron @marc changing the password of the newly created client-username fixed the issue. Thank you very much both of you!! :smiley:

  • marc
    marc Member, Administrator, Moderator, Employee Posts: 959 admin

    Woohoo! Thanks for the idea @Aaron