solClient_session_connect failed subCode: SOLCLIENT_SUBCODE_LOGIN_FAILURE, responseCode: 401, reason

Options
yihuan
yihuan Member Posts: 3

I started a Solace broker docker instance, created message-vpn and username: esptest. When my solace pubsub client tries to connect to the broker using username/password, it gets "Unauthorized error". I have set up the auth-type to internal and followed the doc: https://docs.solace.com/Features/VPN/CLI-Sequence-VPN-to-C-Profiles.htm. Any ideas what could be wrong?

Trace:solClient_session_connect failed, error message = Not ready, subCode: SOLCLIENT_SUBCODE_LOGIN_FAILURE, responseCode: 401, reason: Unauthorized

Answers

  • marc
    marc Member, Administrator, Moderator, Employee Posts: 923 admin
    Options

    Hi @yihuan,

    Can you double check that you are trying to connect with the client-username and not the management username that you would login to PS+ Manager with? Also that the client-username is enabled?

    If all that looks correct check the logs for the container. You should be able to do that using `docker logs solace`  where solace is whatever you named the container.

    Hope that helps!

  • yihuan
    yihuan Member Posts: 3
    Options

    Thanks @marc.

    I have the client-username defined and enabled. I don't see any related logs in docker logs solace either.


  • marc
    marc Member, Administrator, Moderator, Employee Posts: 923 admin
    Options

    Hmm. Try a few more things for troubleshooting:

    1. Are you using the default acl-profile or did you create a custom one? The ACL profile might be preventing you from being able to connect.
    2. Try to update the password on the client-username just to ensure it's not the wrong password. That should be easy to do in the PubSub+ Manager.
    3. Try to use the "Try-Me" tab in the broker to connect with your client-username/password to see if it's your app.

    If none of the above works you'll need to go into your broker and access the logs. I'm not sure why `docker logs solace` didn't show anything for you.

  • yihuan
    yihuan Member Posts: 3
    Options

    Thanks. It seems nothing works. Try-Me can't connect:

    Using default:

    My command to start the broker:

    sudo docker run -d -p 8080:8080 -p 55555:55555 --shm-size=1g --env username_admin_globalaccesslevel=admin --env username_admin_password=admin --env TZ=US/Eastern --name=solace --mount type=bind,source=/mnt/solace,destination=/var/lib/solace,ro=false solace/solace-pubsub-standard

    I do see error in logs but I don't thinks it is related to my problem.

    2022/08/24 16:15:47 [error] 551#551: *49 open() "/usr/sw/loads/currentload/www/assets/schema/solace-cloud.json" failed (2: No such file or directory), client: 172.16.54.36, server: , request: "GET /assets/schema/solace-cloud.json HTTP/1.1", host: "solace06:8080", referrer: "http://solace06:8080/"