Error context deadline exceeded

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

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

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…”

Have you followed these instructions? GitHub - chirpstack/chirpstack-docker: Setup ChirpStack using Docker Compose

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 .

1 Like

Thanks @brocaar that fixed it!

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

Ah i see, it was loraserver:8000, not localhost:8000, that’s why always failed to add :joy::joy:

Hi! Good afternoon, I installed loraserver on MV with Debian, but I can’t add Network-server. The error is appearing: context deadline exceeded (code 2). Can someone help me please?

Ja tentei usar :
Network-server name:

localhost
IP

Network-server server:

localhost:8080 ;
chirpstack-network-server:8000

Note: new user worked the addition

Since all components are installed on the same server, you must use localhost:8000, not chirpstack-network-server:8000. The latter is in case when using Docker, as each Docker container is accessible by its own hostname.

3 Likes

It worked here. Thanks!

When creating a new network and I put localhost:8000 since all on the same server, all in virtual machine, Im getting the context exceeded (code 2) error

Hi!
Same problem here, installed ChirpStack normally (without Docker) and via GUI it is throwing code 2 error.
Any thoughts? I do not need for know any certificate all info is blank.

Hello,
I installed also ChirpStack on a raspberry debian buster (without Docker). Everything work for some days and today when i click on some items (gateway or device) on the web interface i get the error:
Error context deadline exceeded (code 2)
Can someone help me?

Have you had any success with this? I too am getting this bug. I got this bug even after reverting back to an image that was working completely on a different SD card. The pi worked for about 2 weeks and now it throws this exception when trying to access Gateway-profiles, service-profiles, device-profiles, gateways or applications

Hey all,
I just had this issue on my R-Pi using a somewhat suspect 8Gb SD card.

I solve it by just employing some house-keeping…

I recommend you check the following:

  1. Is your SD card good/fake etc?

  2. verify all SD card image reading and writing sessions

  3. clean your Ubuntu (clear old cache and logs files) to gain more disk space if you need it (my Chirpstack stated running quite slow and after I freed up space its back to fast UI loading etc)

  4. make sure you have a large enough swap file setup

  5. make back-up of your SD card image regularly.

  6. Use a class 10 16 or 32Gb SD card

  7. fit a CPU reset button on your R-Pi and only ever power up and down the R-Pi pressing the reset button first, only ever insert/remove the SD card when the power is off!

  8. watch out for log files etc building up over time and reducing the memory available!

  9. check for linux malware

Hi @brocaar, I have installed using apt but not docker. And since certificates are optional, I haven’t provided any. How do I resolve this error?

I know this is a bit late, but I’ll comment in case it helps anyone else.
Try putting in the LAN or WAN IP address of the VM rather than ‘localhost’.
If this doesn’t fix it or your machine doesn’t have an IP address, this may be a problem with the either,

  1. The VM firewall
  2. The hypervisor/VM hosting application (e.g. I’ve run into an issue with docker-ce not resolving hostnames between containers if not connecting to a WAN)

Good luck!

Hi, maybe my answer to another post can help some people for this issue. Here is the link :

I have got the same problem. I copy the virtual machine to new IP address and got “context deadline exceeded (code 2)”. I solve the problem when I change the correct address in tab “Network servers”

I have installed in AWS EC2 ubuntu [no docker]and the same error rises. I tried different methods and finally given localhost:8000 and it works.