Skip to content

Relay container failed to start #1397

@Gnep

Description

@Gnep

Hi,

I tried to use the compose file to launch Cog. The Postgre and Cog are running fine, but Relay failed to start. The log shows:

WARN[2017-08-21T10:12:25Z] Error loading config file '/etc/relay.conf': Config file not found or is unreadable. 
INFO[2017-08-21T10:12:25Z] Using config file '/usr/local/etc/relay.conf'. 
log level: debugERRO[2017-08-21T10:12:25Z] Error configuring Relay:
  Token: non zero value required 

And /usr/local/etc/relay.conf:

# Relay config version
# Mandatory. Must equal 1.
version: 1

# Unique Relay id
# Environment variable: $RELAY_ID
# Default: none
id: aad48b34-5493-4107-9dc0-32dc710938ec

# Number of allowed concurrent command invocations
# Environment variable: $RELAY_MAX_CONCURRENT
# Default: 16
max_concurrent: 8

# Path to dynamic bundle config files
# Missing or empty value disables.
# Path will be created if it doesn't exist.
# Environment variable: $RELAY_DYNAMIC_CONFIG_ROOT
# Default: none
# Required: No
# dynamic_config_root: /tmp/bundle_configs

# Log level
# Environment variable: $RELAY_LOG_LEVEL
# Default: info
log_level: debug

# Log JSON? If false, plain text will be used.
# Environment variable: $RELAY_LOG_JSON
# Default: false
log_json: false

# Log output path
# Valid values: File path, stdout or console, stderr
# Environment variable: $RELAY_LOG_PATH
# Default: stdout
log_path: console

# Comma separated list of enabled command execution
# engines.
# Available engines: native,docker
# Environment variable: $RELAY_ENABLED_ENGINES
# Default: native,docker
# Note: At least one engine must be enabled.
enabled_engines: native,docker

# Information required to connect to Cog
cog:
  # Cog's host name or IP address
  # Environment variable: $RELAY_COG_HOST
  # Default: 127.0.0.1
  # host: 127.0.0.1

  # Cog's MQTT port
  # Environment variable: $RELAY_COG_PORT
  # Default: 1883
  # port: 1883

  # Use SSL to establish MQTT connection
  # Environment variable: $RELAY_COG_ENABLE_SSL
  # Default: false
  # enable_ssl: false

  # Cog shared secret
  # Environment variable: $RELAY_COG_TOKEN
  # Default: none
  # Required: Yes
  # token: sekrit

  # Relay will refresh its bundle and Docker images
  # on this interval. Valid time units are s (seconds),
  # m (minutes), and h (hours).
  # Environment variable: $RELAY_COG_REFRESH_INTERVAL
  # Default: 15m
  # refresh_interval: 15m

# Docker config
docker:
  # Use environment variables to set up Docker connection?
  # Uses Docker's default logic for the environment variables $DOCKER_HOST,
  # $DOCKER_TLS_VERIFY, and $DOCKER_CERT_PATH.
  # Environment variable: $RELAY_DOCKER_USE_ENV
  # Default: false
  use_env: false

  # Location of Docker's Unix socket
  # Environment variable: $RELAY_DOCKER_SOCKET_PATH
  # MUST begin with unix:// or tcp://
  # Default: unix:///var/run/docker.sock
  # socket_path: unix:///var/run/docker.sock

  # Docker registry
  # Environment variable: $RELAY_DOCKER_REGISTRY_HOST
  # Default: hub.docker.com
  # registry_host: hub.docker.com

  # Docker registry username
  # Environment variable: $RELAY_DOCKER_REGISTRY_USER
  # Default: none
  # Required: No
  # registry_user: demouser

  # Docker registry password
  # Environment variable: $RELAY_DOCKER_REGISTRY_PASSWORD
  # Default: none
  # Required: No
  # registry_password: demouser

  # Relay will clean up unused Docker resources on this
  # interval. Valid time units are s (seconds),
  # m (minutes), and h (hours).
  # Environment variable: $RELAY_DOCKER_CLEAN_INTERVAL
  # Default: 5m
  # clean_interval: 5m

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions