Skip to content

Webhook fail on internal_api/webhook #4

@pini-gh

Description

@pini-gh

Hi,

I'm aware that you recommend tilt, but my server runs several services already using ansible + docker-compose, and I'd like it to host a tmate service as well.

I'm almost there: tmate-ssh-server works. But not tmate-websocket where the docker log reports this error on new sessions:

token=[CGM5...] id=9b211210-79b0-11eb-98df-0242ac120007 [info] Session started stoken=CGM5... stoken_ro=ro-bKmp... ssh_only=false foreground=false named=false
[warn] Webhook fail on internal_api/webhook - Retrying event :session_register (:nxdomain)

And the web session URL returns 404 with this text: :(.

I see no error message in the tmate-ssh-server docker log.

Here is my docker-compose configuration:

version: "3.5"

services:
  tmate-ssh-server:
    image: tmate/tmate-ssh-server:latest
    container_name: tmate-ssh-server
    restart: unless-stopped
    cap_add:
    - SYS_ADMIN
    ports:
    - "2200:22"
    environment:
      HAS_WEBSOCKET: 1
      WEBSOCKET_HOSTNAME: tmate-websocket
      SSH_KEYS_PATH: "/etc/tmate-keys"
      SSH_HOSTNAME: tmate.example.com
      SSH_PORT_LISTEN: 22
      SSH_PORT_ADVERTISE: 2200
    volumes:
    - ssh-keys:/etc/tmate-keys
    - unix-sockets:/tmp/tmate/sessions
    networks:
      bridge:

  tmate-websocket:
    image: tmate/tmate-websocket:latest
    container_name: tmate-websocket
    restart: unless-stopped
    environment:
      ERL_NODE_NAME: tmate.example.com
      ERL_COOKIE: myerlcookie
      # Not sure at all about this one
      WEBSOCKET_BASE_URL: http://tmate-websocket:4001/
      USER_FACING_BASE_URL: https://tmate.example.com/
      DAEMON_HMAC_KEY: myhmackey
      INTERNAL_API_AUTH_TOKEN: myinternaltoken
    volumes:
    - unix-sockets:/tmp/tmate/sessions
    networks:
      bridge:

volumes:
  ssh-keys:
  unix-sockets:

networks:
  bridge:

Note: I had to tweak the tmate-ssh-server's entrypoint to pass the websocket container's host name (WEBSOCKET_HOSTNAME) to the daemon, because it was hardcoded to localhost.

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