brocaar / chirpstack-network-server

ChirpStack Network Server is an open-source LoRaWAN network-server.
https://www.chirpstack.io
MIT License
1.48k stars 545 forks source link

ping PostgreSQL database error #581

Closed sergorl closed 2 years ago

sergorl commented 2 years ago

What happened?

No connection with Postgres db: chirpstack-network-server_1 | time="2022-04-18T14:57:00.743578041Z" level=warning msg="storage: ping PostgreSQL database error, will retry in 2s" error="dial tcp 127.0.0.1:5432: connect: connection refused"

What did you expect?

Successfull connection with Postfres db.

Steps to reproduce this issue

Steps:

  1. 
    sudo -u postgres psql

-- create the chirpstack_ns user with password 'dbpassword' create role chirpstack_ns with login password 'dbpassword';

-- create the chirpstack_ns database create database chirpstack_ns with owner chirpstack_ns;

-- exit the prompt \q

psql -h localhost -U chirpstack_ns -W chirpstack_ns

Password: psql (12.9 (Ubuntu 12.9-0ubuntu0.20.04.1)) SSL connection (protocol: TLSv1.3, cipher: TLS_AES_256_GCM_SHA384, bits: 256, compression: off) Type "help" for help.

2. `chirpstack-network-server.toml`:

This configuration configures ChirpStack Network Server for the EU868 band using a MQTT

broker to communicate with the gateways. Many options and defaults have been

omitted for simplicity.

#

For other bands, see the ./examples/ sub-directory.

#

See https://www.chirpstack.io/network-server/install/config/ for a full

configuration example and documentation.

PostgreSQL settings.

#

Please note that PostgreSQL 9.5+ is required.

[postgresql]

PostgreSQL dsn (e.g.: postgres://user:password@hostname/database?sslmode=disable).

#

Besides using an URL (e.g. 'postgres://user:password@hostname/database?sslmode=disable')

it is also possible to use the following format:

'user=chirpstack_ns dbname=chirpstack_ns sslmode=disable'.

#

The following connection parameters are supported:

#

* dbname - The name of the database to connect to

* user - The user to sign in as

* password - The user's password

host="127.0.0.1"

port=5432

* host - The host to connect to. Values that start with / are for unix domain sockets. (default is localhost)

* port - The port to bind to. (default is 5432)

* sslmode - Whether or not to use SSL (default is require, this is not the default for libpq)

* fallback_application_name - An application_name to fall back to if one isn't provided.

* connect_timeout - Maximum wait for connection, in seconds. Zero or not specified means wait indefinitely.

* sslcert - Cert file location. The file must contain PEM encoded data.

* sslkey - Key file location. The file must contain PEM encoded data.

* sslrootcert - The location of the root certificate file. The file must contain PEM encoded data.

#

Valid values for sslmode are:

#

* disable - No SSL

* require - Always SSL (skip verification)

* verify-ca - Always SSL (verify that the certificate presented by the server was signed by a trusted CA)

* verify-full - Always SSL (verify that the certification presented by the server was signed by a trusted CA and the server host name matches the one in the certificate)

dsn="postgres://localhost/chirpstack_ns_ns?sslmode=disable"

dsn="postgres://chirpstack_ns:dbpassword@localhost/chirpstack_ns?sslmode=disable"

Redis settings

#

Please note that Redis 2.6.0+ is required.

[redis]

Redis url (e.g. redis://user:password@hostname/0)

#

For more information about the Redis URL format, see:

https://www.iana.org/assignments/uri-schemes/prov/redis

url="redis://localhost:6379"

Network-server settings.

[network_server]

Network identifier (NetID, 3 bytes) encoded as HEX (e.g. 010203)

net_id="000000"

LoRaWAN regional band configuration.

#

Note that you might want to consult the LoRaWAN Regional Parameters

specification for valid values that apply to your region.

See: https://www.lora-alliance.org/lorawan-for-developers

[network_server.band] name="EU868"

LoRaWAN network related settings.

[network_server.network_settings]

# Extra channel configuration.
#
# Use this for LoRaWAN regions where it is possible to extend the by default
# available channels with additional channels (e.g. the EU band).
# The first 5 channels will be configured as part of the OTAA join-response
# (using the CFList field).
# The other channels (or channel / data-rate changes) will be (re)configured
# using the NewChannelReq mac-command.
#
[[network_server.network_settings.extra_channels]]
frequency=867100000
min_dr=0
max_dr=5

[[network_server.network_settings.extra_channels]]
frequency=867300000
min_dr=0
max_dr=5

[[network_server.network_settings.extra_channels]]
frequency=867500000
min_dr=0
max_dr=5

[[network_server.network_settings.extra_channels]]
frequency=867700000
min_dr=0
max_dr=5

[[network_server.network_settings.extra_channels]]
frequency=867900000
min_dr=0
max_dr=5

# Class B settings
[network_server.network_settings.class_b]
# Ping-slot data-rate.
ping_slot_dr=0

# Ping-slot frequency (Hz)
#
# Set this to 0 to use the default frequency plan for the configured region
# (which could be frequency hopping).
ping_slot_frequency=0

Network-server API

#

This is the network-server API that is used by ChirpStack Application Server or other

custom components interacting with ChirpStack Network Server.

[network_server.api]

ip:port to bind the api server

bind="127.0.0.1:8000"

Backend defines the gateway backend settings.

#

The gateway backend handles the communication with the gateway(s) part of

the LoRaWAN network.

[network_server.gateway.backend]

Backend

type="mqtt"

# MQTT gateway backend settings.
#
# This is the backend communicating with the LoRa gateways over a MQTT broker.
[network_server.gateway.backend.mqtt]
# MQTT topic templates for the different MQTT topics.
#
# The meaning of these topics are documented at:
# https://www.chirpstack.io/gateway-bridge/
#
# The default values match the default expected configuration of the
# ChirpStack Gateway Bridge MQTT backend. Therefore only change these values when
# absolutely needed.

# Event topic template.
event_topic="gateway/+/event/+"

# Command topic template.
#
# Use:
#   * "{{ .GatewayID }}" as an substitution for the LoRa gateway ID
#   * "{{ .CommandType }}" as an substitution for the command type
command_topic_template="gateway/{{ .GatewayID }}/command/{{ .CommandType }}"

# MQTT server (e.g. scheme://host:port where scheme is tcp, ssl or ws)
server="tcp://localhost:1883"

# Connect with the given username (optional)
username=""

# Connect with the given password (optional)
password=""

Metrics collection settings.

[metrics]

Timezone

#

The timezone is used for correctly aggregating the metrics (e.g. per hour,

day or month).

Example: "Europe/Amsterdam" or "Local" for the the system's local time zone.

timezone="Local"

Join-server settings.

[join_server]

Default join-server settings.

#

This join-server will be used when resolving the JoinEUI is set to false

or as a fallback when resolving the JoinEUI fails.

[join_server.default]

hostname:port of the default join-server

#

This API is provided by ChirpStack Application Server.

server="http://localhost:8003"

3. `docker-compose up`

## Could you share your log output?

<!--
  Insert the cli log output right after the shell word.
  You can get this output running ChirpStack Network Server from the cli.
  e.g. sudo chirpstack-network-server
-->
```shell
root@chirp:/home/repositories/chirpstack-network-server# pg_lsclusters
Ver Cluster Port Status Owner    Data directory              Log file
12  main    5432 down   postgres /var/lib/postgresql/12/main /var/log/postgresql/postgresql-12-main.log
root@chirp:/home/repositories/chirpstack-network-server# docker-compose up
Starting chirpstack-network-server_rabbitmq_1  ... done
Starting chirpstack-network-server_postgres_1  ... done
Starting chirpstack-network-server_redis_1     ... done
Starting chirpstack-network-server_mosquitto_1 ... done
Starting chirpstack-network-server_chirpstack-network-server_1 ... done
Attaching to chirpstack-network-server_rabbitmq_1, chirpstack-network-server_postgres_1, chirpstack-network-server_redis_1, chirpstack-network-server_mosquitto_1, chirpstack-network-server_chirpstack-network-server_1
mosquitto_1                  | 1650294929: mosquitto version 1.6.15 starting
mosquitto_1                  | 1650294929: Config loaded from /mosquitto/config/mosquitto.conf.
mosquitto_1                  | 1650294929: Opening ipv4 listen socket on port 1883.
mosquitto_1                  | 1650294929: Opening ipv6 listen socket on port 1883.
mosquitto_1                  | 1650294929: mosquitto version 1.6.15 running
postgres_1                   |
postgres_1                   | PostgreSQL Database directory appears to contain a database; Skipping initialization
postgres_1                   |
postgres_1                   | 2022-04-18 15:15:29.892 UTC [1] LOG:  starting PostgreSQL 13.6 on x86_64-pc-linux-musl, compiled by gcc (Alpine 10.3.1_git20211027) 10.3.1 20211027, 64-bit
postgres_1                   | 2022-04-18 15:15:29.893 UTC [1] LOG:  listening on IPv4 address "0.0.0.0", port 5432
postgres_1                   | 2022-04-18 15:15:29.893 UTC [1] LOG:  listening on IPv6 address "::", port 5432
postgres_1                   | 2022-04-18 15:15:29.895 UTC [1] LOG:  listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
postgres_1                   | 2022-04-18 15:15:29.897 UTC [21] LOG:  database system was shut down at 2022-04-18 14:57:03 UTC
postgres_1                   | 2022-04-18 15:15:29.900 UTC [1] LOG:  database system is ready to accept connections
redis_1                      | 1:C 18 Apr 2022 15:15:29.953 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
redis_1                      | 1:C 18 Apr 2022 15:15:29.953 # Redis version=6.2.6, bits=64, commit=00000000, modified=0, pid=1, just started
redis_1                      | 1:C 18 Apr 2022 15:15:29.953 # Warning: no config file specified, using the default config. In order to specify a config file use redis-server /path/to/redis.conf
redis_1                      | 1:M 18 Apr 2022 15:15:29.953 * monotonic clock: POSIX clock_gettime
redis_1                      | 1:M 18 Apr 2022 15:15:29.955 * Running mode=standalone, port=6379.
redis_1                      | 1:M 18 Apr 2022 15:15:29.955 # Server initialized
redis_1                      | 1:M 18 Apr 2022 15:15:29.955 # WARNING overcommit_memory is set to 0! Background save may fail under low memory condition. To fix this issue add 'vm.overcommit_memory = 1' to /etc/sysctl.conf and then reboot or run the command 'sysctl vm.overcommit_memory=1' for this to take effect.
redis_1                      | 1:M 18 Apr 2022 15:15:29.955 * Loading RDB produced by version 6.2.6
redis_1                      | 1:M 18 Apr 2022 15:15:29.955 * RDB age 1106 seconds
redis_1                      | 1:M 18 Apr 2022 15:15:29.955 * RDB memory usage when created 0.77 Mb
redis_1                      | 1:M 18 Apr 2022 15:15:29.955 # Done loading RDB, keys loaded: 0, keys expired: 0.
redis_1                      | 1:M 18 Apr 2022 15:15:29.955 * DB loaded from disk: 0.000 seconds
redis_1                      | 1:M 18 Apr 2022 15:15:29.955 * Ready to accept connections
chirpstack-network-server_1  | Compiling source
chirpstack-network-server_1  | go build -a -installsuffix cgo -ldflags "-s -w -X main.version=3.16.1" -o build/chirpstack-network-server cmd/chirpstack-network-server/main.go
rabbitmq_1                   | 2022-04-18 15:15:32.626647+00:00 [info] <0.228.0> Feature flags: list of feature flags found:
rabbitmq_1                   | 2022-04-18 15:15:32.640901+00:00 [info] <0.228.0> Feature flags:   [x] implicit_default_bindings
rabbitmq_1                   | 2022-04-18 15:15:32.640933+00:00 [info] <0.228.0> Feature flags:   [x] maintenance_mode_status
rabbitmq_1                   | 2022-04-18 15:15:32.640947+00:00 [info] <0.228.0> Feature flags:   [x] quorum_queue
rabbitmq_1                   | 2022-04-18 15:15:32.640962+00:00 [info] <0.228.0> Feature flags:   [x] stream_queue
rabbitmq_1                   | 2022-04-18 15:15:32.641017+00:00 [info] <0.228.0> Feature flags:   [x] user_limits
rabbitmq_1                   | 2022-04-18 15:15:32.641032+00:00 [info] <0.228.0> Feature flags:   [x] virtual_host_metadata
rabbitmq_1                   | 2022-04-18 15:15:32.641044+00:00 [info] <0.228.0> Feature flags: feature flag states written to disk: yes
rabbitmq_1                   | 2022-04-18 15:15:32.981306+00:00 [noti] <0.44.0> Application syslog exited with reason: stopped
rabbitmq_1                   | 2022-04-18 15:15:32.981392+00:00 [noti] <0.228.0> Logging: switching to configured handler(s); following messages may not be visible in this log output
rabbitmq_1                   | 2022-04-18 15:15:32.992650+00:00 [notice] <0.228.0> Logging: configured log handlers are now ACTIVE
rabbitmq_1                   | 2022-04-18 15:15:36.167187+00:00 [info] <0.228.0> ra: starting system quorum_queues
rabbitmq_1                   | 2022-04-18 15:15:36.167341+00:00 [info] <0.228.0> starting Ra system: quorum_queues in directory: /var/lib/rabbitmq/mnesia/rabbit@aaee54e5ec70/quorum/rabbit@aaee54e5ec70
rabbitmq_1                   | 2022-04-18 15:15:36.168719+00:00 [info] <0.294.0> ra system 'quorum_queues' running pre init for 0 registered servers
rabbitmq_1                   | 2022-04-18 15:15:36.170568+00:00 [info] <0.297.0> ra: meta data store initialised for system quorum_queues. 0 record(s) recovered
rabbitmq_1                   | 2022-04-18 15:15:36.170735+00:00 [notice] <0.310.0> WAL: ra_log_wal init, open tbls: ra_log_open_mem_tables, closed tbls: ra_log_closed_mem_tables
rabbitmq_1                   | 2022-04-18 15:15:36.174049+00:00 [info] <0.228.0> ra: starting system coordination
rabbitmq_1                   | 2022-04-18 15:15:36.174109+00:00 [info] <0.228.0> starting Ra system: coordination in directory: /var/lib/rabbitmq/mnesia/rabbit@aaee54e5ec70/coordination/rabbit@aaee54e5ec70
rabbitmq_1                   | 2022-04-18 15:15:36.175873+00:00 [info] <0.335.0> ra system 'coordination' running pre init for 0 registered servers
rabbitmq_1                   | 2022-04-18 15:15:36.177773+00:00 [info] <0.338.0> ra: meta data store initialised for system coordination. 0 record(s) recovered
rabbitmq_1                   | 2022-04-18 15:15:36.177940+00:00 [notice] <0.349.0> WAL: ra_coordination_log_wal init, open tbls: ra_coordination_log_open_mem_tables, closed tbls: ra_coordination_log_closed_mem_tables
rabbitmq_1                   | 2022-04-18 15:15:36.185447+00:00 [info] <0.228.0>
rabbitmq_1                   | 2022-04-18 15:15:36.185447+00:00 [info] <0.228.0>  Starting RabbitMQ 3.9.15 on Erlang 24.3.3 [jit]
rabbitmq_1                   | 2022-04-18 15:15:36.185447+00:00 [info] <0.228.0>  Copyright (c) 2007-2022 VMware, Inc. or its affiliates.
rabbitmq_1                   | 2022-04-18 15:15:36.185447+00:00 [info] <0.228.0>  Licensed under the MPL 2.0. Website: https://rabbitmq.com
rabbitmq_1                   |
rabbitmq_1                   |   ##  ##      RabbitMQ 3.9.15
rabbitmq_1                   |   ##  ##
rabbitmq_1                   |   ##########  Copyright (c) 2007-2022 VMware, Inc. or its affiliates.
rabbitmq_1                   |   ######  ##
rabbitmq_1                   |   ##########  Licensed under the MPL 2.0. Website: https://rabbitmq.com
rabbitmq_1                   |
rabbitmq_1                   |   Erlang:      24.3.3 [jit]
rabbitmq_1                   |   TLS Library: OpenSSL - OpenSSL 1.1.1n  15 Mar 2022
rabbitmq_1                   |
rabbitmq_1                   |   Doc guides:  https://rabbitmq.com/documentation.html
rabbitmq_1                   |   Support:     https://rabbitmq.com/contact.html
rabbitmq_1                   |   Tutorials:   https://rabbitmq.com/getstarted.html
rabbitmq_1                   |   Monitoring:  https://rabbitmq.com/monitoring.html
rabbitmq_1                   |
rabbitmq_1                   |   Logs: /var/log/rabbitmq/rabbit@aaee54e5ec70_upgrade.log
rabbitmq_1                   |         <stdout>
rabbitmq_1                   |
rabbitmq_1                   |   Config file(s): /etc/rabbitmq/conf.d/10-defaults.conf
rabbitmq_1                   |                   /etc/rabbitmq/conf.d/management_agent.disable_metrics_collector.conf
rabbitmq_1                   |
rabbitmq_1                   |   Starting broker...2022-04-18 15:15:36.188013+00:00 [info] <0.228.0>
rabbitmq_1                   | 2022-04-18 15:15:36.188013+00:00 [info] <0.228.0>  node           : rabbit@aaee54e5ec70
rabbitmq_1                   | 2022-04-18 15:15:36.188013+00:00 [info] <0.228.0>  home dir       : /var/lib/rabbitmq
rabbitmq_1                   | 2022-04-18 15:15:36.188013+00:00 [info] <0.228.0>  config file(s) : /etc/rabbitmq/conf.d/10-defaults.conf
rabbitmq_1                   | 2022-04-18 15:15:36.188013+00:00 [info] <0.228.0>                 : /etc/rabbitmq/conf.d/management_agent.disable_metrics_collector.conf
rabbitmq_1                   | 2022-04-18 15:15:36.188013+00:00 [info] <0.228.0>  cookie hash    : lPIKZJyCIuqnXym7L0FnkQ==
rabbitmq_1                   | 2022-04-18 15:15:36.188013+00:00 [info] <0.228.0>  log(s)         : /var/log/rabbitmq/rabbit@aaee54e5ec70_upgrade.log
rabbitmq_1                   | 2022-04-18 15:15:36.188013+00:00 [info] <0.228.0>                 : <stdout>
rabbitmq_1                   | 2022-04-18 15:15:36.188013+00:00 [info] <0.228.0>  database dir   : /var/lib/rabbitmq/mnesia/rabbit@aaee54e5ec70
rabbitmq_1                   | 2022-04-18 15:15:36.313638+00:00 [info] <0.228.0> Feature flags: list of feature flags found:
rabbitmq_1                   | 2022-04-18 15:15:36.313693+00:00 [info] <0.228.0> Feature flags:   [x] drop_unroutable_metric
rabbitmq_1                   | 2022-04-18 15:15:36.313745+00:00 [info] <0.228.0> Feature flags:   [x] empty_basic_get_metric
rabbitmq_1                   | 2022-04-18 15:15:36.313761+00:00 [info] <0.228.0> Feature flags:   [x] implicit_default_bindings
rabbitmq_1                   | 2022-04-18 15:15:36.313783+00:00 [info] <0.228.0> Feature flags:   [x] maintenance_mode_status
rabbitmq_1                   | 2022-04-18 15:15:36.313823+00:00 [info] <0.228.0> Feature flags:   [x] quorum_queue
rabbitmq_1                   | 2022-04-18 15:15:36.313837+00:00 [info] <0.228.0> Feature flags:   [x] stream_queue
rabbitmq_1                   | 2022-04-18 15:15:36.313849+00:00 [info] <0.228.0> Feature flags:   [x] user_limits
rabbitmq_1                   | 2022-04-18 15:15:36.313861+00:00 [info] <0.228.0> Feature flags:   [x] virtual_host_metadata
rabbitmq_1                   | 2022-04-18 15:15:36.313912+00:00 [info] <0.228.0> Feature flags: feature flag states written to disk: yes
rabbitmq_1                   | 2022-04-18 15:15:36.490698+00:00 [info] <0.228.0> Running boot step pre_boot defined by app rabbit
rabbitmq_1                   | 2022-04-18 15:15:36.490796+00:00 [info] <0.228.0> Running boot step rabbit_global_counters defined by app rabbit
rabbitmq_1                   | 2022-04-18 15:15:36.491116+00:00 [info] <0.228.0> Running boot step rabbit_osiris_metrics defined by app rabbit
rabbitmq_1                   | 2022-04-18 15:15:36.491328+00:00 [info] <0.228.0> Running boot step rabbit_core_metrics defined by app rabbit
rabbitmq_1                   | 2022-04-18 15:15:36.491771+00:00 [info] <0.228.0> Running boot step rabbit_alarm defined by app rabbit
rabbitmq_1                   | 2022-04-18 15:15:36.508891+00:00 [info] <0.362.0> Memory high watermark set to 3106 MiB (3257802752 bytes) of 7767 MiB (8144506880 bytes) total
rabbitmq_1                   | 2022-04-18 15:15:36.512579+00:00 [info] <0.364.0> Enabling free disk space monitoring
rabbitmq_1                   | 2022-04-18 15:15:36.512613+00:00 [info] <0.364.0> Disk free limit set to 50MB
rabbitmq_1                   | 2022-04-18 15:15:36.516468+00:00 [info] <0.228.0> Running boot step code_server_cache defined by app rabbit
rabbitmq_1                   | 2022-04-18 15:15:36.516547+00:00 [info] <0.228.0> Running boot step file_handle_cache defined by app rabbit
rabbitmq_1                   | 2022-04-18 15:15:36.516719+00:00 [info] <0.369.0> Limiting to approx 1048479 file handles (943629 sockets)
rabbitmq_1                   | 2022-04-18 15:15:36.516827+00:00 [info] <0.370.0> FHC read buffering: OFF
rabbitmq_1                   | 2022-04-18 15:15:36.516856+00:00 [info] <0.370.0> FHC write buffering: ON
rabbitmq_1                   | 2022-04-18 15:15:36.517668+00:00 [info] <0.228.0> Running boot step worker_pool defined by app rabbit
rabbitmq_1                   | 2022-04-18 15:15:36.517762+00:00 [info] <0.353.0> Will use 4 processes for default worker pool
rabbitmq_1                   | 2022-04-18 15:15:36.517787+00:00 [info] <0.353.0> Starting worker pool 'worker_pool' with 4 processes in it
rabbitmq_1                   | 2022-04-18 15:15:36.518087+00:00 [info] <0.228.0> Running boot step database defined by app rabbit
rabbitmq_1                   | 2022-04-18 15:15:36.520342+00:00 [info] <0.228.0> Waiting for Mnesia tables for 30000 ms, 9 retries left
rabbitmq_1                   | 2022-04-18 15:15:36.522167+00:00 [info] <0.228.0> Successfully synced tables from a peer
rabbitmq_1                   | 2022-04-18 15:15:36.522221+00:00 [info] <0.228.0> Waiting for Mnesia tables for 30000 ms, 9 retries left
rabbitmq_1                   | 2022-04-18 15:15:36.522286+00:00 [info] <0.228.0> Successfully synced tables from a peer
rabbitmq_1                   | 2022-04-18 15:15:36.531748+00:00 [info] <0.228.0> Waiting for Mnesia tables for 30000 ms, 9 retries left
rabbitmq_1                   | 2022-04-18 15:15:36.531828+00:00 [info] <0.228.0> Successfully synced tables from a peer
rabbitmq_1                   | 2022-04-18 15:15:36.531855+00:00 [info] <0.228.0> Peer discovery backend rabbit_peer_discovery_classic_config does not support registration, skipping registration.
rabbitmq_1                   | 2022-04-18 15:15:36.532004+00:00 [info] <0.228.0> Running boot step database_sync defined by app rabbit
rabbitmq_1                   | 2022-04-18 15:15:36.532245+00:00 [info] <0.228.0> Running boot step feature_flags defined by app rabbit
rabbitmq_1                   | 2022-04-18 15:15:36.534092+00:00 [info] <0.228.0> Running boot step codec_correctness_check defined by app rabbit
rabbitmq_1                   | 2022-04-18 15:15:36.534137+00:00 [info] <0.228.0> Running boot step external_infrastructure defined by app rabbit
rabbitmq_1                   | 2022-04-18 15:15:36.534153+00:00 [info] <0.228.0> Running boot step rabbit_registry defined by app rabbit
rabbitmq_1                   | 2022-04-18 15:15:36.534238+00:00 [info] <0.228.0> Running boot step rabbit_auth_mechanism_cr_demo defined by app rabbit
rabbitmq_1                   | 2022-04-18 15:15:36.534348+00:00 [info] <0.228.0> Running boot step rabbit_queue_location_random defined by app rabbit
rabbitmq_1                   | 2022-04-18 15:15:36.534399+00:00 [info] <0.228.0> Running boot step rabbit_event defined by app rabbit
rabbitmq_1                   | 2022-04-18 15:15:36.534536+00:00 [info] <0.228.0> Running boot step rabbit_auth_mechanism_amqplain defined by app rabbit
rabbitmq_1                   | 2022-04-18 15:15:36.534598+00:00 [info] <0.228.0> Running boot step rabbit_auth_mechanism_plain defined by app rabbit
rabbitmq_1                   | 2022-04-18 15:15:36.534628+00:00 [info] <0.228.0> Running boot step rabbit_exchange_type_direct defined by app rabbit
rabbitmq_1                   | 2022-04-18 15:15:36.534669+00:00 [info] <0.228.0> Running boot step rabbit_exchange_type_fanout defined by app rabbit
rabbitmq_1                   | 2022-04-18 15:15:36.534714+00:00 [info] <0.228.0> Running boot step rabbit_exchange_type_headers defined by app rabbit
rabbitmq_1                   | 2022-04-18 15:15:36.534744+00:00 [info] <0.228.0> Running boot step rabbit_exchange_type_topic defined by app rabbit
rabbitmq_1                   | 2022-04-18 15:15:36.534771+00:00 [info] <0.228.0> Running boot step rabbit_mirror_queue_mode_all defined by app rabbit
rabbitmq_1                   | 2022-04-18 15:15:36.534817+00:00 [info] <0.228.0> Running boot step rabbit_mirror_queue_mode_exactly defined by app rabbit
rabbitmq_1                   | 2022-04-18 15:15:36.534854+00:00 [info] <0.228.0> Running boot step rabbit_mirror_queue_mode_nodes defined by app rabbit
rabbitmq_1                   | 2022-04-18 15:15:36.534879+00:00 [info] <0.228.0> Running boot step rabbit_priority_queue defined by app rabbit
rabbitmq_1                   | 2022-04-18 15:15:36.534895+00:00 [info] <0.228.0> Priority queues enabled, real BQ is rabbit_variable_queue
rabbitmq_1                   | 2022-04-18 15:15:36.534928+00:00 [info] <0.228.0> Running boot step rabbit_queue_location_client_local defined by app rabbit
rabbitmq_1                   | 2022-04-18 15:15:36.534958+00:00 [info] <0.228.0> Running boot step rabbit_queue_location_min_masters defined by app rabbit
rabbitmq_1                   | 2022-04-18 15:15:36.534983+00:00 [info] <0.228.0> Running boot step kernel_ready defined by app rabbit
rabbitmq_1                   | 2022-04-18 15:15:36.534996+00:00 [info] <0.228.0> Running boot step rabbit_sysmon_minder defined by app rabbit
rabbitmq_1                   | 2022-04-18 15:15:36.535143+00:00 [info] <0.228.0> Running boot step rabbit_epmd_monitor defined by app rabbit
rabbitmq_1                   | 2022-04-18 15:15:36.536537+00:00 [info] <0.392.0> epmd monitor knows us, inter-node communication (distribution) port: 25672
rabbitmq_1                   | 2022-04-18 15:15:36.536625+00:00 [info] <0.228.0> Running boot step guid_generator defined by app rabbit
rabbitmq_1                   | 2022-04-18 15:15:36.539713+00:00 [info] <0.228.0> Running boot step rabbit_node_monitor defined by app rabbit
rabbitmq_1                   | 2022-04-18 15:15:36.539858+00:00 [info] <0.396.0> Starting rabbit_node_monitor
rabbitmq_1                   | 2022-04-18 15:15:36.539963+00:00 [info] <0.228.0> Running boot step delegate_sup defined by app rabbit
rabbitmq_1                   | 2022-04-18 15:15:36.540451+00:00 [info] <0.228.0> Running boot step rabbit_memory_monitor defined by app rabbit
rabbitmq_1                   | 2022-04-18 15:15:36.540593+00:00 [info] <0.228.0> Running boot step core_initialized defined by app rabbit
rabbitmq_1                   | 2022-04-18 15:15:36.540614+00:00 [info] <0.228.0> Running boot step upgrade_queues defined by app rabbit
rabbitmq_1                   | 2022-04-18 15:15:36.546151+00:00 [info] <0.228.0> Running boot step channel_tracking defined by app rabbit
rabbitmq_1                   | 2022-04-18 15:15:36.546512+00:00 [info] <0.228.0> Setting up a table for channel tracking on this node: tracked_channel_on_node_rabbit@aaee54e5ec70
rabbitmq_1                   | 2022-04-18 15:15:36.546779+00:00 [info] <0.228.0> Setting up a table for channel tracking on this node: tracked_channel_table_per_user_on_node_rabbit@aaee54e5ec70
rabbitmq_1                   | 2022-04-18 15:15:36.547019+00:00 [info] <0.228.0> Running boot step rabbit_channel_tracking_handler defined by app rabbit
rabbitmq_1                   | 2022-04-18 15:15:36.547173+00:00 [info] <0.228.0> Running boot step connection_tracking defined by app rabbit
rabbitmq_1                   | 2022-04-18 15:15:36.547389+00:00 [info] <0.228.0> Setting up a table for connection tracking on this node: tracked_connection_on_node_rabbit@aaee54e5ec70
rabbitmq_1                   | 2022-04-18 15:15:36.547577+00:00 [info] <0.228.0> Setting up a table for per-vhost connection counting on this node: tracked_connection_per_vhost_on_node_rabbit@aaee54e5ec70
rabbitmq_1                   | 2022-04-18 15:15:36.547754+00:00 [info] <0.228.0> Setting up a table for per-user connection counting on this node: tracked_connection_table_per_user_on_node_rabbit@aaee54e5ec70
rabbitmq_1                   | 2022-04-18 15:15:36.548030+00:00 [info] <0.228.0> Running boot step rabbit_connection_tracking_handler defined by app rabbit
rabbitmq_1                   | 2022-04-18 15:15:36.548143+00:00 [info] <0.228.0> Running boot step rabbit_exchange_parameters defined by app rabbit
rabbitmq_1                   | 2022-04-18 15:15:36.548338+00:00 [info] <0.228.0> Running boot step rabbit_mirror_queue_misc defined by app rabbit
rabbitmq_1                   | 2022-04-18 15:15:36.549450+00:00 [info] <0.228.0> Running boot step rabbit_policies defined by app rabbit
rabbitmq_1                   | 2022-04-18 15:15:36.550419+00:00 [info] <0.228.0> Running boot step rabbit_policy defined by app rabbit
rabbitmq_1                   | 2022-04-18 15:15:36.550540+00:00 [info] <0.228.0> Running boot step rabbit_queue_location_validator defined by app rabbit
rabbitmq_1                   | 2022-04-18 15:15:36.550711+00:00 [info] <0.228.0> Running boot step rabbit_quorum_memory_manager defined by app rabbit
rabbitmq_1                   | 2022-04-18 15:15:36.550813+00:00 [info] <0.228.0> Running boot step rabbit_stream_coordinator defined by app rabbit
rabbitmq_1                   | 2022-04-18 15:15:36.551211+00:00 [info] <0.228.0> Running boot step rabbit_vhost_limit defined by app rabbit
rabbitmq_1                   | 2022-04-18 15:15:36.551285+00:00 [info] <0.228.0> Running boot step rabbit_mgmt_db_handler defined by app rabbitmq_management_agent
rabbitmq_1                   | 2022-04-18 15:15:36.551325+00:00 [info] <0.228.0> Management plugin: using rates mode 'basic'
rabbitmq_1                   | 2022-04-18 15:15:36.551773+00:00 [info] <0.228.0> Running boot step recovery defined by app rabbit
rabbitmq_1                   | 2022-04-18 15:15:36.551717+00:00 [error] <0.228.0> Discarding message {'$gen_cast',{force_event_refresh,#Ref<0.797197469.2373189635.175360>}} from <0.228.0> to <0.454.0> in an old incarnation (1650293794) of this node (1650294932)
rabbitmq_1                   | 2022-04-18 15:15:36.551717+00:00 [error] <0.228.0>
rabbitmq_1                   | 2022-04-18 15:15:36.551717+00:00 [error] <0.228.0>
rabbitmq_1                   | 2022-04-18 15:15:36.551731+00:00 [error] <0.228.0> Discarding message {'$gen_cast',{force_event_refresh,#Ref<0.797197469.2373189635.175360>}} from <0.228.0> to <0.451.0> in an old incarnation (1650293794) of this node (1650294932)
rabbitmq_1                   | 2022-04-18 15:15:36.551731+00:00 [error] <0.228.0>
rabbitmq_1                   | 2022-04-18 15:15:36.551731+00:00 [error] <0.228.0>
rabbitmq_1                   | 2022-04-18 15:15:36.552702+00:00 [info] <0.434.0> Making sure data directory '/var/lib/rabbitmq/mnesia/rabbit@aaee54e5ec70/msg_stores/vhosts/628WB79CIFDYO9LJI6DKMI09L' for vhost '/' exists
rabbitmq_1                   | 2022-04-18 15:15:36.555739+00:00 [info] <0.434.0> Starting message stores for vhost '/'
rabbitmq_1                   | 2022-04-18 15:15:36.555869+00:00 [info] <0.438.0> Message store "628WB79CIFDYO9LJI6DKMI09L/msg_store_transient": using rabbit_msg_store_ets_index to provide index
rabbitmq_1                   | 2022-04-18 15:15:36.558068+00:00 [info] <0.434.0> Started message store of type transient for vhost '/'
rabbitmq_1                   | 2022-04-18 15:15:36.558188+00:00 [info] <0.442.0> Message store "628WB79CIFDYO9LJI6DKMI09L/msg_store_persistent": using rabbit_msg_store_ets_index to provide index
rabbitmq_1                   | 2022-04-18 15:15:36.560823+00:00 [info] <0.434.0> Started message store of type persistent for vhost '/'
rabbitmq_1                   | 2022-04-18 15:15:36.564190+00:00 [info] <0.434.0> Recovering 2 queues of type rabbit_classic_queue took 10ms
rabbitmq_1                   | 2022-04-18 15:15:36.564240+00:00 [info] <0.434.0> Recovering 0 queues of type rabbit_quorum_queue took 0ms
rabbitmq_1                   | 2022-04-18 15:15:36.564275+00:00 [info] <0.434.0> Recovering 0 queues of type rabbit_stream_queue took 0ms
rabbitmq_1                   | 2022-04-18 15:15:36.576316+00:00 [info] <0.228.0> Running boot step empty_db_check defined by app rabbit
rabbitmq_1                   | 2022-04-18 15:15:36.576422+00:00 [info] <0.228.0> Will not seed default virtual host and user: have definitions to load...
rabbitmq_1                   | 2022-04-18 15:15:36.576443+00:00 [info] <0.228.0> Running boot step rabbit_looking_glass defined by app rabbit
rabbitmq_1                   | 2022-04-18 15:15:36.576466+00:00 [info] <0.228.0> Running boot step rabbit_core_metrics_gc defined by app rabbit
rabbitmq_1                   | 2022-04-18 15:15:36.576647+00:00 [info] <0.228.0> Running boot step background_gc defined by app rabbit
rabbitmq_1                   | 2022-04-18 15:15:36.576902+00:00 [info] <0.228.0> Running boot step routing_ready defined by app rabbit
rabbitmq_1                   | 2022-04-18 15:15:36.576941+00:00 [info] <0.228.0> Running boot step pre_flight defined by app rabbit
rabbitmq_1                   | 2022-04-18 15:15:36.576961+00:00 [info] <0.228.0> Running boot step notify_cluster defined by app rabbit
rabbitmq_1                   | 2022-04-18 15:15:36.576989+00:00 [info] <0.228.0> Running boot step networking defined by app rabbit
rabbitmq_1                   | 2022-04-18 15:15:36.577060+00:00 [info] <0.228.0> Running boot step definition_import_worker_pool defined by app rabbit
rabbitmq_1                   | 2022-04-18 15:15:36.577092+00:00 [info] <0.353.0> Starting worker pool 'definition_import_pool' with 4 processes in it
rabbitmq_1                   | 2022-04-18 15:15:36.577457+00:00 [info] <0.228.0> Running boot step cluster_name defined by app rabbit
rabbitmq_1                   | 2022-04-18 15:15:36.577487+00:00 [info] <0.228.0> Running boot step direct_client defined by app rabbit
rabbitmq_1                   | 2022-04-18 15:15:36.577678+00:00 [info] <0.480.0> Resetting node maintenance status
rabbitmq_1                   | 2022-04-18 15:15:36.588667+00:00 [info] <0.507.0> Prometheus metrics: HTTP (non-TLS) listener started on port 15692
rabbitmq_1                   | 2022-04-18 15:15:36.588791+00:00 [info] <0.480.0> Ready to start client connection listeners
rabbitmq_1                   | 2022-04-18 15:15:36.590694+00:00 [info] <0.551.0> started TCP listener on [::]:5672
rabbitmq_1                   |  completed with 3 plugins.
rabbitmq_1                   | 2022-04-18 15:15:36.724847+00:00 [info] <0.480.0> Server startup complete; 3 plugins started.
rabbitmq_1                   | 2022-04-18 15:15:36.724847+00:00 [info] <0.480.0>  * rabbitmq_prometheus
rabbitmq_1                   | 2022-04-18 15:15:36.724847+00:00 [info] <0.480.0>  * rabbitmq_web_dispatch
rabbitmq_1                   | 2022-04-18 15:15:36.724847+00:00 [info] <0.480.0>  * rabbitmq_management_agent
chirpstack-network-server_1  | Starting ChirpStack Network Server
chirpstack-network-server_1  | ./build/chirpstack-network-server
chirpstack-network-server_1  | time="2022-04-18T15:15:56.62158237Z" level=info msg="starting ChirpStack Network Server" band=EU868 docs="https://www.chirpstack.io/" net_id=000000 version=3.16.1
chirpstack-network-server_1  | time="2022-04-18T15:15:56.621678279Z" level=info msg="storage: setting up storage module"
chirpstack-network-server_1  | time="2022-04-18T15:15:56.62168983Z" level=info msg="storage: setting up Redis client"
chirpstack-network-server_1  | time="2022-04-18T15:15:56.621717833Z" level=info msg="storage: connecting to PostgreSQL"
chirpstack-network-server_1  | time="2022-04-18T15:15:56.622776705Z" level=warning msg="storage: ping PostgreSQL database error, will retry in 2s" error="dial tcp 127.0.0.1:5432: connect: connection refused"
chirpstack-network-server_1  | time="2022-04-18T15:15:58.624923237Z" level=warning msg="storage: ping PostgreSQL database error, will retry in 2s" error="dial tcp 127.0.0.1:5432: connect: connection refused"
chirpstack-network-server_1  | time="2022-04-18T15:16:00.626965226Z" level=warning msg="storage: ping PostgreSQL database error, will retry in 2s" error="dial tcp 127.0.0.1:5432: connect: connection refused"

Your Environment

Component Version
Application Server v?.?.?
Network Server 3.16.1
Gateway Bridge
Chirpstack API
Geolocation
Concentratord
brocaar commented 2 years ago

As I mentioned in my response to one of your other issues, please see https://github.com/brocaar/chirpstack-docker for a working Compose environment.