Can't connect server with app

Hey,

I am struggling to connect my MC server with the client app.
The deepstream log shows that the following:

AUTH_ATTEMPT | 192.168.224.1: AREQ{"client-version":1,"role":"participant","nickname":"MobileCoach Client User","intervention-pattern":"test","intervention-password":"testit"}
S | for R:messages/b6VvPSt40G8WYdYBAJWML9c2v1593190575578kQlU2ht3XAJRTBhw1JEc2KUhB by server server
US | for R:messages/b6VvPSt40G8WYdYBAJWML9c2v1593190575578kQlU2ht3XAJRTBhw1JEc2KUhB by server server
S | for R:messages/b6VvPSt40G8WYdYBAJWML9c2v1593190575578kQlU2ht3XAJRTBhw1JEc2KUhB by server server
RECORD_DELETION | messages/b6VvPSt40G8WYdYBAJWML9c2v1593190575578kQlU2ht3XAJRTBhw1JEc2KUhB
NOT_SUBSCRIBED | server server is not subscribed to messages/b6VvPSt40G8WYdYBAJWML9c2v1593190575578kQlU2ht3XAJRTBhw1JEc2KUhB
INVALID_AUTH_DATA | invalid authentication data
CLIENT_DISCONNECTED | null
INCOMING_CONNECTION | from undefined (192.168.224.1)
AUTH_ATTEMPT | 192.168.224.1: AREQ{"client-version":1,"role":"participant","nickname":"MobileCoach Client User","intervention-pattern":"test","intervention-password":"testit"}
S | for R:messages/2wv1g27sTxTd4QPlcTAUd1KPD1593190578453UfB3NhMVGcjAOIA6Aztgbpm5x by server server
US | for R:messages/2wv1g27sTxTd4QPlcTAUd1KPD1593190578453UfB3NhMVGcjAOIA6Aztgbpm5x by server server
S | for R:messages/2wv1g27sTxTd4QPlcTAUd1KPD1593190578453UfB3NhMVGcjAOIA6Aztgbpm5x by server server
RECORD_DELETION | messages/2wv1g27sTxTd4QPlcTAUd1KPD1593190578453UfB3NhMVGcjAOIA6Aztgbpm5x
INVALID_AUTH_DATA | invalid authentication data
NOT_SUBSCRIBED | server server is not subscribed to messages/2wv1g27sTxTd4QPlcTAUd1KPD1593190578453UfB3NhMVGcjAOIA6Aztgbpm5x
CLIENT_DISCONNECTED | null

First I thought that the app can’t get an internet connection, as I am getting the “To reach your coach, you need an internet connection” message. Though, now I think it is due to an authentication error.

The pattern and password is properly set in the MC Dashboard.

Any idea what could be wrong?

I think the client tried to connect to the deepstream server before the tomcat server.

Can you please try to restart the docker containers with the app being closed so that the tomcat first connects to the deepstream?

Please also refer here Connect mobile client to server. If you still have the same issues please contact us.

Best,
Prabhu

I restarted the docker containers but it still doesn’t connect. I am now getting the following deepstream log:

deepstreamservice_1  | 2020-07-02T09:02:21.595620476Z Ncat: Version 7.50 ( https://nmap.org/ncat )
deepstreamservice_1  | 2020-07-02T09:02:21.636773385Z Ncat: Connection refused.
deepstreamservice_1  | 2020-07-02T09:02:22.646471180Z Ncat: Version 7.50 ( https://nmap.org/ncat )
deepstreamservice_1  | 2020-07-02T09:02:22.663559328Z Ncat: Connected to 192.168.224.9:27017.
deepstreamservice_1  | 2020-07-02T09:02:22.663658810Z Ncat: 0 bytes sent, 0 bytes received in 0.02 seconds.
deepstreamservice_1  | 2020-07-02T09:02:23.156581153Z       _                     _
deepstreamservice_1  | 2020-07-02T09:02:23.156606376Z    __| | ___  ___ _ __  ___| |_ _ __ ___  __ _ _ __ ____
deepstreamservice_1  | 2020-07-02T09:02:23.156610808Z   / _` |/ _ \/ _ \ '_ \/ __| __| '__/ _ \/ _` | '_ ` _  \
deepstreamservice_1  | 2020-07-02T09:02:23.156615195Z  | (_| |  __/  __/ |_) \__ \ |_| | |  __/ (_| | | | | | |
deepstreamservice_1  | 2020-07-02T09:02:23.156619204Z   \__,_|\___|\___| .__/|___/\__|_|  \___|\__,_|_| |_| |_|
deepstreamservice_1  | 2020-07-02T09:02:23.156623259Z                  |_|
deepstreamservice_1  | 2020-07-02T09:02:23.156935401Z  =====================   starting   =====================
deepstreamservice_1  | 2020-07-02T09:02:23.157223429Z INFO | State transition (start): Stopped -> LoggerInit
deepstreamservice_1  | 2020-07-02T09:02:23.157569224Z INFO | logger ready: std out/err
deepstreamservice_1  | 2020-07-02T09:02:23.158881871Z INFO | State transition (logger-started): LoggerInit -> PluginInit
deepstreamservice_1  | 2020-07-02T09:02:23.159181856Z INFO | deepstream version: 3.1.0
deepstreamservice_1  | 2020-07-02T09:02:23.159295000Z INFO | configuration file loaded from /etc/deepstream/config.yml
deepstreamservice_1  | 2020-07-02T09:02:23.159397380Z INFO | library directory set to: /var/lib/deepstream
deepstreamservice_1  | 2020-07-02T09:02:23.160037107Z INFO | cache ready: local cache
deepstreamservice_1  | 2020-07-02T09:02:23.160174675Z INFO | authenticationHandler ready: http webhook to https://test.server:8443/MC/deepstream
deepstreamservice_1  | 2020-07-02T09:02:23.175624569Z INFO | permissionHandler ready: valve permissions loaded from /etc/deepstream/deepstream-permissions.yml
deepstreamservice_1  | 2020-07-02T09:02:23.275943791Z INFO | storage ready: no dependency description provided
deepstreamservice_1  | 2020-07-02T09:02:23.275958142Z INFO | State transition (plugins-started): PluginInit -> ServiceInit
deepstreamservice_1  | 2020-07-02T09:02:23.278431721Z INFO | State transition (services-started): ServiceInit -> ConnectionEndpointInit
deepstreamservice_1  | 2020-07-02T09:02:23.286535646Z INFO | Listening for websocket connections on 0.0.0.0:6020/deepstream
deepstreamservice_1  | 2020-07-02T09:02:23.286544325Z INFO | Listening for health checks on path /health-check
deepstreamservice_1  | 2020-07-02T09:02:23.286617524Z INFO | connectionEndpoint ready: WebSocket Connection Endpoint
deepstreamservice_1  | 2020-07-02T09:02:23.286712424Z INFO | State transition (connection-endpoints-started): ConnectionEndpointInit ->
Running
deepstreamservice_1  | 2020-07-02T09:02:23.286792405Z INFO | Deepstream started
deepstreamservice_1  | 2020-07-02T09:02:30.701515576Z INCOMING_CONNECTION | from undefined (192.168.224.1)
deepstreamservice_1  | 2020-07-02T09:02:30.714964099Z AUTH_ATTEMPT | 192.168.224.1: AREQ{"client-version":1,"user":"server","secret":"K8WVSYvVQtbzRjcNVVY54edvh2vVvIUx33zAM9EguV3nzX56BgAfUlu1VtzoxnKUu1T","role":"server","intervention-password":"not required"}
deepstreamservice_1  | 2020-07-02T09:02:30.856993752Z AUTH_SUCCESSFUL | server server
deepstreamservice_1  | 2020-07-02T09:02:30.888323859Z S | for U:U by server server
deepstreamservice_1  | 2020-07-02T09:02:30.890602229Z S | for P:rest-token by server server
deepstreamservice_1  | 2020-07-02T09:02:30.891874845Z S | for P:push-token by server server
deepstreamservice_1  | 2020-07-02T09:02:30.895539683Z S | for P:user-message by server server
deepstreamservice_1  | 2020-07-02T09:02:30.896083218Z S | for P:dashboard-message by server server
deepstreamservice_1  | 2020-07-02T09:02:30.896636311Z S | for P:user-intention by server server
deepstreamservice_1  | 2020-07-02T09:02:30.897287777Z S | for P:user-variable by server server
deepstreamservice_1  | 2020-07-02T09:02:30.898499197Z S | for P:message-diff by server server
deepstreamservice_1  | 2020-07-02T09:02:30.899001185Z S | for P:dashboard-diff by server server

I can’t spot any errors in this log. When trying to connect, I am still getting the “To reach your coach, you need an internet connection” message.