Hello @brocaar:
Below I have posted a more complete lora-app-server log. It seem that there is a problem with the InfluxDB connection since the log has returned “may 24 14:03:51 lab04 lora-app-server[6035]: panic: reflect.Value.Interface: cannot return value obtained from unexported field or method”.
may 24 14:03:41 lab04 lora-app-server[5992]: created by github.com/brocaar/lora-app-server/vendor/google.golang.org/grpc.(*Server).serveStreams.func1
may 24 14:03:41 lab04 lora-app-server[5992]: /home/travis/gopath/src/github.com/brocaar/lora-app-server/vendor/google.golang.org/grpc/server.go:636 +0xa1
may 24 14:03:41 lab04 systemd[1]: lora-app-server.service: Main process exited, code=exited, status=2/INVALIDARGUMENT
may 24 14:03:41 lab04 systemd[1]: lora-app-server.service: Failed with result ‘exit-code’.
may 24 14:03:41 lab04 systemd[1]: lora-app-server.service: Service hold-off time over, scheduling restart.
may 24 14:03:41 lab04 systemd[1]: lora-app-server.service: Scheduled restart job, restart counter is at 51.
may 24 14:03:41 lab04 systemd[1]: Stopped LoRa App Server.
may 24 14:03:41 lab04 systemd[1]: Started LoRa App Server.
may 24 14:03:41 lab04 lora-app-server[6035]: time=“2018-05-24T14:03:41+02:00” level=info msg=“starting LoRa App Server” docs=“https://docs.loraserver.io/” version=0.21.0
may 24 14:03:41 lab04 lora-app-server[6035]: time=“2018-05-24T14:03:41+02:00” level=info msg=“connecting to postgresql”
may 24 14:03:41 lab04 lora-app-server[6035]: time=“2018-05-24T14:03:41+02:00” level=info msg=“setup redis connection pool”
may 24 14:03:41 lab04 lora-app-server[6035]: time=“2018-05-24T14:03:41+02:00” level=info msg=“handler/mqtt: TLS config is empty”
may 24 14:03:41 lab04 lora-app-server[6035]: time=“2018-05-24T14:03:41+02:00” level=info msg=“handler/mqtt: connecting to mqtt broker” server=“tcp://localhost:1883”
may 24 14:03:41 lab04 lora-app-server[6035]: time=“2018-05-24T14:03:41+02:00” level=info msg=“applying database migrations”
may 24 14:03:41 lab04 lora-app-server[6035]: time=“2018-05-24T14:03:41+02:00” level=info msg=“handler/mqtt: connected to mqtt broker”
may 24 14:03:41 lab04 lora-app-server[6035]: time=“2018-05-24T14:03:41+02:00” level=info msg=“handler/mqtt: subscribing to tx topic” qos=0 topic=application/+/node/+/tx
may 24 14:03:41 lab04 lora-app-server[6035]: time=“2018-05-24T14:03:41+02:00” level=info msg=“migrations applied” count=0
may 24 14:03:41 lab04 lora-app-server[6035]: time=“2018-05-24T14:03:41+02:00” level=info msg=“starting application-server api” bind=“0.0.0.0:8001” ca-cert= tls-cert= tls-key=
may 24 14:03:41 lab04 lora-app-server[6035]: time=“2018-05-24T14:03:41+02:00” level=info msg=“starting join-server api” bind=“0.0.0.0:8003” ca_cert= tls_cert= tls_key=
may 24 14:03:41 lab04 lora-app-server[6035]: time=“2018-05-24T14:03:41+02: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-se
may 24 14:03:41 lab04 lora-app-server[6035]: time=“2018-05-24T14:03:41+02:00” level=info msg=“registering rest api handler and documentation endpoint” path=/api
may 24 14:03:43 lab04 lora-app-server[6035]: time=“2018-05-24T14:03:43+02:00” level=warning msg=“creating insecure network-server client” server=“localhost:8000”
may 24 14:03:43 lab04 lora-app-server[6035]: time=“2018-05-24T14:03:43+02:00” level=info msg=“finished client streaming call” grpc.code=OK grpc.method=StreamFrameLogsForDevice grpc.service=ns.NetworkServer grpc.
may 24 14:03:51 lab04 lora-app-server[6035]: time=“2018-05-24T14:03:51+02:00” level=info msg=“finished client unary call” grpc.code=OK grpc.method=GetDevice grpc.service=ns.NetworkServer grpc.time_ms=1.09 span.k
may 24 14:03:51 lab04 lora-app-server[6035]: time=“2018-05-24T14:03:51+02:00” level=info msg=“finished client unary call” grpc.code=OK grpc.method=UpdateDevice grpc.service=ns.NetworkServer grpc.time_ms=1.706 sp
may 24 14:03:51 lab04 lora-app-server[6035]: time=“2018-05-24T14:03:51+02:00” level=info msg=“device updated” dev_eui=0000000000000000
may 24 14:03:51 lab04 lora-app-server[6035]: time=“2018-05-24T14:03:51+02:00” level=info msg=“handler/mqtt: publishing message” qos=0 topic=application/1/node/0000000000000000/rx
may 24 14:03:51 lab04 lora-app-server[6035]: time=“2018-05-24T14:03:51+02:00” level=info msg=“handler/http: publishing data-up payload” dev_eui=0000000000000000 url=“http://192.168.47.212:8080/HttpIntegration/”
may 24 14:03:51 lab04 lora-app-server[6035]: panic: reflect.Value.Interface: cannot return value obtained from unexported field or method
may 24 14:03:51 lab04 lora-app-server[6035]: goroutine 422 [running]:
may 24 14:03:51 lab04 lora-app-server[6035]: reflect.valueInterface(0xc5c640, 0xc420346340, 0xa8, 0xc42056fd01, 0xc4200bc3a0, 0xc42056fdf0)
may 24 14:03:51 lab04 lora-app-server[6035]: /home/travis/.gimme/versions/go1.10.1.linux.amd64/src/reflect/value.go:959 +0x1c1
may 24 14:03:51 lab04 lora-app-server[6035]: reflect.Value.Interface(0xc5c640, 0xc420346340, 0xa8, 0x0, 0xc5c640)
may 24 14:03:51 lab04 lora-app-server[6035]: /home/travis/.gimme/versions/go1.10.1.linux.amd64/src/reflect/value.go:948 +0x44
may 24 14:03:51 lab04 lora-app-server[6035]: github.com/brocaar/lora-app-server/internal/handler/influxdbhandler.objectToMeasurements(0x1, 0xc4202c8400, 0xe, 0xc4200bdc58, 0x6, 0x0, 0x0, 0x0, 0xc4204a8ff0, 0x1,
may 24 14:03:51 lab04 lora-app-server[6035]: /home/travis/gopath/src/github.com/brocaar/lora-app-server/internal/handler/influxdbhandler/influxdb_handler.go:291 +0x90b
may 24 14:03:51 lab04 lora-app-server[6035]: github.com/brocaar/lora-app-server/internal/handler/influxdbhandler.objectToMeasurements(0x1, 0xc4202c8400, 0xe, 0xc4200bdc58, 0x6, 0x0, 0x0, 0x0, 0xc4204a8ff0, 0x1,
may 24 14:03:51 lab04 lora-app-server[6035]: /home/travis/gopath/src/github.com/brocaar/lora-app-server/internal/handler/influxdbhandler/influxdb_handler.go:296 +0xe04
may 24 14:03:51 lab04 lora-app-server[6035]: /home/travis/gopath/src/github.com/brocaar/lora-app-server/internal/handler/influxdbhandler/influxdb_handler.go:202 +0x61a
may 24 14:03:51 lab04 lora-app-server[6035]: github.com/brocaar/lora-app-server/internal/handler/multihandler.Handler.SendDataUp(0xee3b40, 0xc420242f00, 0x1, 0xc4202c8400, 0xe, 0xc4200bdc58, 0x6, 0x0, 0x0, 0x0,
may 24 14:03:51 lab04 lora-app-server[6035]: /home/travis/gopath/src/github.com/brocaar/lora-app-server/internal/handler/multihandler/multi.go:41 +0x1d4
may 24 14:03:51 lab04 lora-app-server[6035]: github.com/brocaar/lora-app-server/internal/api.(*ApplicationServerAPI).HandleUplinkData(0x164a968, 0xee0ac0, 0xc4207a42a0, 0xc420275080, 0x164a968, 0xecca20, 0xc5c3c
may 24 14:03:51 lab04 lora-app-server[6035]: /home/travis/gopath/src/github.com/brocaar/lora-app-server/internal/api/application_server.go:183 +0x1481
may 24 14:03:51 lab04 lora-app-server[6035]: github.com/brocaar/lora-app-server/vendor/github.com/brocaar/loraserver/api/as._ApplicationServer_HandleUplinkData_Handler.func1(0xee0ac0, 0xc4207a42a0, 0xd6a260, 0xc
may 24 14:03:51 lab04 lora-app-server[6035]: /home/travis/gopath/src/github.com/brocaar/lora-app-server/vendor/github.com/brocaar/loraserver/api/as/as.pb.go:605 +0x86
may 24 14:03:51 lab04 lora-app-server[6035]: github.com/brocaar/lora-app-server/vendor/github.com/grpc-ecosystem/go-grpc-middleware.ChainUnaryServer.func1.1(0xee0ac0, 0xc4207a42a0, 0xd6a260, 0xc420275080, 0x26,
may 24 14:03:51 lab04 lora-app-server[6035]: /home/travis/gopath/src/github.com/brocaar/lora-app-server/vendor/github.com/grpc-ecosystem/go-grpc-middleware/chain.go:31 +0x104
may 24 14:03:51 lab04 lora-app-server[6035]: github.com/brocaar/lora-app-server/vendor/github.com/grpc-ecosystem/go-grpc-middleware/logging/logrus.UnaryServerInterceptor.func1(0xee0ac0, 0xc420349f80, 0xd6a260, 0
may 24 14:03:51 lab04 lora-app-server[6035]: /home/travis/gopath/src/github.com/brocaar/lora-app-server/vendor/github.com/grpc-ecosystem/go-grpc-middleware/logging/logrus/server_interceptors.go:31 +0x10d
may 24 14:03:51 lab04 lora-app-server[6035]: github.com/brocaar/lora-app-server/vendor/github.com/grpc-ecosystem/go-grpc-middleware.ChainUnaryServer.func1.1(0xee0ac0, 0xc420349f80, 0xd6a260, 0xc420275080, 0x26,
may 24 14:03:51 lab04 lora-app-server[6035]: /home/travis/gopath/src/github.com/brocaar/lora-app-server/vendor/github.com/grpc-ecosystem/go-grpc-middleware/chain.go:34 +0x97
may 24 14:03:51 lab04 lora-app-server[6035]: github.com/brocaar/lora-app-server/vendor/github.com/grpc-ecosystem/go-grpc-middleware/tags.UnaryServerInterceptor.func1(0xee0ac0, 0xc420365320, 0xd6a260, 0xc42027508
may 24 14:03:51 lab04 lora-app-server[6035]: /home/travis/gopath/src/github.com/brocaar/lora-app-server/vendor/github.com/grpc-ecosystem/go-grpc-middleware/tags/interceptors.go:21 +0x86
may 24 14:03:51 lab04 lora-app-server[6035]: github.com/brocaar/lora-app-server/vendor/github.com/grpc-ecosystem/go-grpc-middleware.ChainUnaryServer.func1(0xee0ac0, 0xc420365320, 0xd6a260, 0xc420275080, 0xc42031
may 24 14:03:51 lab04 lora-app-server[6035]: /home/travis/gopath/src/github.com/brocaar/lora-app-server/vendor/github.com/grpc-ecosystem/go-grpc-middleware/chain.go:37 +0x16c
may 24 14:03:51 lab04 lora-app-server[6035]: github.com/brocaar/lora-app-server/vendor/github.com/brocaar/loraserver/api/as._ApplicationServer_HandleUplinkData_Handler(0xce5b40, 0x164a968, 0xee0ac0, 0xc420365320
may 24 14:03:51 lab04 lora-app-server[6035]: /home/travis/gopath/src/github.com/brocaar/lora-app-server/vendor/github.com/brocaar/loraserver/api/as/as.pb.go:607 +0x167
may 24 14:03:51 lab04 lora-app-server[6035]: github.com/brocaar/lora-app-server/vendor/google.golang.org/grpc.(*Server).processUnaryRPC(0xc4200d4000, 0xee5e80, 0xc42053e780, 0xc420718b40, 0xc420180bd0, 0x161aca0
may 24 14:03:51 lab04 lora-app-server[6035]: /home/travis/gopath/src/github.com/brocaar/lora-app-server/vendor/google.golang.org/grpc/server.go:921 +0x8ac
may 24 14:03:51 lab04 lora-app-server[6035]: github.com/brocaar/lora-app-server/vendor/google.golang.org/grpc.(*Server).handleStream(0xc4200d4000, 0xee5e80, 0xc42053e780, 0xc420718b40, 0x0)
may 24 14:03:51 lab04 lora-app-server[6035]: /home/travis/gopath/src/github.com/brocaar/lora-app-server/vendor/google.golang.org/grpc/server.go:1143 +0x1318
may 24 14:03:51 lab04 lora-app-server[6035]: github.com/brocaar/lora-app-server/vendor/google.golang.org/grpc.(*Server).serveStreams.func1.1(0xc4200bc110, 0xc4200d4000, 0xee5e80, 0xc42053e780, 0xc420718b40)
may 24 14:03:51 lab04 lora-app-server[6035]: /home/travis/gopath/src/github.com/brocaar/lora-app-server/vendor/google.golang.org/grpc/server.go:638 +0x9f
may 24 14:03:51 lab04 lora-app-server[6035]: created by github.com/brocaar/lora-app-server/vendor/google.golang.org/grpc.(*Server).serveStreams.func1
may 24 14:03:51 lab04 lora-app-server[6035]: /home/travis/gopath/src/github.com/brocaar/lora-app-server/vendor/google.golang.org/grpc/server.go:636 +0xa1
may 24 14:03:51 lab04 systemd[1]: lora-app-server.service: Main process exited, code=exited, status=2/INVALIDARGUMENT
may 24 14:03:51 lab04 systemd[1]: lora-app-server.service: Failed with result ‘exit-code’.
may 24 14:03:51 lab04 systemd[1]: lora-app-server.service: Service hold-off time over, scheduling restart.
may 24 14:03:51 lab04 systemd[1]: lora-app-server.service: Scheduled restart job, restart counter is at 52.
may 24 14:03:51 lab04 systemd[1]: Stopped LoRa App Server.
may 24 14:03:51 lab04 systemd[1]: Started LoRa App Server.
may 24 14:03:51 lab04 lora-app-server[6072]: time=“2018-05-24T14:03:51+02:00” level=info msg=“starting LoRa App Server” docs=“https://docs.loraserver.io/” version=0.21.0
may 24 14:03:51 lab04 lora-app-server[6072]: time=“2018-05-24T14:03:51+02:00” level=info msg=“connecting to postgresql”
may 24 14:03:51 lab04 lora-app-server[6072]: time=“2018-05-24T14:03:51+02:00” level=info msg=“setup redis connection pool”
may 24 14:03:51 lab04 lora-app-server[6072]: time=“2018-05-24T14:03:51+02:00” level=info msg=“handler/mqtt: TLS config is empty”
may 24 14:03:51 lab04 lora-app-server[6072]: time=“2018-05-24T14:03:51+02:00” level=info msg=“handler/mqtt: connecting to mqtt broker” server=“tcp://localhost:1883”
may 24 14:03:51 lab04 lora-app-server[6072]: time=“2018-05-24T14:03:51+02:00” level=info msg=“applying database migrations”
may 24 14:03:51 lab04 lora-app-server[6072]: time=“2018-05-24T14:03:51+02:00” level=info msg=“handler/mqtt: connected to mqtt broker”
may 24 14:03:51 lab04 lora-app-server[6072]: time=“2018-05-24T14:03:51+02:00” level=info msg=“handler/mqtt: subscribing to tx topic” qos=0 topic=application/+/node/+/tx
may 24 14:03:51 lab04 lora-app-server[6072]: time=“2018-05-24T14:03:51+02:00” level=info msg=“migrations applied” count=0
may 24 14:03:51 lab04 lora-app-server[6072]: time=“2018-05-24T14:03:51+02:00” level=info msg=“starting application-server api” bind=“0.0.0.0:8001” ca-cert= tls-cert= tls-key=
may 24 14:03:51 lab04 lora-app-server[6072]: time=“2018-05-24T14:03:51+02:00” level=info msg=“starting join-server api” bind=“0.0.0.0:8003” ca_cert= tls_cert= tls_key=
may 24 14:03:51 lab04 lora-app-server[6072]: time=“2018-05-24T14:03:51+02: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-se
may 24 14:03:51 lab04 lora-app-server[6072]: time=“2018-05-24T14:03:51+02:00” level=info msg=“registering rest api handler and documentation endpoint” path=/api
may 24 14:03:54 lab04 lora-app-server[6072]: time=“2018-05-24T14:03:54+02:00” level=warning msg=“creating insecure network-server client” server=“localhost:8000”
may 24 14:03:54 lab04 lora-app-server[6072]: time=“2018-05-24T14:03:54+02:00” level=info msg=“finished client streaming call” grpc.code=OK grpc.method=StreamFrameLogsForDevice grpc.service=ns.NetworkServer grpc.
I have tried to send the JSON “object” example you proposed on the documentation page but it still not working. Here are two payloads from Mosquitto topic:
application/1/node/0000000000000000/rx {“applicationID”:“1”,“applicationName”:“AplicacionOTAA”,“deviceName”:“DEUI00”,“devEUI”:“0000000000000000”,“rxInfo”:[{“mac”:“00800000a0000d74”,“rssi”:-115,“loRaSNR”:1,“name”:“garteway mac”,“latitude”:0,“longitude”:0,“altitude”:0}],“txInfo”:{“frequency”:868100000,“dataRate”:{“modulation”:“LORA”,“bandwidth”:125,“spreadFactor”:12},“adr”:false,“codeRate”:“4/5”},“fCnt”:69,“fPort”:1,“data”:“Dv8ADwgGLcsFDbMLAdI=”,“object”:{“temperature_sensor”:{“1”:23.5}}}
application/1/node/0000000000000000/rx
{“applicationID”:“1”,“applicationName”:“AplicacionOTAA”,“deviceName”:“DEUI00”,“devEUI”:“0000000000000000”,“rxInfo”:[{“mac”:“00800000a0000d74”,“rssi”:-117,“loRaSNR”:2,“name”:“garteway mac”,“latitude”:0,“longitude”:0,“altitude”:0}],“txInfo”:{“frequency”:868100000,“dataRate”:{“modulation”:“LORA”,“bandwidth”:125,“spreadFactor”:12},“adr”:false,“codeRate”:“4/5”},“fCnt”:70,“fPort”:1,“data”:“Dv8ADwgGLdcFCnoLAdI=”,“object”:{“temperature_sensor”:{“1”:23.5}}}
Thank you very much in advance.
Regards.