xoseperez / the-things-stack-docker

The Things Stack LoRaWAN Network Server (Open Source Edition) on a Raspberry Pi using docker
Apache License 2.0
17 stars 10 forks source link

Multiple Server Deployment #5

Closed chaoz014 closed 4 months ago

chaoz014 commented 5 months ago

Hello,

I'm trying to run TTS open-source server alongside a TAK server on a docker container.

I can deploy both servers but when I try to login into TTS, I get the following error:

{
  "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": "cfad5f26928047299ff56140ba7fc9de",
      "cause": {
        "namespace": "pkg/errors",
        "name": "request",
        "message_format": "request to `{url}` failed",
        "attributes": {
          "op": "Post",
          "url": "https://192.168.1.90:443/oauth/token"
        },
        "correlation_id": "1bd5b67a16094aa89bc4e45f8bd3a72a",
        "cause": {
          "namespace": "pkg/errors",
          "name": "net_timeout",
          "message_format": "operation timed out",
          "correlation_id": "7ddfcb9082a1486b986aaf30648e6c23",
          "code": 14
        },
        "code": 14
      },
      "code": 7
    }
  ]
}

I also tried creating a static IP to use with TTS but run into the same problem.

I tried changing the http and https ports (80 and 443) but then I cannot connect to the TTS GUI.

 ports:
      # If deploying on a public server:
      # - "80:1885"
      # - "443:8885"      
      - "8585:1885"
      - "8586:8885"
      - "1881:1881"

Is there a specific set of rules to run TTS and another server in the same machine?

Thanks, Juan

xoseperez commented 4 months ago

Hi @chaoz014 Please check your TTS_DOMAIN variable. Login will fail if domain does not match. See https://github.com/xoseperez/the-things-stack-docker?tab=readme-ov-file#configuring-the-ip-and-domain for info.