Docker installation - Login failed

All

I am new to the The Thing Stack and wanting to learn more about LoRa/LoRaWAN.

My goal is to deploy TTS locally by using the docker/docker compose option. I will be using it with the Dragino LPS8 and with (for starter) an Arduino Mega along with the Dragino LoRa shield + AM2302.

A little about the environment…….

192.168.1.1 → Firewall appliance with DHCP & DNS

192.168.1.34 → HP T630 running Centos 8 with Docker and Docker compose. Hostname: tts.mydomain.net

These are the steps I followed to install TTS

  1. Watched the “Install The Things Stack LoRaWAN Network Server in 6 minutes using Docker”

  2. ssh’ed as root into the machine where the stack would be deployed (i.e. 192.168.1.34)

  3. Created a directory structure which will host the stack: i.e.
    a. /root/docker_compose/the-things-stack
    b. /root/docker_compose/the-things-stack/configuration
    c. /root/docker_compose/the-things-stack/configuration/stack

  4. Saved docker-compose.yml (the open source version) inside 3a

  5. Saved ttn-lw-stack-docker.yml (the open source version) inside 3c

  6. Left the docker-compose.yml file as-is

  7. Edited the ttn-lw-stack-docker.yml file
    a. Replaced all instances of “thethings.example.com” with “tts.mydomain.net
    b. Entered value for http.cookie.block-key by using the openssl rand -hex 32 command
    c. Entered value for http.cookie.hash-key by using the openssl rand -hex 64 command
    d. Changed the default value of ‘console’ for console.oauth.client-secret with my own.

  8. Made no additional changes in support of certificates as I plan on accessing the stack (at least for now) from http and NOT https

  9. Issued the following commands:
    a. docker-compose pull
    b. docker-compose run --rm stack is-db init
    c. docker-compose run --rm stack is-db create-admin-user --id admin --email admin@mydomain.net This step then prompted me to create a password for this user.
    d. docker-compose run --rm stack is-db create-oauth-client --id cli --name “Command Line Interface” --owner admin --no-secret --redirect-uri “local-callback” --redirect-uri “code”
    e. CONSOLE_SECRET=“your-console-secret” (same password created on step 7d
    f. SERVER_ADDRESS=“192.168.1.34”
    g. docker-compose run --rm stack is-db create-oauth-client --id console --name “Console” --owner admin --secret “${CONSOLE_SECRET}” --redirect-uri “${SERVER_ADDRESS}/console/oauth/callback” --redirect-uri “/console/oauth/callback” --logout-redirect-uri “${SERVER_ADDRESS}/console” --logout-redirect-uri “/console”

  10. started the stack by issuing docker-compose up -d

Using Portainer.io (which I had deployed prior to TTS) I can see that all 3 containers are up and running, i.e. the-things-stack_stack_1, the-things-stack_cockroach_1 and the-things-stack_redis_1

From my desktop (on the same 192.168.1.x network) I went to http://192.168.1.34/
I was presented a page asking for User ID (i.e. admin created on step 9c) and Password. I entered the same password I created on step 9c.

Logged in and…… failed with the following error message:

Error ID: error:pkg/web/oauthclient:exchange
Correlation ID: 003b79f7feb04be186d41fd0db9a1fd1


Technical details: {
  "code": 7,
  "message": "error:pkg/web/oauthclient:exchange (token exchange refused)",
  "details": [
    {
      "@type": "type.googleapis.com/ttn.lorawan.v3.ErrorDetails",
      "namespace": "pkg/web/oauthclient",
      "name": "exchange",
      "message_format": "token exchange refused",
      "correlation_id": "003b79f7feb04be186d41fd0db9a1fd1",
      "cause": {
        "namespace": "pkg/errors",
        "name": "request",
        "message_format": "request to `{url}` failed",
        "attributes": {
          "url": "https://tts.mydomain.net/oauth/token"
        },
        "correlation_id": "385cfb6be30245abb2e78b6729358a57",
        "code": 2
      },
      "code": 7
    }
  ]
}

I am now stuck! What did I do wrong? How can I fix this installation?

Thank you
Renato

Hi, im running into the same problem as you did. Do you already got an solution?

If you found a resolution, please share your findings here. Thanks in advance.