Error context deadline exceeded


#1

Hi brocaar,
Why exactly context deadline exceeded (code: 2) error will display in web page. What is the reason for this and how to solve this.


#2

Could you post the full error string?


#3

Hi brocaar,
I am not able to see the loraserver and lora-app-server logs.
I wanted to know why context deadline exceeded (code: 2) will display in web page. (not always)


#4

On what system are you running LoRaServer and LoRaAppServer? Without the logs it is almost impossible to find out the cause of this error.


#5

Are you using docker? Just happened to me because did not take into account that docker machines are isolated (new to this) and had to use the machine IP.

If you are using docker try this to see logs

$ docker logs CONTAINER_NAME


#6

Hi,

I get the same error when I try to submit the certificates ca, tls and tls.key via the browser UI. The following error is shown in the log file.

time=“2018-03-25T16:59:35+02:00” level=error msg=“finished unary call with code Unknown” error=“rpc error: code = Unknown desc = context deadline exceeded” grpc.code=Unknown grpc.method=Update grpc.service=api.NetworkServer grpc.start_time=“2018-03-25T16:59:34+02:00” grpc.time_ms=507.354 peer.address="[::1]:39304" span.kind=server system=grpc

In get the additional warning before that:

time=“2018-03-25T17:31:51+02:00” level=info msg=“creating network-server client” server=“localhost:8000”
time=“2018-03-25T17:31:51+02:00” level=warning msg=“Failed to dial localhost:8000: connection error: desc = “transport: authentication handshake failed: tls: first record does not look like a TLS handshake”; please retry.”

but the server is running on port 8000. I am not sure how to debug the handshake. I just set the server up and I did it without the optional certificats so it should not have a handshake yet or am I wrong? I am currently trying to implement them though.


#7

I fixed my error by applying the same thing as in this issue OtherIssue and the infos from the documentation.


#8

I am getting this error attempting to add a Network-Server to a brand new LoRa Server install I spun up on a remote AWS Instance using the Ansible loraserver-setup project.
The server seemed to have installed w/out a problem - and will not allow me to create a Network-Server - so I am unable to even attempt to add anything else.

This may be similar to the issue I posted earlier today where I am unable to add a particular Gateway EUI due to the code 2 error on that setup: “Error: object already exists (code: 2)”


#9

Please check that LoRa Server is actually running and can be connected to using the hostname:port you are entering.


#10

I am having the same problem. All the services are up and running and I also just did a server reboot.


#11

These are the logs I’m seeing on the node where I’m running both lora server and lora app server via docker:

time=“2019-04-25T22:32:41Z” level=warning msg=“creating insecure network-server client” server=“localhost:8000”
time=“2019-04-25T22:32:41Z” level=warning msg=“grpc: addrConn.createTransport failed to connect to {localhost:8000 0 }. Err :connection error: desc = “transport: Error while dialing dial tcp 127.0.0.1:8000: connect: connection refused”. Reconnecting…”
time=“2019-04-25T22:32:41Z” level=error msg=“finished unary call with code Unknown” error=“rpc error: code = Unknown desc = context deadline exceeded” grpc.code=Unknown grpc.method=Create grpc.service=api.NetworkServerService grpc.start_time=“2019-04-25T22:32:41Z” grpc.time_ms=505.798 peer.address=“127.0.0.1:47472” span.kind=server system=grpc
time=“2019-04-25T22:32:49Z” level=warning msg=“creating insecure network-server client” server=“localhost:8000”
time=“2019-04-25T22:32:49Z” level=warning msg=“grpc: addrConn.createTransport failed to connect to {localhost:8000 0 }. Err :connection error: desc = “transport: Error while dialing dial tcp 127.0.0.1:8000: connect: connection refused”. Reconnecting…”
time=“2019-04-25T22:32:49Z” level=error msg=“finished unary call with code Unknown” error=“rpc error: code = Unknown desc = context deadline exceeded” grpc.code=Unknown grpc.method=Create grpc.service=api.NetworkServerService grpc.start_time=“2019-04-25T22:32:49Z” grpc.time_ms=506.175 peer.address=“127.0.0.1:47472” span.kind=server system=grpc
time=“2019-04-25T22:32:53Z” level=warning msg=“creating insecure network-server client” server=“localhost:8000”
time=“2019-04-25T22:32:53Z” level=warning msg=“grpc: addrConn.createTransport failed to connect to {localhost:8000 0 }. Err :connection error: desc = “transport: Error while dialing dial tcp 127.0.0.1:8000: connect: connection refused”. Reconnecting…”
time=“2019-04-25T22:32:54Z” level=error msg=“finished unary call with code Unknown” error=“rpc error: code = Unknown desc = context deadline exceeded” grpc.code=Unknown grpc.method=Create grpc.service=api.NetworkServerService grpc.start_time=“2019-04-25T22:32:53Z” grpc.time_ms=505.574 peer.address=“127.0.0.1:47472” span.kind=server system=grpc
time=“2019-04-25T22:32:57Z” level=warning msg=“creating insecure network-server client” server=“localhost:8000”
time=“2019-04-25T22:32:57Z” level=warning msg=“grpc: addrConn.createTransport failed to connect to {localhost:8000 0 }. Err :connection error: desc = “transport: Error while dialing dial tcp 127.0.0.1:8000: connect: connection refused”. Reconnecting…”


#12

Have you followed these instructions? https://github.com/brocaar/loraserver-docker

When adding the network-server in the LoRa App Server web-interface (see network-servers), you must enter loraserver:8000 as the network-server hostname:IP .


#13

Thanks @brocaar that fixed it!


#15

Need Help

i install using docker app running and i can access it

but i got this error context deadline exceeded (code: 2) when i create network server

how to fix it