"unexpected EOF" on client.ExecuteWorkflow()

When I try to execute the Workflow, I get unexpected EOF error.

// Start a workflow execution
we, err := c.ExecuteWorkflow(
	context.Background(),
	client.StartWorkflowOptions{
		ID:                                       "",
		TaskQueue:                                "ProcessIDs",
		WorkflowExecutionTimeout:                 0,
		WorkflowRunTimeout:                       0,
		WorkflowTaskTimeout:                      time.Minute * 5,
		WorkflowIDReusePolicy:                    0,
		WorkflowExecutionErrorWhenAlreadyStarted: false,
		CronSchedule:                             "",
	},
	workflows.ChunkIDsWorkflow,
	work,
)
if err != nil {
	log.Fatalf("Unable to execute workflow, %v", err) // error -> "unexpected EOF"
}

Why is this happening?

This is my workflows.ChunkIDsWorkflow func:

func ChunkIDsWorkflow(ctx workflow.Context, work ProcessWork) error {

	return nil
}

NOTE: VSCode does not report any kind of EOF error. In fact, it has no problems at all. I ran go fmt ./... and linting tools, everything is clean.

Can you show the full error trace? I’m unable to reproduce this and it kinda looks like issue with db driver?

I ran it with the debugger and it broke here:

// findmoduledatap looks up the moduledata for a PC.
//
// It is nosplit because it's part of the isgoexception
// implementation.
//
//go:nosplit
func findmoduledatap(pc uintptr) *moduledata {
	for datap := &firstmoduledata; datap != nil; datap = datap.next {
		if datap.minpc <= pc && pc < datap.maxpc {
			return datap // -> here
		}
	}
	return nil
}

What did you mean by “full error trace”?

What did you mean by “full error trace”?

stack trace of the error you received.

This is everything I get:

Starting: /home/user/go/bin/dlv dap --check-go-version=false --listen=127.0.0.1:39181 --log-dest=3 from /home/user/working/project-temporal/app/starter
DAP server listening at: 127.0.0.1:39181
Type 'dlv help' for list of commands.
2022/05/26 17:42:18 INFO  No logger configured for temporal client. Created default one.
2022/05/26 17:42:18 Unable to execute workflow, unexpected EOF
Process 3554 has exited with status 1
Detaching
dlv dap (3388) exited with code: 0

Thanks, this is pretty generic error so hard to tell. Seems related to VSCode runtime.

Now I shut down the Ubuntu, removed all Temporal related (every Docker image), wanted to boot it up on Windows and got this error:

Error response from daemon: Ports are not available: exposing port TCP 0.0.0.0:8088 -> 0.0.0.0:0: listen tcp 0.0.0.0:8088: bind: Only one usage of each socket address (protocol/network address/port) is normally permitted.

The weird thing is, Temporal now runs, but it errored and I can only stop it through Docker, since the terminal gave an error.

(Still getting EOF Error on starter).

Seems port 8088 is already used by some other application?

If this is local setup might be worth trying to clean everything up (make sure nothing is running first):

docker system prune -a
docker volume prune

and then try with one of the docker compose files here.

I have found the offending code for the “Unexpected EOF” error in the end. It was not Temporal, it was the data converter library (not Temporal’s) that was throwing a vague error…

Anyways, thank you for checking into it and thanks for the docker commands.

1 Like