St2 python client remote access issue

Hi,
I am new to stackstorm. Trying out the st2client for the remote connectivity. I had some issue on the establishment. Apparently all others seem ok including the access through API, eg https://{host}/api. Would appreciate if anyone can give me some pointer.

My client config is:
[general]
base_url = https://192.168.1.3/api
#api_version = v1
# Path to the CA cert bundle used to validate the SSL certificates
cacert =

[cli]
debug = True
# True to cache the retrieved auth token during authentication in ~/.st2/token
# and use the cached token in the subsequent API requests
cache_token = True
# Timezone used for timestamps displayed in the CLI. If not provided it defaults
# to UTC
timezone = Europe/Ljubljana

[credentials]
# Credentials used to authenticate against the auth API and retrieve the auth
# token
username = st2admin
password = changeme

[api]
url = https://192.168.1.3:9101/api
# or for a remote instance
# url = https://example.com/api/v1

[auth]
url = https://192.168.1.2:9100/auth
# or for a remote instance
#url = https://example.com/auth/v1

[stream]
url = http://192.168.1.2:9102
# or for a remote instance
# url = https://example.com/stream/v1

Issue:
~/st2client/.st2# st2 --config-file=./config action list
2021-05-18 09:48:45,777 WARNING - Auth API server is not available, skipping authentication.
ERROR: HTTPSConnectionPool(host=‘192.168.1.3’, port=9101): Max retries exceeded with url: /api/actions?include_attributes=ref%2Cpack%2Cdescription (Caused by NewConnectionError(’<urllib3.connection.HTTPSConnection object at 0x7f4992178668>: Failed to establish a new connection: [Errno 111] Connection refused’,))

It’s really difficult to help users with networking issues, because the situation is usually so fact-specific that it’s practically impossible for outsiders to know the solution, but I’ll do my best to guess.

Double check that the general.base_url should contain the /api path.

That is not the default password in the [credentials] section. Look closely at the authentication docs, and remember that passwords are case sensitive.

Why do you have different IPs for the ST2 server? Simple ST2 deployments are usually run on one single host.

Have you double checked that you can ping both of those IP addresses? Can you SSH into those servers and check what ports are open? And what is the nginx config on the ST2 server/s?

Your client config might be off a little bit.

The default nginx config for ST2 rewrites some paths to specific ports (without paths), like this for the ST2 server itself:

/api --> https://localhost:9101

/auth --> https://localhost:9100

/stream/v1 --> http://localhost:9102

So you might want to try something like this for your client:

[api]
url = https://192.168.1.3:9101  # <-- Also: double check this IP address
# or for a remote instance
# url = https://example.com/api/v1

[auth]
url = https://192.168.1.2:9100
# or for a remote instance
#url = https://example.com/auth/v1

[stream]
url = http://192.168.1.2:9102
# or for a remote instance
# url = https://example.com/stream/v1

Lastly, run the st2 client with the --debug flag to see the equivalent curl commands. That will help you debug the situation.

Hope this helps!