Tmate not found error

Hi guys. I’m trying to implement tmate but I’m getting this error:

/bin/sh: 18: /usr/drone/bin/tmate: not found

I’m running drone:latest on Ubuntu 18.04 via docker compose. Have installed tmate both on Ubuntu server and on docker instance doing the tasks on runner. Obviously the path is wrong. This is my docker-compose.yaml file:

    version: '3'

    services:
      drone-server:
        image: drone/drone:latest
        ports:
          - 80:80
          - 443:443
        volumes:
          - /var/lib/drone:/data
        restart: always
        env_file:
          - /etc/drone/server.env

      drone-runner:
        image: drone/drone-runner-docker:latest
        ports:
          - 3000:3000
        depends_on:
          - drone-server
        volumes:
          - /var/run/docker.sock:/var/run/docker.sock
        restart: always
        env_file:
          - /etc/drone/runner.env

What should I change to have tmate executed the right way? Tmate is in /usr/bin/tmate.
Kind regards,
Marko Lerota

1 Like

@Marko_Lerota,

Could you please confirm if you have followed this documentation and passing these mentioned env variables correctly:
https://docs.drone.io/runner/docker/configuration/reference/drone-tmate-enabled/

Also if possible could you please try after copying the tmate to /usr/drone/bin/ and test if still you are facing the issue.

Regards,
Harness support

Hi. Thanks for you quick reply. I followed the docs and put:

DRONE_TMATE_ENABLED=true

in runner.env file.
I’ve created directory /usr/docker/bin and copied tmate there and now the error is different:

tmate: need UTF-8 locale (LC_CTYPE) but have ANSI_X3.4-1968

Nice regards,
Marko

tmate is supported for amd64 and arm64 architectures … there is no arm32 distribution for tmate and is therefore unsupported by Drone. For supported architectures, Drone automatically installs the tmate binary into your pipeline container. You should not be manually installing tmate.

Here is where the tmate server is automatically installed:

Here is where Drone copies the tmate server into your pipeline container:

Here is the code that Drone uses to invoke tmate on pipeline step failure:

You can use the above two links to explore the code and triage further.

2 Likes

I got the same:

Tried drone/drone:latest + drone/drone-runner-docker:latest and drone/drone-runner-docker:1

it doesn’t seem to be happening…
we just do not have tmate binary in our pipeline container

I cannot reproduce, however, I provided additional details in my previous post that you can use to troubleshoot further.