Chirpstack service will not start

Hi, I am having an issue with the below error when I try to start the chirpstack service:

Jun 09 10:35:19 oxspring-chirpstack chirpstack[2728]: 2023-06-09T09:35:19.735767Z INFO chirpstack::storage: Setting up PostgreSQL connection pool
Jun 09 10:35:19 oxspring-chirpstack chirpstack[2728]: 2023-06-09T09:35:19.819438Z INFO chirpstack::storage: Applying schema migrations
Jun 09 10:35:19 oxspring-chirpstack chirpstack[2728]: Error: Failed to run 00000000000000_initial with: operator class “gin_trgm_ops” does not exist for access method “gin”
Jun 09 10:35:19 oxspring-chirpstack systemd[1]: chirpstack.service: Main process exited, code=exited, status=1/FAILURE
Jun 09 10:35:19 oxspring-chirpstack systemd[1]: chirpstack.service: Failed with result ‘exit-code’.
Jun 09 10:35:20 oxspring-chirpstack systemd[1]: chirpstack.service: Scheduled restart job, restart counter is at 5.
Jun 09 10:35:20 oxspring-chirpstack systemd[1]: Stopped ChirpStack open-source LoRaWAN Network Server.
Jun 09 10:35:20 oxspring-chirpstack systemd[1]: chirpstack.service: Start request repeated too quickly.
Jun 09 10:35:20 oxspring-chirpstack systemd[1]: chirpstack.service: Failed with result ‘exit-code’.
Jun 09 10:35:20 oxspring-chirpstack systemd[1]: Failed to start ChirpStack open-source LoRaWAN Network Server.

I have looked at the postgres config and I am getting the below error when trying to configure it:

invalid integer value “pg_trgm” for connection option “port”

Does anyone have any ideas?

Regards

Mike

Hi Mike!

As far as I understand you are facing two different problems…

First, you have a problem with gin method in Chirpstack. It suggests there ir a missing operator class defined in your postgreSQL database. I would try accesing the database using even pgAdmin or psql and creating the operator that is missing.

“CREATE EXTENSION IF NOT EXISTS pg_trgm”

After this try restarting Chirpstack Service and see if the error persists.

Second, you have some missconfiguration in your PostgreSQL port. It may indicate you are setting an invalid port for Postgre. It needs to be numeric and integer, so “pg_trmp” would not work properly.

Take into consideration that default port for PostgreSQL is 5432, so you might try that way in the first instance.

After this change, restart your database too.

Looking forward to help you,

Nicolas.

1 Like

Thank you, I managed to get this working now.