Questions on Setting up a TTN Backend Network Server Development Environment

Thanks for the info, @htdvisser. I’ll try to set up for v2-preview on Linux.

Is v2-preview planned to be released to production by the end of December this year?

Which Linux is preferred by the TTN development team for the TTN Network Server development environment?

And, for the OS platform for the current staging server and v2 production TTN Network Server, are you using CentOS and/or plan to use CentOS?

Yes, we’re planning to remove the preview suffix from v2 before the end of December.
We don’t have any opinion on Linux distributions; neither for development, nor for production machines, so just take what you’re most comfortable with.

According to the instructions for setting up the TTN server development environment, Redis needs to be installed and running on a development machine. (Probably on a deployment machine too, right? )

On Redis download page, it states ‘Redis 3.2 contains significant changes to the API and implementation of Redis.’

Which version of Redis do I need to install for the TTN Network Server?

@htdvisser, do you have any comment on this?

You can always assume that we run the latest versions of our dependencies. We only use a small subset of the Redis API, so an older version should work just as well, but I usually prefer the latest.

Ok. Thanks.

It gives me the info I’d like to know.

I have compiled the ttn-2-preview version from the source. I have first started my discovery server, then I try to start router, but I get this error message: FATAL Could not initialize router error=Failed to announce this component to TTN discovery: rpc error: code = 2 desc = permission denied: unable to parse token: Auth server dev not registered: permission denied: unable to parse token: Auth server dev not registered. Can you help me with that? :slight_smile:

you need to use the TTN account server, unless you have developed your own

Thanks, now it is working, but my router does not open a port for uplink stream for my gateway. Does any body know how to do that? I have tried to change the configure file for the router, but that does not work for me. :confused:

you dont need open ports … it opens a 2way session over NAT just fine.

I don’t mean a physical router, but I mean ttn router. I don’t see any udp port which is open on my server
that I can configure my gateway to send packages to that port (by default it is 1700). :slight_smile:

@sPyLoRa, read this posting for the answer.

Basically, you need to run the lora-gateway-bridge between a gateway (a current version gateway sending udp packets to the ttn-router) and the ttn-router of the v2-preview TTN Network Server.

1 Like

@hoonppark do you know how to start a ttn handler, because when I start a ttn handler then the port 1782 doesn’t opened. Therefore I can’t run ttnctl on my local server. :slight_smile:

@sPyLoRa, I haven’t tried to start a ttn router alone yet. I just ran ‘forego start’ to start all ttn server components. Once I run the command ‘$ forego start’, I can see the following ttn processes are started:

ubuntu:~$ ps -ef | grep ttn
hoon 33436 33427 0 09:49 ? 00:00:00 ttn router --config ./.env/router/dev.yml --health-port 10901
hoon 33440 33427 0 09:49 ? 00:00:00 ttn discovery --config ./.env/discovery/dev.yml --health-port 10900
hoon 33441 33427 0 09:49 ? 00:00:00 ttn networkserver --config ./.env/networkserver/dev.yml --health-port 10903
hoon 33453 33427 0 09:49 ? 00:00:00 ttn broker --config ./.env/broker/dev.yml --health-port 10902
hoon 33459 33427 0 09:49 ? 00:00:00 ttn handler --config ./.env/handler/dev.yml --health-port 10904

As you can see, ‘ttn router’ is reading the configuration info from the ‘$TTN_SOURCE_ROOT_DIR/.env/router/dev.yml’ file.

The content of the ‘dev.yml’ file shows the following:

id: dev
debug: true
discovery-address: “localhost:1900”
auth-servers:
ttn-account: “https://account.thethingsnetwork.org
ttn-account-preview: “https://preview.account.thethingsnetwork.org
ttn-account-staging: “https://preview.account.thethingsnetwork.org
tls: true
key-dir: “./.env/router/”
router:
skip-verify-gateway-token: true

Interestingly, there is no port number mentioned in this file.

Why don’t you try to start the TTN server by running the command ‘forego start’ and see if your server starts up ok. I think that’s the first step to verify if your TTN server can start up without a problem or not. Once it works, then try to start each component individually.

Looks like you’re using the v1-staging version of ttnctl while using the v2-preview version of the backend. Try updating everything to the latest version.

If I use v2-preview version of ttnctl to login then I get error like FATAL Login failed error=Code not found. :confused:

Are you using a v2-preview ttnctl you compiled? Or, are you using one you downloaded from the TTN site?

I’m using a v2-preview ttnctl that I compiled.

Zzzzz NOT funny