level=error msg=“gwmigrate: list gateways error (will retry): rpc error: code = Unavailable desc = grpc: the connection is unavailable”
I have this error on the log. Not sure what this means or what I should do about this. Any help would be great.
level=error msg=“gwmigrate: list gateways error (will retry): rpc error: code = Unavailable desc = grpc: the connection is unavailable”
I have this error on the log. Not sure what this means or what I should do about this. Any help would be great.
Hi, it looks like LoRa App Server is unable to communicate with LoRa Server. Are you sure both services are up and running?
Following on Orne’s response, and as I commented on Gitter, it seems you aren’t providing TLS certificate and private key in your lora-app-server conf. You need to provide TLS certificate and private key for the Api to work. Please check the “Security / TLS” section at https://docs.loraserver.io/lora-app-server/install/config/ for instructions on how to generate certificates (use this kind of certificates for development purposes only).
Hi, trying to install and configure the lora-app-server on a Beaglebone black I have two problems one of them is the same problem posted here.
For the problem with level=error I have the next
systemctl start lora-app-server
journalctl -u lora-app-server -f -n 50
Aug 16 13:55:14 beaglebone systemd[1]: Started LoRa App Server.
Aug 16 13:55:14 beaglebone lora-app-server[9550]: time=“2017-08-16T13:55:14-05:00” level=info msg=“starting LoRa App Server” docs=“https://docs.loraserver.io/” version=0.11.0
Aug 16 13:55:14 beaglebone lora-app-server[9550]: time=“2017-08-16T13:55:14-05:00” level=info msg=“connecting to postgresql”
Aug 16 13:55:14 beaglebone lora-app-server[9550]: time=“2017-08-16T13:55:14-05:00” level=info msg=“setup redis connection pool”
Aug 16 13:55:14 beaglebone lora-app-server[9550]: time=“2017-08-16T13:55:14-05:00” level=info msg=“handler/mqtt: connecting to mqtt broker” server=“tcp://localhost:1883”
Aug 16 13:55:14 beaglebone lora-app-server[9550]: time=“2017-08-16T13:55:14-05:00” level=info msg=“connecting to network-server api” ca-cert= server=“127.0.0.1:8080” tls-cert= tls-key=
Aug 16 13:55:14 beaglebone lora-app-server[9550]: time=“2017-08-16T13:55:14-05:00” level=info msg=“applying database migrations”
Aug 16 13:55:14 beaglebone lora-app-server[9550]: time=“2017-08-16T13:55:14-05:00” level=info msg=“handler/mqtt: connected to mqtt broker”
Aug 16 13:55:14 beaglebone lora-app-server[9550]: time=“2017-08-16T13:55:14-05:00” level=info msg=“handler/mqtt: subscribling to tx topic” topic=“application/+/node/+/tx”
Aug 16 13:55:15 beaglebone lora-app-server[9550]: time=“2017-08-16T13:55:15-05:00” level=info msg=“migrations applied” count=0
Aug 16 13:55:15 beaglebone lora-app-server[9550]: time=“2017-08-16T13:55:15-05:00” level=info msg=“gwmigrate: migrating gateway data from LoRa Server”
Aug 16 13:55:15 beaglebone lora-app-server[9550]: time=“2017-08-16T13:55:15-05:00” level=error msg=“gwmigrate: list gateways error (will retry): rpc error: code = Unavailable desc = transport is closing”
In /etc/default/lora-app-server I have the next configuration:
#postgresql dsn (e.g.: postgres://user:password@hostname/database?sslmode=disable) (default: "postgres://localhost/loraserver?sslmode=disable
POSTGRES_DSN=postgres://loraappserver:dbPass@localhost/loraappserver?sslmode=disable
automatically apply database migrations
DB_AUTOMIGRATE=true
#redis url (e.g. redis://user:password@hostname/0) (default: “redis://localhost:6379”)
REDIS_URL=redis://localhost:6379
#mqtt server (e.g. scheme://host:port where scheme is tcp, ssl or ws) (default: “tcp://localhost:1883”)
MQTT_SERVER=tcp://localhost:1883
#mqtt server username (optional)
MQTT_USERNAME=
#mqtt server password (optional)
MQTT_PASSWORD=
#ca certificate used by the api server (optional)
CA_CERT=/etc/default/certs/ca.pem
#tls certificate used by the api server (optional)
TLS_CERT=/etc/default/certs/cert.pem
#tls key used by the api server (optional)
TLS_KEY=/etc/default/certs/key.pem
#ip:port to bind the api server (default: “0.0.0.0:8001”)
BIND=0.0.0.0:8001
#ip:port to bind the (user facing) http server to (web-interface and REST / gRPC api) (default: “0.0.0.0:8080”)
HTTP_BIND=0.0.0.0:8080
#http server TLS certificate
HTTP_TLS_CERT=/etc/lora-app-server/certs/http.pem
#http server TLS key
HTTP_TLS_KEY=/etc/lora-app-server/certs/http-key.pem
#JWT secret used for api authentication / authorization
#You could generate this by executing ‘openssl rand -base64 32’ for example
JWT_SECRET=AeOMwItOBx7JCgUQnKAvL5ImI13HssW48OhCAWQ2WCw=
#hostname:port of the network-server api server (default: “127.0.0.1:8000”)
NS_SERVER=127.0.0.1:8080
My second issue is when I have NS_SERVER with default configuration, because i got a bind error:
Aug 16 13:26:13 beaglebone lora-app-server[5379]: time=“2017-08-16T13:26:13-05:00” level=info msg=“starting LoRa App Server” docs=“https://docs.loraserver.io/” version=0.11.0
Aug 16 13:26:13 beaglebone lora-app-server[5379]: time=“2017-08-16T13:26:13-05:00” level=info msg=“connecting to postgresql”
Aug 16 13:26:13 beaglebone lora-app-server[5379]: time=“2017-08-16T13:26:13-05:00” level=info msg=“setup redis connection pool”
Aug 16 13:26:13 beaglebone lora-app-server[5379]: time=“2017-08-16T13:26:13-05:00” level=info msg=“handler/mqtt: connecting to mqtt broker” server=“tcp://localhost:1883”
Aug 16 13:26:13 beaglebone lora-app-server[5379]: time=“2017-08-16T13:26:13-05:00” level=info msg=“connecting to network-server api” ca-cert= server=“127.0.0.1:8000” tls-cert= tls-key=
Aug 16 13:26:13 beaglebone lora-app-server[5379]: time=“2017-08-16T13:26:13-05:00” level=info msg=“applying database migrations”
Aug 16 13:26:13 beaglebone lora-app-server[5379]: time=“2017-08-16T13:26:13-05:00” level=info msg=“handler/mqtt: connected to mqtt broker”
Aug 16 13:26:13 beaglebone lora-app-server[5379]: time=“2017-08-16T13:26:13-05:00” level=info msg=“handler/mqtt: subscribling to tx topic” topic=“application/+/node/+/tx”
Aug 16 13:26:13 beaglebone lora-app-server[5379]: time=“2017-08-16T13:26:13-05:00” level=info msg=“migrations applied” count=0
Aug 16 13:26:13 beaglebone lora-app-server[5379]: time=“2017-08-16T13:26:13-05:00” level=info msg=“gwmigrate: migrating gateway data from LoRa Server”
Aug 16 13:26:13 beaglebone lora-app-server[5379]: time=“2017-08-16T13:26:13-05:00” level=info msg=“starting application-server api” bind=“0.0.0.0:8001” ca-cert= tls-cert= tls-key=
Aug 16 13:26:13 beaglebone lora-app-server[5379]: time=“2017-08-16T13:26:13-05:00” level=info msg=“starting client api server” bind=“0.0.0.0:8080” tls-cert=“/etc/lora-app-server/certs/http.pem” tls-key=“/etc/lora-app-server/certs/http-key.pem”
Aug 16 13:26:13 beaglebone lora-app-server[5379]: time=“2017-08-16T13:26:13-05:00” level=fatal msg=“listen tcp 0.0.0.0:8080: bind: address already in use”
And if I change NS_SERVER=127.0.0.1:8080
Aug 16 13:55:16 beaglebone lora-app-server[9550]: time=“2017-08-16T13:55:16-05:00” level=info msg=“transport: http2Client.notifyError got notified that the client transport was broken unexpected EOF.”
Aug 16 13:55:16 beaglebone lora-app-server[9550]: time=“2017-08-16T13:55:16-05:00” level=info msg=“transport: http2Client.notifyError got notified that the client transport was broken unexpected EOF.”
Aug 16 13:55:16 beaglebone lora-app-server[9550]: time=“2017-08-16T13:55:16-05:00” level=info msg=“transport: http2Client.notifyError got notified that the client transport was broken unexpected EOF.”
And lora-gateway-bridge and lora-server services are up and running
I don’t know what it’s my error because i’m using default configurations for the lora services installed onto my system.
Do you have any idea about how I can fix this errors?
Please check the logs of the loraserver
service too.
Thank you Brocaar,
I have done different tests changing the configuration into the configuration files.
Fisrt case:
where:
/etc/default/lorasever
NET_ID=010203
BAND=EU_863_870
#ip:port to bind the api server (default: “0.0.0.0:8000”)
BIND=0.0.0.0:8000REDIS_URL=redis://localhost:6379
POSTGRES_DSN=postgres://loraserver_ns:LoraServerPass@localhost/loraserver_ns?sslmode=disable
DB_AUTOMIGRATE=true
#hostname:port of the application-server api server (optional) (default: “127.0.0.1:8001”)
AS_SERVER=127.0.0.1:8001GW_SERVER_JWT_SECRET=AeOMwItOBx7JCgUQnKAvL5ImI13HssXXXX
GW_SERVER_BIND=0.0.0.0:8002
/etc/default/lora-app-sever
POSTGRES_DSN=postgres://loraappserver:LoraAppServerPass@localhost/loraappserver?sslmode=disable
DB_AUTOMIGRATE=true
REDIS_URL=redis://localhost:6379
MQTT_SERVER=tcp://localhost:1883
CA_CERT=/etc/default/certs/ca.pem
TLS_CERT=/etc/default/certs/cert.pem
TLS_KEY=/etc/default/certs/key.pem
#ip:port to bind the api server (default: “0.0.0.0:8001”)
BIND=0.0.0.0:8001HTTP_BIND=0.0.0.0:8080
HTTP_TLS_CERT=/etc/lora-app-server/certs/http.pem
HTTP_TLS_KEY=/etc/lora-app-server/certs/http-key.pem
JWT_SECRET=2mRChKBfQ1qjkm6fpYYTBFbyaCMnD/9eGXXXX
NS_SERVER=127.0.0.1:8080
journalctl -u lora-app-server -f -n 50
Aug 17 09:05:31 beaglebone lora-app-server[2339]: time=“2017-08-17T09:05:31-05:00” level=info msg=“transport: http2Client.notifyError got notifed EOF.”
Aug 17 09:05:31 beaglebone lora-app-server[2339]: time=“2017-08-17T09:05:31-05:00” level=info msg=“transport: http2Client.notifyError got notifed EOF.”
Aug 17 09:05:31 beaglebone lora-app-server[2339]: time=“2017-08-17T09:05:31-05:00” level=info msg=“transport: http2Client.notifyError got notifed EOF.”
Aug 17 09:05:31 beaglebone lora-app-server[2339]: time=“2017-08-17T09:05:31-05:00” level=info msg=“transport: http2Client.notifyError got notifed EOF.”
Aug 17 09:05:31 beaglebone lora-app-server[2339]: time=“2017-08-17T09:05:31-05:00” level=info msg=“transport: http2Client.notifyError got notifed EOF.”
Aug 17 09:05:31 beaglebone lora-app-server[2339]: time=“2017-08-17T09:05:31-05:00” level=info msg=“transport: http2Client.notifyError got notifed EOF.”
journalctl -u loraserver -f -n 50
Aug 17 09:13:11 beaglebone systemd[1]: Started LoRa Server.
Aug 17 09:13:11 beaglebone loraserver[2400]: time=“2017-08-17T09:13:11-05:00” level=info msg=“starting LoRa Server” band=“EU_863_870” docs=“https://docs.loraserver.io/” net_id=010203 version=0.20.1
Aug 17 09:13:11 beaglebone loraserver[2400]: time=“2017-08-17T09:13:11-05:00” level=info msg=“setup redis connection pool” url=“redis://localhost:6379”
Aug 17 09:13:11 beaglebone loraserver[2400]: time=“2017-08-17T09:13:11-05:00” level=info msg=“connecting to postgresql”
Aug 17 09:13:11 beaglebone loraserver[2400]: time=“2017-08-17T09:13:11-05:00” level=info msg=“backend/gateway: connecting to mqtt broker” server=“tcp://localhost:1883”
Aug 17 09:13:11 beaglebone loraserver[2400]: time=“2017-08-17T09:13:11-05:00” level=info msg=“connecting to application-server” ca-cert= server=“127.0.0.1:8001” tls-cert= tls-key=
Aug 17 09:13:11 beaglebone loraserver[2400]: time=“2017-08-17T09:13:11-05:00” level=info msg=“no network-controller configured”
Aug 17 09:13:11 beaglebone loraserver[2400]: time=“2017-08-17T09:13:11-05:00” level=info msg=“migrated node-sessions to new format” errors=0 migrated=0
Aug 17 09:13:11 beaglebone loraserver[2400]: time=“2017-08-17T09:13:11-05:00” level=info msg=“applying database migrations”
Aug 17 09:13:11 beaglebone loraserver[2400]: time=“2017-08-17T09:13:11-05:00” level=info msg=“backend/gateway: connected to mqtt server”
Aug 17 09:13:11 beaglebone loraserver[2400]: time=“2017-08-17T09:13:11-05:00” level=info msg=“backend/gateway: subscribing to rx topic” topic=“gateway/+/rx”
Aug 17 09:13:11 beaglebone loraserver[2400]: time=“2017-08-17T09:13:11-05:00” level=info msg=“grpc: addrConn.resetTransport failed to create client transport: connection error: desc = “transport: Error while dialing dial tcp 127.0.0.1:8001: getsockopt: connection refused”; Reconnecting to {127.0.0.1:8001 }”
Aug 17 09:13:11 beaglebone loraserver[2400]: time=“2017-08-17T09:13:11-05:00” level=info msg=“backend/gateway: subscribing to stats topic” topic=“gateway/+/stats”
Aug 17 09:13:11 beaglebone loraserver[2400]: time=“2017-08-17T09:13:11-05:00” level=info msg=“migrations applied” count=0
Aug 17 09:13:11 beaglebone loraserver[2400]: time=“2017-08-17T09:13:11-05:00” level=info msg=“starting api server” bind=“0.0.0.0:8000” ca-cert= tls-cert= tls-key=
Aug 17 09:13:11 beaglebone loraserver[2400]: time=“2017-08-17T09:13:11-05:00” level=info msg=“starting gateway api server” bind=“0.0.0.0:8002” ca-cert= tls-cert= tls-key=
Aug 17 09:13:12 beaglebone loraserver[2400]: time=“2017-08-17T09:13:12-05:00” level=info msg=“grpc: addrConn.resetTransport failed to create client transport: connection error: desc = “transport: Error while dialing dial tcp 127.0.0.1:8001: getsockopt: connection refused”; Reconnecting to {127.0.0.1:8001 }”
Changing the variable BIND in /etc/default/loraserver
#ip:port to bind the api server (default: “0.0.0.0:8000”)
BIND=0.0.0.0:8001
and NS_SERVER in /etc/default/lora-app-server
#hostname:port of the network-server api server (default: “127.0.0.1:8000”)
NS_SERVER=127.0.0.1:8000
journalctl -u loraserver -f -n 50
Started LoRa Server.
Aug 17 09:32:43 beaglebone loraserver[2929]: time=“2017-08-17T09:32:43-05:00” level=info msg=“starting LoRa Server” band=“EU_863_870” docs=“https://docs.loraserver.io/” net_id=010203 version=0.20.1
Aug 17 09:32:43 beaglebone loraserver[2929]: time=“2017-08-17T09:32:43-05:00” level=info msg=“setup redis connection pool” url=“redis://localhost:6379”
Aug 17 09:32:43 beaglebone loraserver[2929]: time=“2017-08-17T09:32:43-05:00” level=info msg=“connecting to postgresql”
Aug 17 09:32:43 beaglebone loraserver[2929]: time=“2017-08-17T09:32:43-05:00” level=info msg=“backend/gateway: connecting to mqtt broker” server=“tcp://localhost:1883”
Aug 17 09:32:43 beaglebone loraserver[2929]: time=“2017-08-17T09:32:43-05:00” level=info msg=“connecting to application-server” ca-cert= server=“127.0.0.1:8001” tls-cert= tls-key=
Aug 17 09:32:43 beaglebone loraserver[2929]: time=“2017-08-17T09:32:43-05:00” level=info msg=“no network-controller configured”
Aug 17 09:32:43 beaglebone loraserver[2929]: time=“2017-08-17T09:32:43-05:00” level=info msg=“backend/gateway: connected to mqtt server”
Aug 17 09:32:43 beaglebone loraserver[2929]: time=“2017-08-17T09:32:43-05:00” level=info msg=“backend/gateway: subscribing to rx topic” topic=“gateway/+/rx”
Aug 17 09:32:43 beaglebone loraserver[2929]: time=“2017-08-17T09:32:43-05:00” level=info msg=“backend/gateway: subscribing to stats topic” topic=“gateway/+/stats”
Aug 17 09:32:43 beaglebone loraserver[2929]: time=“2017-08-17T09:32:43-05:00” level=info msg=“grpc: addrConn.resetTransport failed to create client transport: connection error: desc = “transport: Error while dialing dial tcp 127.0.0.1:8001: getsockopt: connection refused”; Reconnecting to {127.0.0.1:8001 }”
Aug 17 09:32:43 beaglebone loraserver[2929]: time=“2017-08-17T09:32:43-05:00” level=info msg=“migrated node-sessions to new format” errors=0 migrated=0
Aug 17 09:32:43 beaglebone loraserver[2929]: time=“2017-08-17T09:32:43-05:00” level=info msg=“applying database migrations”
Aug 17 09:32:43 beaglebone loraserver[2929]: time=“2017-08-17T09:32:43-05:00” level=info msg=“migrations applied” count=0
Aug 17 09:32:43 beaglebone loraserver[2929]: time=“2017-08-17T09:32:43-05:00” level=info msg=“starting api server” bind=“0.0.0.0:8001” ca-cert= tls-cert= tls-key=
Aug 17 09:32:43 beaglebone loraserver[2929]: time=“2017-08-17T09:32:43-05:00” level=info msg=“starting gateway api server” bind=“0.0.0.0:8002” ca-cert= tls-cert= tls-key=
journalctl -u lora-app-server -f -n 50
Aug 17 09:34:12 beaglebone systemd[1]: Started LoRa App Server.
Aug 17 09:34:12 beaglebone lora-app-server[2947]: time=“2017-08-17T09:34:12-05:00” level=info msg=“starting LoRa App Server” docs=“https://docs.loraserver.io/” version=0.11.0
Aug 17 09:34:12 beaglebone lora-app-server[2947]: time=“2017-08-17T09:34:12-05:00” level=info msg=“connecting to postgresql”
Aug 17 09:34:12 beaglebone lora-app-server[2947]: time=“2017-08-17T09:34:12-05:00” level=info msg=“setup redis connection pool”
Aug 17 09:34:12 beaglebone lora-app-server[2947]: time=“2017-08-17T09:34:12-05:00” level=info msg=“handler/mqtt: connecting to mqtt broker” server=“tcp://localhost:1883”
Aug 17 09:34:12 beaglebone lora-app-server[2947]: time=“2017-08-17T09:34:12-05:00” level=info msg=“connecting to network-server api” ca-cert= server=“127.0.0.1:8000” tls-cert= tls-key=
Aug 17 09:34:12 beaglebone lora-app-server[2947]: time=“2017-08-17T09:34:12-05:00” level=info msg=“applying database migrations”
Aug 17 09:34:12 beaglebone lora-app-server[2947]: time=“2017-08-17T09:34:12-05:00” level=info msg=“handler/mqtt: connected to mqtt broker”
Aug 17 09:34:12 beaglebone lora-app-server[2947]: time=“2017-08-17T09:34:12-05:00” level=info msg=“handler/mqtt: subscribling to tx topic” topic=“application/+/node/+/tx”
Aug 17 09:34:12 beaglebone lora-app-server[2947]: time=“2017-08-17T09:34:12-05:00” level=info msg=“grpc: addrConn.resetTransport failed to create client transport: connection error: desc = “transport: Error while dialing dial tcp 127.0.0.1:8000: getsockopt: connection refused”; Reconnecting to {127.0.0.1:8000 }”
Aug 17 09:34:12 beaglebone lora-app-server[2947]: time=“2017-08-17T09:34:12-05:00” level=info msg=“migrations applied” count=0
Aug 17 09:34:12 beaglebone lora-app-server[2947]: time=“2017-08-17T09:34:12-05:00” level=info msg=“gwmigrate: migrating gateway data from LoRa Server”
Aug 17 09:34:12 beaglebone lora-app-server[2947]: time=“2017-08-17T09:34:12-05:00” level=error msg=“gwmigrate: list gateways error (will retry): rpc error: code = Unavailable desc = grpc: the connection is unavailable”
Aug 17 09:34:13 beaglebone lora-app-server[2947]: time=“2017-08-17T09:34:13-05:00” level=info msg=“grpc: addrConn.resetTransport failed to create client transport: connection error: desc = “transport: Error while dialing dial tcp 127.0.0.1:8000: getsockopt: connection refused”; Reconnecting to {127.0.0.1:8000 }”
Aug 17 09:34:14 beaglebone lora-app-server[2947]: time=“2017-08-17T09:34:14-05:00” level=error msg=“gwmigrate: list gateways error (will retry): rpc error: code = Unavailable desc = grpc: the connection is unavailable”
Try removing these values, they are optional.
The only cert related config values that you must set are:
It seems that currently one side of the API is using TLS where the client is not using TLS, causing the API to drop the connection(s).
The result is the same, the error remains
Aug 17 11:43:28 beaglebone lora-app-server[23974]: time=“2017-08-17T11:43:28-05:00” level=error msg=“gwmigrate: list gateways error (will retry): rpc error: code = Unavailable desc = grpc: the connection is unavailable”
Aug 17 11:43:30 beaglebone lora-app-server[23974]: time=“2017-08-17T11:43:30-05:00” level=error msg=“gwmigrate: list gateways error (will retry): rpc error: code = Unavailable desc = grpc: the connection is unavailable”
Aug 17 11:43:32 beaglebone lora-app-server[23974]: time=“2017-08-17T11:43:32-05:00” level=error msg=“gwmigrate: list gateways error (will retry): rpc error: code = Unavailable desc = grpc: the connection is unavailable”
Aug 17 11:43:34 beaglebone lora-app-server[23974]: time=“2017-08-17T11:43:34-05:00” level=error msg=“gwmigrate: list gateways error (will retry): rpc error: code = Unavailable desc = grpc: the connection is unavailable”
I don´t understand why when I have in
/etc/default/loraserver
BIND=0.0.0.0:8000
AS_SERVER=127.0.0.1:8001
/etc/default/lora-app-server
BIND=0.0.0.0:8001
NS_SERVER=127.0.0.1:8000
in lora-app-server log i have
Aug 17 08:48:24 beaglebone lora-app-server[2219]: time=“2017-08-17T08:48:24-05:00” level=fatal msg=“listen tcp 0.0.0.0:8080: bind: address already in use”
Aug 17 08:48:24 beaglebone systemd[1]: lora-app-server.service: Main process exited, code=exited, status=1/FAILURE
Note that the error has to do with port 8080, which should be bound to the HTTP server. Could you check if there’s another process using that port already? I.e., run this (grep port 80 instead of 8080 so you can check ports 8000 and 8001 too):
netstat -pln | grep :80
Thank you,
I checked my system and I saw that effectively there was other service that was using the port 8080.
Fixing that, I don’ have any problem when lora-app-server is started.
Thank very much for your support brocaar, iegomez
I got the same error:
raspberrypi lora-app-server[810]: time=“2017-10-24T08:59:01Z” level=error msg=“gwmigrate: list gateways error (will retry): rpc error: code = Unavailable desc = grpc: the connection is unavailable”
I did create an image for an raspberry pi 3.
I made a config file for the IMG_NAME and rest kept as default.
I did check the configuration, it’s on 0.0.0.0:8080 and create the certificate as mentioned above.
But I am still getting the error.
systemctl start lora-app-server
I don’t get an error when I try to run the lora-app-server
systemctl start lora-app-server
journalctl -u lora-app-server -f -n 50
No journal files were found.
Do you guys have any other suggestions?
raspberrypi lora-app-server[810]: time=“2017-10-24T08:59:01Z” level=error msg=“gwmigrate: list gateways error (will retry): rpc error: code = Unavailable desc = grpc: the connection is unavailable”
The issue is probably with the loraserver
process. Could you check if that process is running? If not and it does not start, you could run the following to start it manually to see the error (given you’re using the .deb
package / repository):
set -a
source /etc/default/loraserver
loraserver
pi@raspberrypi:/ $ loraserver
INFO[0000] starting LoRa Server band="EU_863_870" docs= "https://docs.loraserver.io/" net_id=010203 version=0.21.0
INFO[0000] setup redis connection pool url="redis://localhost: 6379"
INFO[0000] connecting to postgresql
INFO[0000] backend/gateway: connecting to mqtt broker server="tcp://localhost :1883"
INFO[0000] backend/gateway: connected to mqtt server
INFO[0000] backend/gateway: subscribing to rx topic topic="gateway/+/rx"
INFO[0000] connecting to application-server ca-cert= server="127.0. 0.1:8001" tls-cert= tls-key=
INFO[0000] no network-controller configured
INFO[0000] applying database migrations
INFO[0000] grpc: addrConn.resetTransport failed to create client transport: conn ection error: desc = "transport: Error while dialing dial tcp 127.0.0.1:8001: ge tsockopt: connection refused"; Reconnecting to {127.0.0.1:8001 <nil>}
INFO[0000] backend/gateway: subscribing to stats topic topic="gateway/+/stats"
INFO[0000] migrations applied count=0
INFO[0000] starting api server bind="0.0.0.0:8000" ca- cert= tls-cert= tls-key=
INFO[0000] starting gateway api server bind="0.0.0.0:8002" ca- cert= tls-cert= tls-key=
FATA[0000] --gw-server-jwt-secret must be set
Thanks this gives me an indication what the problem is.
I did set them in the loraserver and lora-app-server in scripts/default
I still get the message: FATA[0000] --gw-server-jwt-secret must be set
What am I missing?
Hi brocaar
I meet the same err
Error rpc error: code = Unavailable desc = grpc: the connection is unavailable (code: 2)
but it is different from ElizaBth
the loraserver and the lora-app-server are runing normal ,by checking the database ,I can get the data from node ,but when I enter the page of
Organizations/LoRa Server/Applications/appname/nodename/Raw frame logs
some error occurred,it remain me
Error transport is closing (code: 14)
Error rpc error: code = Unavailable desc = grpc: the connection is unavailable (code: 2)
and the log is as below
loraserver
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x10 pc=0x8cb395]
goroutine 66 [running]:
github.com/brocaar/loraserver/internal/api.(*NetworkServerAPI).GetFrameLogsForDevEUI(0xe275d0, 0x7fdd6bd9b788, 0xc4202fa540, 0xc4201d6220, 0xe275d0, 0x428c99, 0xc4201a86f0)
/home/ryan/go/src/github.com/brocaar/loraserver/internal/api/network_server.go:908 +0x4c5
github.com/brocaar/loraserver/api/ns._NetworkServer_GetFrameLogsForDevEUI_Handler(0xa54be0, 0xe275d0, 0x7fdd6bd9b788, 0xc4202fa540, 0xc420778320, 0x0, 0x0, 0x0, 0x0, 0x0)
/home/ryan/go/src/github.com/brocaar/loraserver/api/ns/ns.pb.go:3885 +0x279
github.com/brocaar/loraserver/vendor/google.golang.org/grpc.(*Server).processUnaryRPC(0xc4200a83c0, 0xdc2940, 0xc4200d8000, 0xc4207bc000, 0xc4207502a0, 0xe002b8, 0xc4202fa600, 0x0, 0x0)
/home/ryan/go/src/github.com/brocaar/loraserver/vendor/google.golang.org/grpc/server.go:776 +0xab4
github.com/brocaar/loraserver/vendor/google.golang.org/grpc.(*Server).handleStream(0xc4200a83c0, 0xdc2940, 0xc4200d8000, 0xc4207bc000, 0xc4202fa600)
/home/ryan/go/src/github.com/brocaar/loraserver/vendor/google.golang.org/grpc/server.go:976 +0x1528
github.com/brocaar/loraserver/vendor/google.golang.org/grpc.(*Server).serveStreams.func1.1(0xc42008a2e0, 0xc4200a83c0, 0xdc2940, 0xc4200d8000, 0xc4207bc000)
/home/ryan/go/src/github.com/brocaar/loraserver/vendor/google.golang.org/grpc/server.go:546 +0x9f
created by github.com/brocaar/loraserver/vendor/google.golang.org/grpc.(*Server).serveStreams.func1
/home/ryan/go/src/github.com/brocaar/loraserver/vendor/google.golang.org/grpc/server.go:544 +0xa1
lora-app-server
INFO[0010] transport: http2Client.notifyError got notified that the client transport was broken EOF.
INFO[0010] grpc: addrConn.resetTransport failed to create client transport: connection error: desc = "transport: Error while dialing dial tcp [::1]:8000: getsockopt: connection refused"; Reconnecting to {localhost:8000 <nil>}
INFO[0011] grpc: addrConn.resetTransport failed to create client transport: connection error: desc = "transport: Error while dialing dial tcp [::1]:8000: getsockopt: connection refused"; Reconnecting to {localhost:8000 <nil>}
INFO[0013] grpc: addrConn.resetTransport failed to create client transport: connection error: desc = "transport: Error while dialing dial tcp [::1]:8000: getsockopt: connection refused"; Reconnecting to {localhost:8000 <nil>}
INFO[0016] grpc: addrConn.resetTransport failed to create client transport: connection error: desc = "transport: Error while dialing dial tcp [::1]:8000: getsockopt: connection refused"; Reconnecting to {localhost:8000 <nil>}
2017/12/27 14:45:59 http2: server: error reading preface from client 192.168.1.111:64978: timeout waiting for client preface
INFO[0020] grpc: addrConn.resetTransport failed to create client transport: connection error: desc = "transport: Error while dialing dial tcp [::1]:8000: getsockopt: connection refused"; Reconnecting to {localhost:8000 <nil>}
what can I do to solve this problem ,any help will be great ,thanks
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x10 pc=0x8cb395]
goroutine 66 [running]:
github.com/brocaar/loraserver/internal/api.(*NetworkServerAPI).GetFrameLogsForDevEUI(0xe275d0, 0x7fdd6bd9b788, 0xc4202fa540, 0xc4201d6220, 0xe275d0, 0x428c99, 0xc4201a86f0)
/home/ryan/go/src/github.com/brocaar/loraserver/internal/api/network_server.go:908 +0x4c5
github.com/brocaar/loraserver/api/ns._NetworkServer_GetFrameLogsForDevEUI_Handler(0xa54be0, 0xe275d0, 0x7fdd6bd9b788, 0xc4202fa540, 0xc420778320, 0x0, 0x0, 0x0, 0x0, 0x0)
/home/ryan/go/src/github.com/brocaar/loraserver/api/ns/ns.pb.go:3885 +0x279
github.com/brocaar/loraserver/vendor/google.golang.org/grpc.(*Server).processUnaryRPC(0xc4200a83c0, 0xdc2940, 0xc4200d8000, 0xc4207bc000, 0xc4207502a0, 0xe002b8, 0xc4202fa600, 0x0, 0x0)
/home/ryan/go/src/github.com/brocaar/loraserver/vendor/google.golang.org/grpc/server.go:776 +0xab4
github.com/brocaar/loraserver/vendor/google.golang.org/grpc.(*Server).handleStream(0xc4200a83c0, 0xdc2940, 0xc4200d8000, 0xc4207bc000, 0xc4202fa600)
/home/ryan/go/src/github.com/brocaar/loraserver/vendor/google.golang.org/grpc/server.go:976 +0x1528
github.com/brocaar/loraserver/vendor/google.golang.org/grpc.(*Server).serveStreams.func1.1(0xc42008a2e0, 0xc4200a83c0, 0xdc2940, 0xc4200d8000, 0xc4207bc000)
/home/ryan/go/src/github.com/brocaar/loraserver/vendor/google.golang.org/grpc/server.go:546 +0x9f
created by github.com/brocaar/loraserver/vendor/google.golang.org/grpc.(*Server).serveStreams.func1
/home/ryan/go/src/github.com/brocaar/loraserver/vendor/google.golang.org/grpc/server.go:544 +0xa1
That looks like a bug. Please create an issue here and I’ll look into it: https://github.com/brocaar/loraserver
Please also provide the version of LoRa Server that you’re using in the issue.
OK,I have create an bug in