Setting up a Private Routing Environment

:rofl:

Hi,

I’m trying to setup the routing environment on an Azure virtual machine. I have followed the instructions and setup my backend on Ubuntu 16.04.

Everything seems to run without error, except when I run the “gateway-connector-bridge” command, It stays up for few minutes and then it shows following error (FATAL Not all backends started in time) and closes. My gateway connects with my backend and after few minutes lost the connection because the error.

The error has short description and I don’t know what is it related to. Any help would be appreciated.
I’m really new to this community and sorry if my question is a basic question.

Thanks,
Mehrdad

I found the issue. I believe one of the TTN components were not running on the correct IP address.

Hello,

I hope you can help me with this.

I have installed private TTN network and gone through articles in blog.

I have run 'docker-compose up -d ’ and all the services are started successfully.
Now, i have changed the server_address in gateway( which has ttn software) to hostname i.e.“192.168.0.163” and left port as it is 1700

when i try to analyze packets are transmitted from gateway on 1700 port but no respose from the server.
Found that ‘destination unreachable’ from the wireshark even though the port is opened.

I have registered the gateway using ‘ttnctl’ and configured as Router - mynetwork-router.

I would like to know where can i see the server status ?

my configurations looks like below,

ttnctl.yml:
config file: /home/xx/.ttnctl.yml
data dir: /home/xx/.ttnctl

mqtt-address: localhost:1883
   router-id: mynetwork-router

mqtt-password:
handler-id: mynetwork-handler
gateway-token: eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJ0dG4tYWNjb3VudC12MiIsInN1YiI6ImRldiIsInR5cGUiOiJnYXRld2F5IiwiaWF0IjoxNDgyNDIxMTEyfQ.obhobeREK9bOpi-YO5lZ8rpW4CkXZUSrRBRIjbFThhvAsj_IjkFmCovIVLsGlaDVEKciZmXmWnY-6ZEgUEu6H6_GG4AD6HNHXnT0o0XSPgf5_Bc6dpzuI5FCEpcELihpBMaW3vPUt29NecLo4LvZGAuOllUYKHsZi34GYnR6PFlOgi40drN_iU_8aMCxFxm6ki83QlcyHEmDAh5GAGIym0qnUDh5_L1VE_upmoR72j8_l5lSuUA2_w8CH5_Z9CrXlTKQ2XQXsQXprkhbmOKKC8rfbTjRsB_nxObu0qcTWLH9tMd4KGFkJ20mdMw38fg2Vt7eLrkU1R1kl6a65eo6LZi0JvRSsboVZFWLwI02Azkwsm903K5n1r25Wq2oiwPJpNq5vsYLdYlb-WdAPsEDnfQGLPaqxd5we8tDcHsF4C1JHTwLsKy2Sqj8WNVmLgXiFER0DNfISDgS5SYdOxd9dUf5lTlIYdJU6aG1yYLSEhq80QOcdhCqNMVu1uRIucn_BhHbKo_LCMmD7TGppaXcQ2tCL3qHQaW8GCoun_UPo4C67LIMYUMfwd_h6CaykzlZvDlLa64ZiQ3XPmMcT_gVT7MJS2jGPbtJmcLHAVa5NZLv2d6WZfutPAocl3bYrY-sQmaSwJrzakIb2D-DNsg0qBJAZcm2o021By8U4bKAAFQ
discovery-address: localhost:1900
app-id:
app-eui:
allow-insecure: false
mqtt-username:
auth-server: https://account.thethingsnetwork.org
data: /home/xx/.ttnctl
config: /home/xx/.ttnctl.yml
gateway-id: dev

local_conf.json file:

{
“gateway_conf”: {
“gateway_ID”: “0000024b080501b0”,
“serv_port_up”: 1700,
“serv_port_down”: 1700,
“server_address”: “192.168.0.163”,
“forward_crc_valid”: true,
“forward_crc_error”: false,
“forward_crc_disabled”: true,
“gps”: true
}
}

Thank you!

Hi everyone,

sorry first of all for revive this topic! I have a brief question regarding the Gateway registration when using the Private Backend guide. Can I register my LoRa Gateway, App and Devices locally on the same lab using the ttnctl console specifying private IPs? If so, I guess that using local IPs when asked for the router and handler would be enough to orchestrate all together. Otherwhise, should I use a public domain and enable port forwarding?

Thanks a lot in advance!

B.

One final remark for all those trying to get their private backend running:
Get yourself some different gateway (e.g. on Raspberry Pi basis) and use Brocaar as LoRa server. Just my humble opinion 


TTN stuff is pretty nice and easy when using the whole TTN environment as is, but it is probably not intended (or at least not favorable) to be used as a private network.

and watch this topic for news about the new (flexible) V3 backend

Hi,
i deployed the private routing environment. How to connect my sensors that already connected/migrate from the TTN cloud to TTN local host? I had tried follow the all parameter setup e.g. Dev EUI, App EUI and App key same as in TTN cloud. But the result the device still can not connect .

I found system log as follow:

stack_1     |   INFO Finished unary call                      duration=800”s error=error:pkg/networkserver:device_not_found (device not found) error_cause=error:pkg/networkserver/redis:no_uplink_match (no device matches uplink) error_correlation_id=f9e49cd0fc544fd0a88f1dd42c88ee5c error_name=device_not_found error_namespace=pkg/networkserver grpc.method=HandleUplink grpc.service=ttn.lorawan.v3.GsNs grpc_code=NotFound namespace=grpc peer.address=pipe request_id=01FGE67J1VWT79YSXF3V13QF0K
stack_1     |   INFO Finished unary call                      duration=800”s error=error:pkg/networkserver:device_not_found (device not found) error_cause=error:pkg/networkserver/redis:no_uplink_match (no device matches uplink) error_correlation_id=186540b9604a4eeea1f5c5498d5e71e2 error_name=device_not_found error_namespace=pkg/networkserver grpc.method=HandleUplink grpc.service=ttn.lorawan.v3.GsNs grpc_code=NotFound namespace=grpc peer.address=pipe request_id=01FGE67M1X3N39WHE1PJ68JY3G
stack_1     |   INFO Finished unary call                      duration=800”s error=error:pkg/networkserver:device_not_found (device not found) error_cause=error:pkg/networkserver/redis:no_uplink_match (no device matches uplink) error_correlation_id=310aa7a7c06047b18671235be5655c3a error_name=device_not_found error_namespace=pkg/networkserver grpc.method=HandleUplink grpc.service=ttn.lorawan.v3.GsNs grpc_code=NotFound namespace=grpc peer.address=pipe request_id=01FGE67SWTFHW27QCKX9Q5A35B
stack_1     |   INFO Finished unary call                      duration=800”s error=error:pkg/networkserver:device_not_found (device not found) error_cause=error:pkg/networkserver/redis:no_uplink_match (no device matches uplink) error_correlation_id=393d9d90714144f696d4c4f05bde8a46 error_name=device_not_found error_namespace=pkg/networkserver grpc.method=HandleUplink grpc.service=ttn.lorawan.v3.GsNs grpc_code=NotFound namespace=grpc peer.address=pipe request_id=01FGE67V353T5RZK7HP35220E6
stack_1     |   INFO Request handled                          duration=0s http.method=GET http.path=/healthz/live http.status=200 namespace=web peer.address=127.0.0.1:57376 request_id=01FGE67VBGN7VZRKN7FQX1BY7T
stack_1     |   INFO Finished unary call                      duration=800”s error=error:pkg/networkserver:device_not_found (device not found) error_cause=error:pkg/networkserver/redis:no_uplink_match (no device matches uplink) error_correlation_id=7b2b782f1bb54a2aa875426851d95bc0 error_name=device_not_found error_namespace=pkg/networkserver grpc.method=HandleUplink grpc.service=ttn.lorawan.v3.GsNs grpc_code=NotFound namespace=grpc peer.address=pipe request_id=01FGE67X38SQZVKDVMMDCWVZDC
stack_1     |   INFO Finished unary call                      duration=800”s error=error:pkg/networkserver:device_not_found (device not found) error_cause=error:pkg/networkserver/redis:no_uplink_match (no device matches uplink) error_correlation_id=f062f2f519494ce6b9a38a9cca613953 error_name=device_not_found error_namespace=pkg/networkserver grpc.method=HandleUplink grpc.service=ttn.lorawan.v3.GsNs grpc_code=NotFound namespace=grpc peer.address=pipe request_id=01FGE6864GK9WRKV9XFQB280W7
stack_1     |   INFO Finished unary call                      duration=800”s error=error:pkg/networkserver:device_not_found (device not found) error_cause=error:pkg/networkserver/redis:no_uplink_match (no device matches uplink) error_correlation_id=ff8f1bf5011c45939cbbe284b40f3ab4 error_name=device_not_found error_namespace=pkg/networkserver grpc.method=HandleUplink grpc.service=ttn.lorawan.v3.GsNs grpc_code=NotFound namespace=grpc peer.address=pipe request_id=01FGE6898G8QF2ZGGVQ0WQ551X

Please advice.

Thanks

Have you actually deployed a v2 stack?

Do you have your own gateway and if so, where is it pointed to?

Formatted post as per guidelines - for logs please use the </> tool on the edit toolbar.

I deployed V3.13 stack for local host.
I used my own gateway 7249 series from RAK. I pointed gateway to local host .
I successfull connect the gateway to local host, but not for the end device.
Whats wrong and what should we do?

If you deployed the v3.13 (v3.15 has many bug fixes in it) on a computer there is no way the RAK gateway can point at it if you’ve put localhost in for the gateway server address as localhost on the RAAK gateway will be itself.

Hi Nick,

Actually i deployed V3.13 stack in Raspi 4. I point at my gateway to Raspi 4 IP address.
In the Raspi4 with ttn stack V3.13 i registered the gateway and connected successfully. Unfotunattely, the end device can not connect to V3.13 in raspi. Please advice how to connect end device in V3.13 ttn local host (raspi4).

Note: the current end devices succesfull connect to V3.15 stack in ttn cloud server.

I interpreted this:

as being you pointing the gateway to localhost - which has a specific meaning.

I’m now interpreting it as being a local computer on your network, a RPi4.

As I said above, the v3.15 has a lot of fixes from v3.13 so my advice would be to run the upgrade script on your local server, the RPi, to bring it up to 3.15. I’d also suggest looking up what localhost means vs a phrase like local server or local network. I realise English may not be your first language, but this confusion took a lot of head scratching to figure out the all important space in your usage!