Change Port 8080 of chirpstack-application-server

Hello, I’m trying to change the port of chirpstack-application-server in the file located in: /etc/chirpstack-application-server/chirpstack-application-server.toml

in the line [applocation_server.external_api]
bind=“0.0.0.0:8080”

to other port like 80 or 443 but always the server can’t start and I obtain this Error messages:
chirpstack-application-server.service - ChirpStack Application Server
Loaded: loaded (/lib/systemd/system/chirpstack-application-server.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Fri 2022-06-10 03:46:58 UTC; 10s ago
Docs: https://www.chirpstack.io/
Process: 4296 ExecStart=/usr/bin/chirpstack-application-server (code=exited, status=1/FAILURE)
Main PID: 4296 (code=exited, status=1/FAILURE)

chirpstack-application-server.service: Main process exited, code=exited, status=1/FAILURE
chirpstack-application-server.service: Failed with result ‘exit-code’.
chirpstack-application-server.service: Scheduled restart job, restart counter is at 5.
Stopped ChirpStack Application Server.
chirpstack-application-server.service: Start request repeated too quickly.
chirpstack-application-server.service: Failed with result ‘exit-code’.
Failed to start ChirpStack Application Server.

Can someone help me to solve this error. Thank you very much

Port 80 and 443 are privileged ports, I expect this is the issue. Please try starting the chirpstack-application-server binary from the CLI to see the full error logs.

Hi, I have this Logs Errors:
– Logs begin at Fri 2022-03-04 15:27:48 UTC. –
Jun 13 15:28:02 ip-172-31-18-127 chirpstack-application-server[1220]: time=“2022-06-13T15:28:02.449943085Z” level=info msg=“api/external: starting api server” bind=“0.0.0.0:443” tls-cert= tls-key=
Jun 13 15:28:02 ip-172-31-18-127 chirpstack-application-server[1220]: time=“2022-06-13T15:28:02.450157661Z” level=fatal msg=“listen tcp 0.0.0.0:443: bind: permission denied”
Jun 13 15:28:02 ip-172-31-18-127 systemd[1]: chirpstack-application-server.service: Main process exited, code=exited, status=1/FAILURE
Jun 13 15:28:02 ip-172-31-18-127 systemd[1]: chirpstack-application-server.service: Failed with result ‘exit-code’.
Jun 13 15:28:02 ip-172-31-18-127 systemd[1]: chirpstack-application-server.service: Scheduled restart job, restart counter is at 5.
Jun 13 15:28:02 ip-172-31-18-127 systemd[1]: Stopped ChirpStack Application Server.
Jun 13 15:28:02 ip-172-31-18-127 systemd[1]: chirpstack-application-server.service: Start request repeated too quickly.
Jun 13 15:28:02 ip-172-31-18-127 systemd[1]: chirpstack-application-server.service: Failed with result ‘exit-code’.
Jun 13 15:28:02 ip-172-31-18-127 systemd[1]: Failed to start ChirpStack Application Server.
Jun 13 15:28:08 ip-172-31-18-127 systemd[1]: chirpstack-application-server.service: Start request repeated too quickly.
Jun 13 15:28:08 ip-172-31-18-127 systemd[1]: chirpstack-application-server.service: Failed with result ‘exit-code’.
Jun 13 15:28:08 ip-172-31-18-127 systemd[1]: Failed to start ChirpStack Application Server.
Jun 13 15:29:54 ip-172-31-18-127 systemd[1]: Started ChirpStack Application Server.
Jun 13 15:29:54 ip-172-31-18-127 chirpstack-application-server[1247]: time=“2022-06-13T15:29:54.269782363Z” level=info msg=“starting ChirpStack Application Server” docs=“https://www.chirpstack.io/” version=3.17.4
Jun 13 15:29:54 ip-172-31-18-127 chirpstack-application-server[1247]: time=“2022-06-13T15:29:54.270271636Z” level=info msg=“storage: setting up storage package”
Jun 13 15:29:54 ip-172-31-18-127 chirpstack-application-server[1247]: time=“2022-06-13T15:29:54.270410702Z” level=info msg=“storage: setup metrics”
Jun 13 15:29:54 ip-172-31-18-127 chirpstack-application-server[1247]: time=“2022-06-13T15:29:54.270543054Z” level=info msg=“storage: setting up Redis client”
Jun 13 15:29:54 ip-172-31-18-127 chirpstack-application-server[1247]: time=“2022-06-13T15:29:54.27068202Z” level=info msg=“storage: connecting to PostgreSQL database”
Jun 13 15:29:54 ip-172-31-18-127 chirpstack-application-server[1247]: time=“2022-06-13T15:29:54.277793553Z” level=info msg=“storage: applying PostgreSQL data migrations”
Jun 13 15:29:54 ip-172-31-18-127 chirpstack-application-server[1247]: time=“2022-06-13T15:29:54.28687246Z” level=info msg=“integration: configuring global integrations”
Jun 13 15:29:54 ip-172-31-18-127 chirpstack-application-server[1247]: time=“2022-06-13T15:29:54.287231972Z” level=info msg=“integration/mqtt: TLS config is empty”
Jun 13 15:29:54 ip-172-31-18-127 chirpstack-application-server[1247]: time=“2022-06-13T15:29:54.287402802Z” level=info msg=“integration/mqtt: connecting to mqtt broker” server=“tcp://localhost:1883”
Jun 13 15:29:54 ip-172-31-18-127 chirpstack-application-server[1247]: time=“2022-06-13T15:29:54.287998316Z” level=info msg=“api/as: starting application-server api” bind=“0.0.0.0:8001” ca_cert= tls_cert= tls_key=
Jun 13 15:29:54 ip-172-31-18-127 chirpstack-application-server[1247]: time=“2022-06-13T15:29:54.288458387Z” level=info msg=“api/external: starting api server” bind=“0.0.0.0:80” tls-cert= tls-key=
Jun 13 15:29:54 ip-172-31-18-127 chirpstack-application-server[1247]: time=“2022-06-13T15:29:54.288667459Z” level=fatal msg=“listen tcp 0.0.0.0:80: bind: permission denied”
Jun 13 15:29:54 ip-172-31-18-127 systemd[1]: chirpstack-application-server.service: Main process exited, code=exited, status=1/FAILURE
Jun 13 15:29:54 ip-172-31-18-127 systemd[1]: chirpstack-application-server.service: Failed with result ‘exit-code’.
Jun 13 15:29:54 ip-172-31-18-127 systemd[1]: chirpstack-application-server.service: Scheduled restart job, restart counter is at 1.
Jun 13 15:29:54 ip-172-31-18-127 systemd[1]: Stopped ChirpStack Application Server.
Jun 13 15:29:54 ip-172-31-18-127 systemd[1]: Started ChirpStack Application Server.
Jun 13 15:29:54 ip-172-31-18-127 chirpstack-application-server[1252]: time=“2022-06-13T15:29:54.682797892Z” level=info msg=“starting ChirpStack Application Server” docs=“https://www.chirpstack.io/” version=3.17.4
Jun 13 15:29:54 ip-172-31-18-127 chirpstack-application-server[1252]: time=“2022-06-13T15:29:54.68323395Z” level=info msg=“storage: setting up storage package”
Jun 13 15:29:54 ip-172-31-18-127 chirpstack-application-server[1252]: time=“2022-06-13T15:29:54.683359515Z” level=info msg=“storage: setup metrics”
Jun 13 15:29:54 ip-172-31-18-127 chirpstack-application-server[1252]: time=“2022-06-13T15:29:54.683486212Z” level=info msg=“storage: setting up Redis client”
Jun 13 15:29:54 ip-172-31-18-127 chirpstack-application-server[1252]: time=“2022-06-13T15:29:54.683605228Z” level=info msg=“storage: connecting to PostgreSQL database”
Jun 13 15:29:54 ip-172-31-18-127 chirpstack-application-server[1252]: time=“2022-06-13T15:29:54.690533882Z” level=info msg=“storage: applying PostgreSQL data migrations”
Jun 13 15:29:54 ip-172-31-18-127 chirpstack-application-server[1252]: time=“2022-06-13T15:29:54.699710262Z” level=info msg=“integration: configuring global integrations”
Jun 13 15:29:54 ip-172-31-18-127 chirpstack-application-server[1252]: time=“2022-06-13T15:29:54.700090391Z” level=info msg=“integration/mqtt: TLS config is empty”
Jun 13 15:29:54 ip-172-31-18-127 chirpstack-application-server[1252]: time=“2022-06-13T15:29:54.70025641Z” level=info msg=“integration/mqtt: connecting to mqtt broker” server=“tcp://localhost:1883”
Jun 13 15:29:54 ip-172-31-18-127 chirpstack-application-server[1252]: time=“2022-06-13T15:29:54.700814839Z” level=info msg=“api/as: starting application-server api” bind=“0.0.0.0:8001” ca_cert= tls_cert= tls_key=
Jun 13 15:29:54 ip-172-31-18-127 chirpstack-application-server[1252]: time=“2022-06-13T15:29:54.701272158Z” level=info msg=“api/external: starting api server” bind=“0.0.0.0:80” tls-cert= tls-key=
Jun 13 15:29:54 ip-172-31-18-127 chirpstack-application-server[1252]: time=“2022-06-13T15:29:54.701479378Z” level=fatal msg=“listen tcp 0.0.0.0:80: bind: permission denied”
Jun 13 15:29:54 ip-172-31-18-127 systemd[1]: chirpstack-application-server.service: Main process exited, code=exited, status=1/FAILURE
Jun 13 15:29:54 ip-172-31-18-127 systemd[1]: chirpstack-application-server.service: Failed with result ‘exit-code’.
Jun 13 15:29:54 ip-172-31-18-127 systemd[1]: chirpstack-application-server.service: Scheduled restart job, restart counter is at 2.
Jun 13 15:29:54 ip-172-31-18-127 systemd[1]: Stopped ChirpStack Application Server.
Jun 13 15:29:54 ip-172-31-18-127 systemd[1]: Started ChirpStack Application Server.
Jun 13 15:29:54 ip-172-31-18-127 chirpstack-application-server[1257]: time=“2022-06-13T15:29:54.932638004Z” level=info msg=“starting ChirpStack Application Server” docs=“https://www.chirpstack.io/” version=3.17.4
Jun 13 15:29:54 ip-172-31-18-127 chirpstack-application-server[1257]: time=“2022-06-13T15:29:54.933117147Z” level=info msg=“storage: setting up storage package”
Jun 13 15:29:54 ip-172-31-18-127 chirpstack-application-server[1257]: time=“2022-06-13T15:29:54.933259318Z” level=info msg=“storage: setup metrics”
Jun 13 15:29:54 ip-172-31-18-127 chirpstack-application-server[1257]: time=“2022-06-13T15:29:54.933393464Z” level=info msg=“storage: setting up Redis client”
Jun 13 15:29:54 ip-172-31-18-127 chirpstack-application-server[1257]: time=“2022-06-13T15:29:54.933525936Z” level=info msg=“storage: connecting to PostgreSQL database”
Jun 13 15:29:54 ip-172-31-18-127 chirpstack-application-server[1257]: time=“2022-06-13T15:29:54.940636409Z” level=info msg=“storage: applying PostgreSQL data migrations”
Jun 13 15:29:54 ip-172-31-18-127 chirpstack-application-server[1257]: time=“2022-06-13T15:29:54.948773066Z” level=info msg=“integration: configuring global integrations”
Jun 13 15:29:54 ip-172-31-18-127 chirpstack-application-server[1257]: time=“2022-06-13T15:29:54.949148244Z” level=info msg=“integration/mqtt: TLS config is empty”
Jun 13 15:29:54 ip-172-31-18-127 chirpstack-application-server[1257]: time=“2022-06-13T15:29:54.949317851Z” level=info msg=“integration/mqtt: connecting to mqtt broker” server=“tcp://localhost:1883”
Jun 13 15:29:54 ip-172-31-18-127 chirpstack-application-server[1257]: time=“2022-06-13T15:29:54.94992361Z” level=info msg=“api/as: starting application-server api” bind=“0.0.0.0:8001” ca_cert= tls_cert= tls_key=
Jun 13 15:29:54 ip-172-31-18-127 chirpstack-application-server[1257]: time=“2022-06-13T15:29:54.950387695Z” level=info msg=“api/external: starting api server” bind=“0.0.0.0:80” tls-cert= tls-key=
Jun 13 15:29:54 ip-172-31-18-127 chirpstack-application-server[1257]: time=“2022-06-13T15:29:54.950596655Z” level=fatal msg=“listen tcp 0.0.0.0:80: bind: permission denied”
Jun 13 15:29:54 ip-172-31-18-127 systemd[1]: chirpstack-application-server.service: Main process exited, code=exited, status=1/FAILURE
Jun 13 15:29:54 ip-172-31-18-127 systemd[1]: chirpstack-application-server.service: Failed with result ‘exit-code’.
Jun 13 15:29:55 ip-172-31-18-127 systemd[1]: chirpstack-application-server.service: Scheduled restart job, restart counter is at 3.
Jun 13 15:29:55 ip-172-31-18-127 systemd[1]: Stopped ChirpStack Application Server.
Jun 13 15:29:55 ip-172-31-18-127 systemd[1]: Started ChirpStack Application Server.
Jun 13 15:29:55 ip-172-31-18-127 chirpstack-application-server[1262]: time=“2022-06-13T15:29:55.183080497Z” level=info msg=“starting ChirpStack Application Server” docs=“https://www.chirpstack.io/” version=3.17.4
Jun 13 15:29:55 ip-172-31-18-127 chirpstack-application-server[1262]: time=“2022-06-13T15:29:55.183618503Z” level=info msg=“storage: setting up storage package”
Jun 13 15:29:55 ip-172-31-18-127 chirpstack-application-server[1262]: time=“2022-06-13T15:29:55.183755888Z” level=info msg=“storage: setup metrics”
Jun 13 15:29:55 ip-172-31-18-127 chirpstack-application-server[1262]: time=“2022-06-13T15:29:55.183900893Z” level=info msg=“storage: setting up Redis client”
Jun 13 15:29:55 ip-172-31-18-127 chirpstack-application-server[1262]: time=“2022-06-13T15:29:55.184037662Z” level=info msg=“storage: connecting to PostgreSQL database”
Jun 13 15:29:55 ip-172-31-18-127 chirpstack-application-server[1262]: time=“2022-06-13T15:29:55.190943117Z” level=info msg=“storage: applying PostgreSQL data migrations”
Jun 13 15:29:55 ip-172-31-18-127 chirpstack-application-server[1262]: time=“2022-06-13T15:29:55.198469005Z” level=info msg=“integration: configuring global integrations”
Jun 13 15:29:55 ip-172-31-18-127 chirpstack-application-server[1262]: time=“2022-06-13T15:29:55.198937462Z” level=info msg=“integration/mqtt: TLS config is empty”
Jun 13 15:29:55 ip-172-31-18-127 chirpstack-application-server[1262]: time=“2022-06-13T15:29:55.199077941Z” level=info msg=“integration/mqtt: connecting to mqtt broker” server=“tcp://localhost:1883”
Jun 13 15:29:55 ip-172-31-18-127 chirpstack-application-server[1262]: time=“2022-06-13T15:29:55.199614718Z” level=info msg=“api/as: starting application-server api” bind=“0.0.0.0:8001” ca_cert= tls_cert= tls_key=
Jun 13 15:29:55 ip-172-31-18-127 chirpstack-application-server[1262]: time=“2022-06-13T15:29:55.200001179Z” level=info msg=“api/external: starting api server” bind=“0.0.0.0:80” tls-cert= tls-key=
Jun 13 15:29:55 ip-172-31-18-127 chirpstack-application-server[1262]: time=“2022-06-13T15:29:55.200165753Z” level=fatal msg=“listen tcp 0.0.0.0:80: bind: permission denied”
Jun 13 15:29:55 ip-172-31-18-127 systemd[1]: chirpstack-application-server.service: Main process exited, code=exited, status=1/FAILURE
Jun 13 15:29:55 ip-172-31-18-127 systemd[1]: chirpstack-application-server.service: Failed with result ‘exit-code’.
Jun 13 15:29:55 ip-172-31-18-127 systemd[1]: chirpstack-application-server.service: Scheduled restart job, restart counter is at 4.
Jun 13 15:29:55 ip-172-31-18-127 systemd[1]: Stopped ChirpStack Application Server.
Jun 13 15:29:55 ip-172-31-18-127 systemd[1]: Started ChirpStack Application Server.
Jun 13 15:29:55 ip-172-31-18-127 chirpstack-application-server[1267]: time=“2022-06-13T15:29:55.428855403Z” level=info msg=“starting ChirpStack Application Server” docs=“https://www.chirpstack.io/” version=3.17.4
Jun 13 15:29:55 ip-172-31-18-127 chirpstack-application-server[1267]: time=“2022-06-13T15:29:55.429337261Z” level=info msg=“storage: setting up storage package”
Jun 13 15:29:55 ip-172-31-18-127 chirpstack-application-server[1267]: time=“2022-06-13T15:29:55.429462102Z” level=info msg=“storage: setup metrics”
Jun 13 15:29:55 ip-172-31-18-127 chirpstack-application-server[1267]: time=“2022-06-13T15:29:55.429583496Z” level=info msg=“storage: setting up Redis client”
Jun 13 15:29:55 ip-172-31-18-127 chirpstack-application-server[1267]: time=“2022-06-13T15:29:55.429703716Z” level=info msg=“storage: connecting to PostgreSQL database”
Jun 13 15:29:55 ip-172-31-18-127 chirpstack-application-server[1267]: time=“2022-06-13T15:29:55.436825711Z” level=info msg=“storage: applying PostgreSQL data migrations”
Jun 13 15:29:55 ip-172-31-18-127 chirpstack-application-server[1267]: time=“2022-06-13T15:29:55.444852577Z” level=info msg=“integration: configuring global integrations”
Jun 13 15:29:55 ip-172-31-18-127 chirpstack-application-server[1267]: time=“2022-06-13T15:29:55.445211207Z” level=info msg=“integration/mqtt: TLS config is empty”
Jun 13 15:29:55 ip-172-31-18-127 chirpstack-application-server[1267]: time=“2022-06-13T15:29:55.445361819Z” level=info msg=“integration/mqtt: connecting to mqtt broker” server=“tcp://localhost:1883”
Jun 13 15:29:55 ip-172-31-18-127 chirpstack-application-server[1267]: time=“2022-06-13T15:29:55.445925791Z” level=info msg=“api/as: starting application-server api” bind=“0.0.0.0:8001” ca_cert= tls_cert= tls_key=
Jun 13 15:29:55 ip-172-31-18-127 chirpstack-application-server[1267]: time=“2022-06-13T15:29:55.446366012Z” level=info msg=“api/external: starting api server” bind=“0.0.0.0:80” tls-cert= tls-key=
Jun 13 15:29:55 ip-172-31-18-127 chirpstack-application-server[1267]: time=“2022-06-13T15:29:55.446557441Z” level=fatal msg=“listen tcp 0.0.0.0:80: bind: permission denied”
Jun 13 15:29:55 ip-172-31-18-127 systemd[1]: chirpstack-application-server.service: Main process exited, code=exited, status=1/FAILURE
Jun 13 15:29:55 ip-172-31-18-127 systemd[1]: chirpstack-application-server.service: Failed with result ‘exit-code’.
Jun 13 15:29:55 ip-172-31-18-127 systemd[1]: chirpstack-application-server.service: Scheduled restart job, restart counter is at 5.
Jun 13 15:29:55 ip-172-31-18-127 systemd[1]: Stopped ChirpStack Application Server.
Jun 13 15:29:55 ip-172-31-18-127 systemd[1]: chirpstack-application-server.service: Start request repeated too quickly.
Jun 13 15:29:55 ip-172-31-18-127 systemd[1]: chirpstack-application-server.service: Failed with result ‘exit-code’.
Jun 13 15:29:55 ip-172-31-18-127 systemd[1]: Failed to start ChirpStack Application Server.

Are you perhaps confusing difference between 127.0.0.1 and 0.0.0.0?

level=fatal msg=“listen tcp 0.0.0.0:443: bind: permission denied”
level=fatal msg=“listen tcp 0.0.0.0:80: bind: permission denied”
level=fatal msg=“listen tcp 0.0.0.0:80: bind: permission denied”
level=fatal msg=“listen tcp 0.0.0.0:80: bind: permission denied”
level=fatal msg=“listen tcp 0.0.0.0:80: bind: permission denied”
level=fatal msg=“listen tcp 0.0.0.0:80: bind: permission denied”

This might help you:

Thank you very much, I’m change to port 5000 and it works perfectly.