Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docker volumes not working, after restart get: "failed to build resolver: passthrough: received empty target in Build()" while trying to insert a job #1497

Open
gfolcarelli opened this issue Mar 12, 2024 · 2 comments

Comments

@gfolcarelli
Copy link

gfolcarelli commented Mar 12, 2024

Describe the bug
I can't insert a new job via Postman after recreating a docker container built up with docker-compose and volumes.
I get error "failed to build resolver: passthrough: received empty target in Build()"
I'm in linux environment, in windows environment I get:
"context deadline exceeded"

If I comment the volumes part in the docker compose it works correctly (but obviously doesn't store the jobs after container restart).

To Reproduce
This is docker-compose.yml

version: "3.3"

services:

  dkron:
    image: dkron/dkron
    restart: always
    ports:
      - 8080:8080
      - 8946:8946
    command: agent --server --log-level=debug --bootstrap-expect=1 --data-dir=/dkron.data
    volumes:
      - ./dkron.data:/dkron.data

cmd: docker compose up -d

run via postman this api:

POST http://localhost:8080/v1/jobs

Body:

{
	"name": "try",
	"displayname": "",
	"schedule": "0 0 6 * * *",
	"timezone": "UTC",
	"owner": "try",
	"owner_email": "",
	"disabled": false,
	"tags": {
		"server": "true"
	},
	"retries": 0,
	"parent_job": "",
	"processors": {
		"log": {
			"forward": "true"
		}
	},
	"concurrency": "",
	"executor": "http",
	"executor_config": {
		"method": "GET",
		"url": "https://try.try.try",
		"headers": "",
		"body": "",
		"timeout": "30",
		"expectCode": "200",
		"expectBody": "",
		"debug": "false"
	}
}

It goes well and the api job is uploaded.
After do cmd: docker compose down && docker compose up -d

There is no job inside the stored jobs (strange).

Then I try to insert it again and get the errors:
"failed to build resolver: passthrough: received empty target in Build()" in linux
"context deadline exceeded" in windows

Expected behavior
I expected to find the jobs still inside the already created jobs, and anyway no errors trying to insert them again.

@Michael62501
Copy link

I have meet the same problem with you. I find the error log occur because not find the node id. So I decide to set the fix node name, then I resolve my problem.
you can see this: https://dkron.io/docs/cli/dkron_agent/
Add the param --node-name to fix your node name

@ngocdd
Copy link

ngocdd commented Nov 12, 2024

I got the same problem, setting the node-name didn't help me resolve it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants