How to get debug output for remote services?

I’m trying to use the following config and it just freezes without any output. How do I enable some additional debugging to see what’s happening?

kind: pipeline
name: default

  - name: echo
    image: bash
      - echo "hi"

  - name: localstack
    image: localstack/localstack:latest
      HOSTNAME_EXTERNAL: localstack
      DEFAULT_REGION: eu-west-2
      SERVICES: sqs,s3

I’m running this ~both locally and~ remotely only, locally it works without issue. Locally i’m using the following command drone exec ./.drone.yml --trusted

Log output comes from stdout/stderr of the running container. If you do not see any output it would imply that localstack/localstack:latest is not generating any output to stdout/sterr, in which case you would need to work with the owners of that image to understand why that is the case.

However, looking at your pipeline it is possible that the pipeline starts and then quickly stops. Perhaps you are not giving your service container enough time to initialize and start up, which is why no logs are displayed?

Either way, Drone streams service container output by default, no special configuration required.

Sorry, messed up the original question. It starts ok in local. But on remote the service fails to start with no output.

I just see a message default – localstack: Failure. I’m unsure how to get the remote output for this.

In the full config there’s several long running jobs so I don’t think it’s a timing issue. The service displays this error message immediately upon running.

Managed to get it to spit out an output after refreshing the page

default: Service "localstack" is invalid: [spec.ports[0].name: Required value, spec.ports[1].name: Required value, spec.ports[2].name: Required value, spec.ports[3].name: Required value]

Looks like I can debug with this. Not sure why it’s requiring a name for the port but that’s a different story!

It looks like you are using the experimental Kubernetes runtime which is not recommended for production use due to its experimental status and known issues [1]. You should instead consider using agents. You can certainly use the experimental Kubernetes runtime, but you should expect to get hands on with the code. We provide a guide for debugging the experimental runtime and sending patches [2]

[2] Contributing to Drone for Kubernetes

1 Like