chirpstack / chirpstack-fuota-server

FUOTA server which can be used together with ChirpStack Application Server.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Context deadline error

symovs opened this issue · comments

@brocaar
We installed the FUOTA server using docker-compose and when we tried to start it the following error is occurring. Our application server is secured using TLS https://10.10.20.61:8080. So do we need to configure the TLS part in the FUOTA toml ? But in here https://github.com/brocaar/chirpstack-certificates we dont have the certificates for the fuota server. Please help if the TLS certificates are needed to get it up and running.

image

Our TOML file is as shown below

[general]

Log level

debug=5, info=4, warning=3, error=2, fatal=1, panic=0

log_level=4

Log to syslog.

When set to true, log messages are being written to syslog.

log_to_syslog=false

gRPC default resolver scheme.

Set this to "dns" for enabling dns round-robin load balancing.

grpc_default_resolver_scheme=""

PostgreSQL settings.

Please note that PostgreSQL 9.5+ is required with the 'hstore' extension

enabled.

[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 - 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://chirpstack_fuota:dbpassword@localhost/chirpstack_fuota?sslmode=disable"

Automatically apply database migrations.

It is possible to apply the database-migrations by hand

(see https://github.com/brocaar/chirpstack-fuota-server/tree/master/migrations)

or let ChirpStack FUOTA Server migrate to the latest state automatically, by using

this setting. Make sure that you always make a backup when upgrading ChirpStack

FUOTA Server and / or applying migrations.

automigrate=true

Max open connections.

This sets the max. number of open connections that are allowed in the

PostgreSQL connection pool (0 = unlimited).

max_open_connections=0

Max idle connections.

This sets the max. number of idle connections in the PostgreSQL connection

pool (0 = no idle connections are retained).

max_idle_connections=2

Application Server (integration) settings.

[application_server]

Event handler integration settings.

[application_server.event_handler]

# Payload marshaler.
#
# This defines how the HTTP payloads are encoded. Valid options are:
# * protobuf:  Protobuf encoding
# * json:      JSON encoding (easier for debugging, but less compact than 'protobuf')
marshaler="protobuf"

# HTTP handler settings.
[application_server.event_handler.http]

  # IP:Port to bind the event handler server to.
  bind="0.0.0.0:8090"

API integration settings.

[application_server.api]

ChirpStack Application Server API server endpoint.

server="10.10.20.61:8080"

# API token.
token="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhcGlfa2V5X2lkIjoiMjQ0NzRhNzgtMmY1Ni00OWE5LTgyNTktMGNhNmZlZjkyNzJmIiwiYXVkIjoiYXMiLCJpc3MiOiJhcyIsIm5iZiI6MTYxNDkzNTc3NCwic3ViIjoiYXBpX2tleSJ9.Pc5$

# Endpoint uses TLS.
tls_enabled=false

FUOTA server settings.

[fuota_server]

FUOTA server API settings.

[fuota_server.api]

# IP:Port to bind the FUOTA server API to.
bind="0.0.0.0:8070"

# Optional TLS configuration.
ca_cert=""
tls_cert=""
tls_key=""

A Context deadline error usually means in this case that there is a network issue. One issue that I see:

# Endpoint uses TLS.
tls_enabled=false

Shouldn't this be set to true?