TheThingsNetwork / lorawan-stack

The Things Stack, an Open Source LoRaWAN Network Server
https://www.thethingsindustries.com/stack/
Apache License 2.0
996 stars 309 forks source link

Documentation upgrading migrate dr-db fails #4047

Closed jpmeijers closed 3 years ago

jpmeijers commented 3 years ago

Summary

I follow the steps on https://www.thethingsindustries.com/docs/getting-started/upgrading/ to upgrade my TTS instance. This includes running the three migrations. The third migration command fails with the error below.

$ docker-compose run --rm stack is-db migrate
$ docker-compose run --rm stack ns-db migrate
$ docker-compose run --rm stack dr-db migrate
root@tts-test:~/tts# docker-compose run --rm stack dr-db migrate
Creating tts_stack_run ... done
Device Repository commands

Usage:
  ttn-lw-stack dr-db [command]

Available Commands:
  init        Fetch Device Repository files and generate index

Flags:
  -h, --help   help for dr-db

Global Flags:
      --as.device-kek-label string                                        Label of KEK used to encrypt device keys at rest
      --as.distribution.timeout duration                                  Wait timeout of an empty subscription set (default 1m0s)
      --as.fetcher.cache.enable                                           Cache fetched end devices (default true)
      --as.fetcher.cache.size int                                         Cache size
      --as.fetcher.cache.ttl duration                                     TTL for cached end devices (default 5m0s)
      --as.fetcher.circuit-breaker.enable                                 Enable circuit breaker behavior on burst errors (default true)
      --as.fetcher.circuit-breaker.threshold int                          Number of failed fetching attempts after which the circuit breaker opens (default 10)
      --as.fetcher.circuit-breaker.timeout duration                       Timeout after which the circuit breaker closes (default 15m0s)
      --as.fetcher.timeout duration                                       Timeout of the end device retrival operation (default 5s)
      --as.interop.blob.bucket string                                     Bucket to use
      --as.interop.blob.path string                                       Path to use
      --as.interop.config-source string                                   Source of the interoperability client configuration (directory, url, blob)
      --as.interop.directory string                                       OS filesystem directory, which contains interoperability client configuration
      --as.interop.id string                                              AS-ID used for interoperability
      --as.interop.url string                                             URL, which contains interoperability client configuration
      --as.link-mode string                                               Deprecated - mode to link applications to their Network Server (all, explicit)
      --as.mqtt.listen string                                             Address for the MQTT frontend to listen on (default ":1883")
      --as.mqtt.listen-tls string                                         Address for the MQTTS frontend to listen on (default ":8883")
      --as.mqtt.public-address string                                     Public address of the MQTT frontend (default "localhost:1883")
      --as.mqtt.public-tls-address string                                 Public address of the MQTTs frontend (default "localhost:8883")
      --as.packages.workers int                                           Number of workers per application package (default 16)
      --as.pubsub.providers strings                                       Controls the status of each provider (enabled, disabled, warning) (default [mqtt=enabled,nats=enabled])
      --as.webhooks.downlink.public-address string                        Public address of the HTTP webhooks frontend (default "http://localhost:1885/api/v3")
      --as.webhooks.downlink.public-tls-address string                    Public address of the HTTPS webhooks frontend
      --as.webhooks.queue-size int                                        Number of requests to queue (default 16)
      --as.webhooks.target string                                         Target of the integration (direct) (default "direct")
      --as.webhooks.templates.directory string                            Retrieve the webhook templates from the filesystem (default "/srv/ttn-lorawan/lorawan-webhook-templates")
      --as.webhooks.templates.logo-base-url string                        The base URL for the logo storage
      --as.webhooks.templates.url string                                  Retrieve the webhook templates from a web server (default "https://raw.githubusercontent.com/TheThingsNetwork/lorawan-webhook-templates/master")
      --as.webhooks.timeout duration                                      Wait timeout of the target to process the request (default 5s)
      --as.webhooks.workers int                                           Number of workers to process requests (default 16)
      --blob.aws.access-key-id string                                     Access key ID
      --blob.aws.endpoint string                                          S3 endpoint
      --blob.aws.region string                                            S3 region
      --blob.aws.secret-access-key string                                 Secret access key
      --blob.aws.session-token string                                     Session token
      --blob.gcp.credentials string                                       JSON data of the GCP credentials, if not using JSON file
      --blob.gcp.credentials-file string                                  Path to the GCP credentials JSON file
      --blob.local.directory string                                       OS filesystem directory, which contains buckets (default "./public/blob")
      --blob.provider string                                              Blob store provider (local, aws, gcp) (default "local")
      --cache.redis.address string                                        Address of the Redis server
      --cache.redis.database int                                          Redis database to use
      --cache.redis.failover.addresses strings                            Redis Sentinel server addresses
      --cache.redis.failover.enable                                       Enable failover using Redis Sentinel
      --cache.redis.failover.master-name string                           Redis Sentinel master name
      --cache.redis.namespace strings                                     Namespace for Redis keys
      --cache.redis.password string                                       Password of the Redis server
      --cache.redis.pool-size int                                         The maximum number of database connections
      --cache.redis.tls.insecure-skip-verify                              Skip verification of certificate chains (insecure)
      --cache.redis.tls.require                                           Require TLS
      --cache.redis.tls.root-ca string                                    Location of TLS root CA certificate (optional)
      --cache.service string                                              Service used for caching (redis)
      --cluster.address string                                            Address to use for cluster communication
      --cluster.application-server string                                 Address for the Application Server
      --cluster.crypto-server string                                      Address for the Crypto Server
      --cluster.device-repository string                                  Address for the Device Repository
      --cluster.gateway-server string                                     Address for the Gateway Server
      --cluster.identity-server string                                    Address for the Identity Server
      --cluster.join strings                                              Addresses of cluster peers to join
      --cluster.join-server string                                        Address for the Join Server
      --cluster.keys strings                                              Keys used to communicate between components of the cluster. The first one will be used by the cluster to identify itself
      --cluster.name string                                               Name of the current cluster peer (default: $HOSTNAME)
      --cluster.network-server string                                     Address for the Network Server
      --cluster.packet-broker-agent string                                Address of the Packet Broker Agent
      --cluster.tls                                                       Do cluster gRPC over TLS
      --cluster.tls-server-name string                                    Server name to use in TLS handshake to cluster peers
  -c, --config strings                                                    Location of the config files (default [.ttn-lw-stack.yml,/home/thethings/.ttn-lw-stack.yml,/home/thethings/.config/.ttn-lw-stack.yml])
      --console.mount string                                              Path on the server where the Console will be served
      --console.oauth.authorize-url string                                The OAuth Authorize URL (default "http://localhost:1885/oauth/authorize")
      --console.oauth.client-id string                                    The OAuth client ID (default "console")
      --console.oauth.client-secret string                                The OAuth client secret (default "console")
      --console.oauth.logout-url string                                   The OAuth Logout URL (default "http://localhost:1885/oauth/logout")
      --console.oauth.token-url string                                    The OAuth Token Exchange URL (default "http://localhost:1885/oauth/token")
      --console.ui.account-url string                                     The URL that points to the root of the Account (default "/oauth")
      --console.ui.as.base-url string                                     Base URL to the HTTP API (default "http://localhost:1885/api/v3")
      --console.ui.as.enabled                                             Enable this API (default true)
      --console.ui.assets-base-url string                                 The base URL to the page assets (default "/assets")
      --console.ui.branding-base-url string                               The base URL to the branding assets
      --console.ui.canonical-url string                                   The page canonical URL (default "http://localhost:1885/console")
      --console.ui.css-file strings                                       The names of the CSS files (default [console.css])
      --console.ui.descriptions string                                    The page description
      --console.ui.documentation-base-url string                          The base URL for generating documentation links (default "https://thethingsstack.io")
      --console.ui.edtc.base-url string                                   Base URL to the HTTP API (default "http://localhost:1885/api/v3")
      --console.ui.edtc.enabled                                           Enable this API (default true)
      --console.ui.gcs.base-url string                                    Base URL to the HTTP API (default "http://localhost:1885/api/v3")
      --console.ui.gcs.enabled                                            Enable this API (default true)
      --console.ui.gs.base-url string                                     Base URL to the HTTP API (default "http://localhost:1885/api/v3")
      --console.ui.gs.enabled                                             Enable this API (default true)
      --console.ui.icon-prefix string                                     The prefix to put before the page icons (favicon.ico, touch-icon.png, og-image.png) (default "console-")
      --console.ui.is.base-url string                                     Base URL to the HTTP API (default "http://localhost:1885/api/v3")
      --console.ui.is.enabled                                             Enable this API (default true)
      --console.ui.js-file strings                                        The names of the JS files (default [console.js])
      --console.ui.js.base-url string                                     Base URL to the HTTP API (default "http://localhost:1885/api/v3")
      --console.ui.js.enabled                                             Enable this API (default true)
      --console.ui.language string                                        The page language (default "en")
      --console.ui.ns.base-url string                                     Base URL to the HTTP API (default "http://localhost:1885/api/v3")
      --console.ui.ns.enabled                                             Enable this API (default true)
      --console.ui.qrg.base-url string                                    Base URL to the HTTP API (default "http://localhost:1885/api/v3")
      --console.ui.qrg.enabled                                            Enable this API (default true)
      --console.ui.sentry-dsn string                                      The Sentry DSN
      --console.ui.site-name string                                       The site name (default "The Things Stack for LoRaWAN")
      --console.ui.sub-title string                                       The page sub-title (default "Management platform for The Things Stack for LoRaWAN")
      --console.ui.support-link string                                    The URI that the support button will point to
      --console.ui.theme-color string                                     The page theme color
      --console.ui.title string                                           The page title (default "Console")
      --dr.assets-base-url string                                         The base URL for Device Repository assets (default "https://raw.githubusercontent.com/TheThingsNetwork/lorawan-devices/master")
      --dr.directory string                                               OS filesystem directory, which contains the Device Repository (default "data/lorawan-devices")
      --dr.source string                                                  Device Repository Source (directory) (default "directory")
      --dr.store.bleve.search-paths strings                               Search paths for the Device Repository index files (default [lorawan-devices-index,/srv/ttn-lorawan/lorawan-devices-index])
      --dtc.enabled strings                                               Enabled converters
      --events.backend string                                             Backend to use for events (internal, redis, cloud) (default "internal")
      --events.cloud.publish-url string                                   URL for the topic to send events
      --events.cloud.subscribe-url string                                 URL for the subscription to receiving events
      --events.redis.address string                                       Address of the Redis server
      --events.redis.database int                                         Redis database to use
      --events.redis.failover.addresses strings                           Redis Sentinel server addresses
      --events.redis.failover.enable                                      Enable failover using Redis Sentinel
      --events.redis.failover.master-name string                          Redis Sentinel master name
      --events.redis.namespace strings                                    Namespace for Redis keys
      --events.redis.password string                                      Password of the Redis server
      --events.redis.pool-size int                                        The maximum number of database connections
      --events.redis.tls.insecure-skip-verify                             Skip verification of certificate chains (insecure)
      --events.redis.tls.require                                          Require TLS
      --events.redis.tls.root-ca string                                   Location of TLS root CA certificate (optional)
      --frequency-plans.blob.bucket string                                Bucket to use
      --frequency-plans.blob.path string                                  Path to use
      --frequency-plans.config-source string                              Source of the frequency plans (static, directory, url, blob)
      --frequency-plans.directory string                                  OS filesystem directory, which contains frequency plans (default "/srv/ttn-lorawan/lorawan-frequency-plans")
      --frequency-plans.url string                                        URL, which contains frequency plans (default "https://raw.githubusercontent.com/TheThingsNetwork/lorawan-frequency-plans/master")
      --gcs.basic-station.allow-cups-uri-update                           Allow CUPS URI updates
      --gcs.basic-station.default.lns-uri string                          The default LNS URI that the gateways should use (default "wss://localhost:8887")
      --gcs.basic-station.owner-for-unknown.account-type string           Type of account to register unknown gateways to (user|organization)
      --gcs.basic-station.owner-for-unknown.api-key string                API Key to use for unknown gateway registration
      --gcs.basic-station.owner-for-unknown.id string                     ID of the account to register unknown gateways to
      --gcs.basic-station.require-explicit-enable                         Require gateways to explicitly enable CUPS. This option is ineffective
      --gcs.require-auth                                                  Require authentication for the HTTP endpoints. (default true)
      --gcs.the-things-gateway.default.firmware-url string                The default URL to the firmware storage (default "https://thethingsproducts.blob.core.windows.net/the-things-gateway/v1")
      --gcs.the-things-gateway.default.mqtt-server string                 The default MQTT server that the gateways should use (default "mqtts://localhost:8881")
      --gcs.the-things-gateway.default.update-channel string              The default update channel that the gateways should use (default "stable")
      --grpc.allow-insecure-for-credentials                               Allow transmission of credentials over insecure transport
      --grpc.listen string                                                Address for the TCP gRPC server to listen on (default ":1884")
      --grpc.listen-tls string                                            Address for the TLS gRPC server to listen on (default ":8884")
      --grpc.log-ignore-methods strings                                   List of paths for which successful requests will not be logged
      --grpc.trusted-proxies strings                                      CIDRs of trusted reverse proxies (default [127.0.0.0/8,10.0.0.0/8,100.64.0.0/10,172.16.0.0/12,192.168.0.0/16])
      --gs.basic-station.allow-unauthenticated                            Allow unauthenticated connections
      --gs.basic-station.fallback-frequency-plan-id string                Fallback frequency plan ID for non-registered gateways
      --gs.basic-station.listen string                                    Address for the Basic Station frontend to listen on (default ":1887")
      --gs.basic-station.listen-tls string                                Address for the Basic Station frontend to listen on (with TLS) (default ":8887")
      --gs.basic-station.max-valid-round-trip-delay duration              Maximum valid round trip delay to qualify for RTT calculations (default 10s)
      --gs.basic-station.use-traffic-tls-address                          Use WSS for the traffic address regardless of the TLS setting
      --gs.basic-station.ws-ping-interval duration                        Interval to send WS ping messages (default 30s)
      --gs.forward strings                                                Forward the DevAddr prefixes to the specified hosts (default [=00000000/0])
      --gs.mqtt-v2.listen string                                          Address for the MQTT frontend to listen on (default ":1881")
      --gs.mqtt-v2.listen-tls string                                      Address for the MQTTS frontend to listen on (default ":8881")
      --gs.mqtt-v2.public-address string                                  Public address of the MQTT frontend (default "localhost:1881")
      --gs.mqtt-v2.public-tls-address string                              Public address of the MQTTs frontend (default "localhost:8881")
      --gs.mqtt.listen string                                             Address for the MQTT frontend to listen on (default ":1882")
      --gs.mqtt.listen-tls string                                         Address for the MQTTS frontend to listen on (default ":8882")
      --gs.mqtt.public-address string                                     Public address of the MQTT frontend (default "localhost:1882")
      --gs.mqtt.public-tls-address string                                 Public address of the MQTTs frontend (default "localhost:8882")
      --gs.require-registered-gateways                                    Require the gateways to be registered in the Identity Server
      --gs.udp.addr-change-block duration                                 Time to block traffic when a gateway's address changes
      --gs.udp.connection-error-expires duration                          Time after which a connection error of a gateway expires (default 5m0s)
      --gs.udp.connection-expires duration                                Time after which a connection of a gateway expires (default 1m0s)
      --gs.udp.downlink-path-expires duration                             Time after which a downlink path to a gateway expires (default 15s)
      --gs.udp.listeners strings                                          Listen addresses with (optional) fallback frequency plan ID for non-registered gateways (default [:1700=])
      --gs.udp.packet-buffer int                                          Buffer size of unhandled packets (default 50)
      --gs.udp.packet-handlers int                                        Number of concurrent packet handlers (default 16)
      --gs.udp.rate-limiting.enable                                       Enable rate limiting for gateways (default true)
      --gs.udp.rate-limiting.messages int                                 Number of past messages to check timestamp for (default 10)
      --gs.udp.rate-limiting.threshold duration                           Filter packet if timestamp is not newer than the older timestamps of the previous messages by this threshold (default 10ms)
      --gs.udp.schedule-late-time duration                                Time in advance to send downlink to the gateway when scheduling late (default 800ms)
      --gs.update-connection-stats-debounce-time duration                 Time before repeated refresh of the gateway connection stats (default 3s)
      --gs.update-gateway-location-debounce-time duration                 Debounce time for gateway location updates from status messages (default 1h0m0s)
      --http.cookie.block-key string                                      Key for cookie contents encryption (16, 24 or 32 bytes)
      --http.cookie.hash-key string                                       Key for cookie contents verification (32 or 64 bytes)
      --http.health.enable                                                Enable health check endpoint on HTTP server (default true)
      --http.health.password string                                       Password to protect health endpoint (username is health)
      --http.listen string                                                Address for the HTTP server to listen on (default ":1885")
      --http.listen-tls string                                            Address for the HTTPS server to listen on (default ":8885")
      --http.log-ignore-paths strings                                     List of paths for which successful requests will not be logged
      --http.metrics.enable                                               Enable metrics endpoint on HTTP server (default true)
      --http.metrics.password string                                      Password to protect metrics endpoint (username is metrics)
      --http.pprof.enable                                                 Enable pprof endpoint on HTTP server (default true)
      --http.pprof.password string                                        Password to protect pprof endpoint (username is pprof)
      --http.redirect-to-host string                                      Redirect all requests to one host
      --http.redirect-to-tls                                              Redirect HTTP requests to HTTPS
      --http.static.mount string                                          Path on the server where static assets will be served (default "/assets")
      --http.static.search-path strings                                   List of paths for finding the directory to serve static assets from (default [public,/srv/ttn-lorawan/public])
      --http.trusted-proxies strings                                      CIDRs of trusted reverse proxies (default [127.0.0.0/8,10.0.0.0/8,100.64.0.0/10,172.16.0.0/12,192.168.0.0/16])
      --interop.listen-tls string                                         Address for the interop server to listen on (default ":8886")
      --interop.sender-client-ca.blob.bucket string                       Bucket to use
      --interop.sender-client-ca.blob.path string                         Path to use
      --interop.sender-client-ca.directory string                         OS filesystem directory, which contains sender client CA configuration
      --interop.sender-client-ca.source string                            Source of the sender client CA configuration (static, directory, url, blob)
      --interop.sender-client-ca.url string                               URL, which contains sender client CA configuration
      --is.admin-rights.all                                               Grant all rights to admins, including _KEYS and _ALL
      --is.auth-cache.membership-ttl duration                             TTL of membership caches (default 10m0s)
      --is.database-uri string                                            Database connection URI (default "postgresql://root@localhost:26257/ttn_lorawan_dev?sslmode=disable")
      --is.delete.restore duration                                        How long after soft-deletion an entity can be restored (default 24h0m0s)
      --is.email.network.console-url string                               The URL of the Console (default "http://localhost:1885/console")
      --is.email.network.identity-server-url string                       The URL of the Identity Server (default "http://localhost:1885/oauth")
      --is.email.network.name string                                      The name of the network (default "The Things Stack for LoRaWAN")
      --is.email.provider string                                          Email provider to use
      --is.email.sender-address string                                    The address of the sender
      --is.email.sender-name string                                       The name of the sender
      --is.email.sendgrid.api-key string                                  The SendGrid API key to use
      --is.email.sendgrid.sandbox                                         Use SendGrid sandbox mode for testing
      --is.email.smtp.address string                                      SMTP server address
      --is.email.smtp.connections int                                     Maximum number of connections to the SMTP server
      --is.email.smtp.password string                                     Password to authenticate with
      --is.email.smtp.username string                                     Username to authenticate with
      --is.email.templates.blob.bucket string                             Bucket to use
      --is.email.templates.blob.path string                               Path to use
      --is.email.templates.directory string                               Retrieve the email templates from the filesystem
      --is.email.templates.includes strings                               The email templates that will be preloaded on startup
      --is.email.templates.source string                                  Source of the email template files (static, directory, url, blob)
      --is.email.templates.url string                                     Retrieve the email templates from a web server
      --is.end-device-picture.bucket string                               Bucket used for storing end device pictures (default "end_device_pictures")
      --is.end-device-picture.bucket-url string                           Base URL for public bucket access (default "/assets/blob/end_device_pictures")
      --is.end-device-picture.disable-upload                              Disable uploading end device pictures
      --is.gateways.encryption-key-id string                              ID of the key used to encrypt gateway secrets at rest
      --is.login-tokens.enabled                                           enable users requesting login tokens
      --is.login-tokens.token-ttl duration                                TTL of login tokens (default 1h0m0s)
      --is.oauth.mount string                                             Path on the server where the Account application and OAuth services will be served (default "/oauth")
      --is.oauth.ui.assets-base-url string                                The base URL to the page assets (default "/assets")
      --is.oauth.ui.branding-base-url string                              The base URL to the branding assets
      --is.oauth.ui.canonical-url string                                  The page canonical URL (default "http://localhost:1885/oauth")
      --is.oauth.ui.console-url string                                    The URL that points to the root of the Console (default "/console")
      --is.oauth.ui.css-file strings                                      The names of the CSS files (default [account.css])
      --is.oauth.ui.descriptions string                                   The page description
      --is.oauth.ui.icon-prefix string                                    The prefix to put before the page icons (favicon.ico, touch-icon.png, og-image.png) (default "oauth-")
      --is.oauth.ui.is.base-url string                                    Base URL to the HTTP API (default "http://localhost:1885/api/v3")
      --is.oauth.ui.is.enabled                                            Enable this API (default true)
      --is.oauth.ui.js-file strings                                       The names of the JS files (default [account.js])
      --is.oauth.ui.language string                                       The page language (default "en")
      --is.oauth.ui.sentry-dsn string                                     The Sentry DSN
      --is.oauth.ui.site-name string                                      The site name (default "The Things Stack for LoRaWAN")
      --is.oauth.ui.sub-title string                                      The page sub-title
      --is.oauth.ui.theme-color string                                    The page theme color
      --is.oauth.ui.title string                                          The page title (default "Account")
      --is.profile-picture.bucket string                                  Bucket used for storing profile pictures (default "profile_pictures")
      --is.profile-picture.bucket-url string                              Base URL for public bucket access (default "/assets/blob/profile_pictures")
      --is.profile-picture.disable-upload                                 Disable uploading profile pictures
      --is.profile-picture.use-gravatar                                   Use Gravatar fallback for users without profile picture (default true)
      --is.user-registration.admin-approval.required                      Require admin approval for new users
      --is.user-registration.contact-info-validation.required             Require contact info validation for new users
      --is.user-registration.contact-info-validation.token-ttl duration   TTL of contact info validation tokens (default 48h0m0s)
      --is.user-registration.enabled                                      Enable user registration (default true)
      --is.user-registration.invitation.required                          Require invitations for new users
      --is.user-registration.invitation.token-ttl duration                TTL of user invitation tokens (default 168h0m0s)
      --is.user-registration.password-requirements.max-length int         Maximum password length (default 1000)
      --is.user-registration.password-requirements.min-digits int         Minimum number of digits (default 1)
      --is.user-registration.password-requirements.min-length int         Minimum password length (default 8)
      --is.user-registration.password-requirements.min-special int        Minimum number of special characters
      --is.user-registration.password-requirements.min-uppercase int      Minimum number of uppercase letters (default 1)
      --is.user-rights.create-applications                                Allow non-admin users to create applications in their user account (default true)
      --is.user-rights.create-clients                                     Allow non-admin users to create OAuth clients in their user account (default true)
      --is.user-rights.create-gateways                                    Allow non-admin users to create gateways in their user account (default true)
      --is.user-rights.create-organizations                               Allow non-admin users to create organizations in their user account (default true)
      --js.device-kek-label string                                        Label of KEK used to encrypt device keys at rest
      --js.join-eui-prefix strings                                        JoinEUI prefixes handled by this JS (default [0000000000000000/0])
      --key-vault.cache.size int                                          Cache size. Caching is disabled if size is 0
      --key-vault.cache.ttl duration                                      Cache elements time to live. No expiration mechanism is used if TTL is 0
      --key-vault.provider string                                         Provider (static) (default "static")
      --key-vault.static strings                                          
      --log.level string                                                  The minimum level log messages must have to be shown (default "info")
      --ns.application-uplink-queue.buffer-size uint                       (default 1000)
      --ns.cooldown-window duration                                       Time window starting right after deduplication window, during which, duplicate messages are discarded (default 1s)
      --ns.deduplication-window duration                                  Time window during which, duplicate messages are collected for metadata (default 200ms)
      --ns.default-mac-settings.adr-margin string                         The default margin Network Server should add in ADR requests if not configured in device's MAC settings (default "15")
      --ns.default-mac-settings.class-b-timeout string                    Deadline for a device in class B mode to respond to requests from the Network Server if not configured in device's MAC settings (default "10m0s")
      --ns.default-mac-settings.class-c-timeout string                    Deadline for a device in class C mode to respond to requests from the Network Server if not configured in device's MAC settings (default "5m0s")
      --ns.default-mac-settings.desired-adr-ack-delay-exponent string     Desired ADR_ACK_DELAY value Network Server should use if not configured in device's MAC settings
      --ns.default-mac-settings.desired-adr-ack-limit-exponent string     Desired ADR_ACK_LIMIT value Network Server should use if not configured in device's MAC settings
      --ns.default-mac-settings.desired-max-duty-cycle string             Desired MaxDutyCycle value Network Server should use if not configured in device's MAC settings
      --ns.default-mac-settings.desired-rx1-delay string                  Desired Rx1Delay value Network Server should use if not configured in device's MAC settings (default "5")
      --ns.default-mac-settings.status-count-periodicity string           Number of uplink messages after which a DevStatusReq MACCommand shall be sent by Network Server if not configured in device's MAC settings (default "200")
      --ns.default-mac-settings.status-time-periodicity string            The interval after which a DevStatusReq MACCommand shall be sent by Network Server if not configured in device's MAC settings (default "24h0m0s")
      --ns.dev-addr-prefixes strings                                      Device address prefixes of this Network Server
      --ns.device-kek-label string                                        Label of KEK used to encrypt device keys at rest
      --ns.downlink-priorities.join-accept string                         Priority for join-accept messages (lowest, low, below_normal, normal, above_normal, high, highest) (default "highest")
      --ns.downlink-priorities.mac-commands string                        Priority for messages carrying MAC commands (lowest, low, below_normal, normal, above_normal, high, highest) (default "highest")
      --ns.downlink-priorities.max-application-downlink string            Maximum priority for application downlink messages (lowest, low, below_normal, normal, above_normal, high, highest) (default "high")
      --ns.downlink-queue-capacity int                                    Maximum downlink queue size per-session (default 10000)
      --ns.interop.blob.bucket string                                     Bucket to use
      --ns.interop.blob.path string                                       Path to use
      --ns.interop.config-source string                                   Source of the interoperability client configuration (directory, url, blob)
      --ns.interop.directory string                                       OS filesystem directory, which contains interoperability client configuration
      --ns.interop.url string                                             URL, which contains interoperability client configuration
      --ns.net-id string                                                  NetID of this Network Server (default "000000")
      --output-format string                                              Output format (default "json")
      --pba.authentication-mode string                                    Authentication mode (tls, oauth2) (default "oauth2")
      --pba.cluster-id string                                             Cluster ID uniquely identifying the Forwarder in the NetID and Tenant ID
      --pba.control-plane-address string                                  Address of Packet Broker Control Plane (default "cp.packetbroker.org:443")
      --pba.data-plane-address string                                     Address of the Packet Broker Data Plane
      --pba.forwarder.enable                                              Enable Forwarder role
      --pba.forwarder.hash-gateway-id                                     Hash the gateway ID (if forwarded in the metadata)
      --pba.forwarder.include-gateway-eui                                 Include the gateway EUI in forwarded metadata (default true)
      --pba.forwarder.include-gateway-id                                  Include the gateway ID in forwarded metadata (default true)
      --pba.forwarder.token-key string                                    AES 128 or 256-bit key for encrypting tokens
      --pba.forwarder.worker-pool.limit int                               Limit of active workers (default 1024)
      --pba.home-network-cluster-id string                                Home Network Cluster ID, if different from the Cluster ID
      --pba.home-network.dev-addr-prefixes strings                        DevAddr prefixes to subscribe to
      --pba.home-network.enable                                           Enable Home Network role
      --pba.home-network.worker-pool.limit int                            Limit of active workers (default 4096)
      --pba.iam-address string                                            Address of Packet Broker IAM (default "iam.packetbroker.org:443")
      --pba.insecure                                                      Connect without using TLS
      --pba.net-id string                                                 LoRa Alliance NetID (default "000000")
      --pba.oauth2.client-id string                                       API key ID used as client ID
      --pba.oauth2.client-secret string                                   Secret API key value used as client secret
      --pba.oauth2.token-url string                                       Token URL (default "https://iam.packetbroker.org/token")
      --pba.registration.administrative-contact.email string              Email address
      --pba.registration.listed                                           List the Home Network in the Packet Broker catalog (default true)
      --pba.registration.name string                                      Friendly name to register with Packet Broker
      --pba.registration.technical-contact.email string                   Email address
      --pba.tenant-id string                                              Tenant ID within the NetID
      --pba.tls.certificate string                                        Location of TLS certificate
      --pba.tls.key string                                                Location of TLS private key
      --pba.tls.key-vault.id string                                       ID of the certificate
      --pba.tls.source string                                             Source of the TLS certificate (file, key-vault)
      --rate-limiting.memory.max-size uint                                Maximum store size for the rate limiter
      --redis.address string                                              Address of the Redis server (default "localhost:6379")
      --redis.database int                                                Redis database to use
      --redis.failover.addresses strings                                  Redis Sentinel server addresses
      --redis.failover.enable                                             Enable failover using Redis Sentinel
      --redis.failover.master-name string                                 Redis Sentinel master name
      --redis.namespace strings                                           Namespace for Redis keys (default [ttn,v3])
      --redis.password string                                             Password of the Redis server
      --redis.pool-size int                                               The maximum number of database connections
      --redis.tls.insecure-skip-verify                                    Skip verification of certificate chains (insecure)
      --redis.tls.require                                                 Require TLS
      --redis.tls.root-ca string                                          Location of TLS root CA certificate (optional)
      --rights.ttl duration                                               Validity of Identity Server responses (default 2m0s)
      --sentry.dsn string                                                 Sentry Data Source Name
      --sentry.environment string                                         Environment to report to Sentry
      --tls.acme.default-host string                                      Default host to assume for clients without SNI
      --tls.acme.dir string                                               Location of ACME storage directory
      --tls.acme.email string                                             Email address to register with the ACME account
      --tls.acme.enable                                                   Enable automated certificate management (ACME). This setting is deprecated; set the TLS config source to acme instead
      --tls.acme.endpoint string                                          ACME endpoint (default "https://acme-v02.api.letsencrypt.org/directory")
      --tls.acme.hosts strings                                            Hosts to enable automatic certificates for
      --tls.certificate string                                            Location of TLS certificate (default "cert.pem")
      --tls.insecure-skip-verify                                          Skip verification of certificate chains (insecure)
      --tls.key string                                                    Location of TLS private key (default "key.pem")
      --tls.key-vault.id string                                           ID of the certificate
      --tls.root-ca string                                                Location of TLS root CA certificate (optional)
      --tls.source string                                                 Source of the TLS certificate (file, acme, key-vault)

Use "ttn-lw-stack dr-db [command] --help" for more information about a command.
root@tts-test:~/tts# docker-compose run --rm stack dr-db init
Creating tts_stack_run ... done
  INFO Preparing working directory              source=data/lorawan-devices working_directory=/srv/ttn-lorawan/lorawan-devices-index
lstat data/lorawan-devices: no such file or directory
ERROR: 255

Why do we need this ?

...

What is already there? What do you see now?

...

What is missing? What do you want to see?

...

How do you propose to document this?

There is either a missing step, or the documentation is wrong.

Can you do this yourself and submit a Pull Request?

...

neoaggelos commented 3 years ago

Hi @jpmeijers. Indeed, this was an oversight in the documentation, there is no need to run any dr-db commands.