AS failing after starting join-server api

I am trying to use an external join-server and the application server seems to be crashing as soon as it starts binding with the join-server. Not sure what I am missing. Do I have to do anything with the options: “ca_cert= tls_cert= tls_key=” ? Can I ignore them?

Jan 10 16:36:17 rak-gateway systemd[1]: chirpstack-application-server.service: Failed with result 'exit-code'.
Jan 10 16:36:17 rak-gateway chirpstack-application-server[9825]: time="2020-01-10T16:36:17-05:00" level=info msg="api/js: starting join-server api" bind="192.168.10.20:8886" ca_cert= tls_cert= tls_key=
Jan 10 16:36:17 rak-gateway systemd[1]: chirpstack-application-server.service: Main process exited, code=exited, status=1/FAILURE^C

Thanks in advance!

Please check the logs:

sudo journalctl -f -n 100 -u chirpstack-application-server

@brocaar, thanks for your response. I did check the logs and provided a small snapshot in my earlier post. Here is a bigger snapshot from the logs:

Jan 13 11:27:07 rak-gateway systemd[1]: Started ChirpStack Application Server.
Jan 13 11:27:07 rak-gateway chirpstack-application-server[29531]: time="2020-01-13T11:27:07-05:00" level=info msg="starting ChirpStack Application Server" docs="https://www.chirpstack.io/" version=3.5.1
Jan 13 11:27:07 rak-gateway chirpstack-application-server[29531]: time="2020-01-13T11:27:07-05:00" level=info msg="storage: setting up storage package"
Jan 13 11:27:07 rak-gateway chirpstack-application-server[29531]: time="2020-01-13T11:27:07-05:00" level=info msg="storage: setup metrics"
Jan 13 11:27:07 rak-gateway chirpstack-application-server[29531]: time="2020-01-13T11:27:07-05:00" level=info msg="storage: setting up Redis pool"
Jan 13 11:27:07 rak-gateway chirpstack-application-server[29531]: time="2020-01-13T11:27:07-05:00" level=info msg="storage: connecting to PostgreSQL database"
Jan 13 11:27:07 rak-gateway chirpstack-application-server[29531]: time="2020-01-13T11:27:07-05:00" level=info msg="storage: applying PostgreSQL data migrations"
Jan 13 11:27:07 rak-gateway chirpstack-application-server[29531]: time="2020-01-13T11:27:07-05:00" level=info msg="storage: PostgreSQL data migrations applied" count=0
Jan 13 11:27:07 rak-gateway chirpstack-application-server[29531]: time="2020-01-13T11:27:07-05:00" level=info msg="integration/mqtt: TLS config is empty"
Jan 13 11:27:07 rak-gateway chirpstack-application-server[29531]: time="2020-01-13T11:27:07-05:00" level=info msg="integration/mqtt: connecting to mqtt broker" server="tcp://localhost:1883"
Jan 13 11:27:07 rak-gateway chirpstack-application-server[29531]: time="2020-01-13T11:27:07-05:00" level=info msg="integration/mqtt: connected to mqtt broker"
Jan 13 11:27:07 rak-gateway chirpstack-application-server[29531]: time="2020-01-13T11:27:07-05:00" level=info msg="integration/mqtt: subscribing to tx topic" qos=0 topic=application/+/device/+/tx
Jan 13 11:27:07 rak-gateway chirpstack-application-server[29531]: time="2020-01-13T11:27:07-05:00" level=info msg="api/as: starting application-server api" bind="0.0.0.0:8001" ca_cert= tls_cert= tls_key=
Jan 13 11:27:07 rak-gateway chirpstack-application-server[29531]: time="2020-01-13T11:27:07-05:00" level=info msg="api/external: starting api server" bind="0.0.0.0:8080" tls-cert= tls-key=
Jan 13 11:27:08 rak-gateway chirpstack-application-server[29531]: time="2020-01-13T11:27:08-05:00" level=info msg="api/external: registering rest api handler and documentation endpoint" path=/api
Jan 13 11:27:08 rak-gateway chirpstack-application-server[29531]: time="2020-01-13T11:27:08-05:00" level=info msg="api/js: starting join-server api" bind="192.168.10.20:8886" ca_cert= tls_cert= tls_key=
Jan 13 11:27:08 rak-gateway systemd[1]: chirpstack-application-server.service: Main process exited, code=exited, status=1/FAILURE
Jan 13 11:27:08 rak-gateway systemd[1]: chirpstack-application-server.service: Unit entered failed state.
Jan 13 11:27:08 rak-gateway systemd[1]: chirpstack-application-server.service: Failed with result 'exit-code'. 

I don’t see a useful error message that gives me a reason why AS fails/crashes right after attempting to bind with the JS. The external JS I am using is the one provided by TTN stack which should be compatible. 8886 is the Interop/tls port. I also tried 1884 which is the gRPC port and got the same results and errors.

Thanks again for looking into this!

This might be the issue. You can’t setup an external Join Server in the AS configuration, it provides one. The bind is for creating a listening socket, e.g. for receiving requests.

If you want to setup an external Join Server, please first read the LoRaWAN Backend Interface specification to read about the JoinEUI based DNS resolving. Then see the join-server configuration in the chirpstack-network-server.toml configuration. It is the NS that is making the API calls to the Join Server, not the Application Server.

1 Like