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

Why is this trying to bind the public IP and/or not working? #4434

Closed
aronchick opened this issue Sep 17, 2024 · 3 comments
Closed

Why is this trying to bind the public IP and/or not working? #4434

aronchick opened this issue Sep 17, 2024 · 3 comments
Labels
th/game-day Issues reported during game day testing

Comments

@aronchick
Copy link
Collaborator

❯ bacalhau-1.5.0 serve --orchestrator --compute --data-dir ~/bacalhau-versions/v1.5.0/data-dir
17:26:25.456 | INF pkg/repo/fs.go:91 > Initializing repo at /Users/daaronch/bacalhau-versions/v1.5.0/data-dir
17:26:25.478 | INF cmd/cli/serve/serve.go:141 > persisted node name n-4bd97437-6835-48af-b106-64640f178a58
17:26:25.543 | INF cmd/cli/serve/serve.go:218 > starting bacalhau...
17:26:25.669 | INF pkg/nats/logger.go:47 > Starting nats-server [Server:n-4bd97437-6835-48af-b106-64640f178a58]
17:26:25.67 | INF pkg/nats/logger.go:47 >   Version:  2.10.11 [Server:n-4bd97437-6835-48af-b106-64640f178a58]
17:26:25.67 | INF pkg/nats/logger.go:47 >   Git:      [not set] [Server:n-4bd97437-6835-48af-b106-64640f178a58]
17:26:25.67 | INF pkg/nats/logger.go:47 >   Name:     n-4bd97437-6835-48af-b106-64640f178a58 [Server:n-4bd97437-6835-48af-b106-64640f178a58]
17:26:25.67 | INF pkg/nats/logger.go:47 >   Node:     drcUt249 [Server:n-4bd97437-6835-48af-b106-64640f178a58]
17:26:25.67 | INF pkg/nats/logger.go:47 >   ID:       NCCXXK6JIIZCDBDZIPGCXDKQ4OHRPW4DL2OY3JSLFWAOWD7EECFRET4N [Server:n-4bd97437-6835-48af-b106-64640f178a58]
17:26:25.673 | INF pkg/nats/logger.go:47 > Starting JetStream [Server:n-4bd97437-6835-48af-b106-64640f178a58]
17:26:25.674 | INF pkg/nats/logger.go:47 > ---------------- JETSTREAM ---------------- [Server:n-4bd97437-6835-48af-b106-64640f178a58]
17:26:25.674 | INF pkg/nats/logger.go:47 >   Max Memory:      48.00 GB [Server:n-4bd97437-6835-48af-b106-64640f178a58]
17:26:25.674 | INF pkg/nats/logger.go:47 >   Max Storage:     49.71 GB [Server:n-4bd97437-6835-48af-b106-64640f178a58]
17:26:25.674 | INF pkg/nats/logger.go:47 >   Store Directory: "/Users/daaronch/bacalhau-versions/v1.5.0/data-dir/orchestrator/nats-store/jetstream" [Server:n-4bd97437-6835-48af-b106-64640f178a58]
17:26:25.674 | INF pkg/nats/logger.go:47 > ------------------------------------------- [Server:n-4bd97437-6835-48af-b106-64640f178a58]
17:26:25.675 | INF pkg/nats/logger.go:47 > Listening for client connections on 0.0.0.0:4222 [Server:n-4bd97437-6835-48af-b106-64640f178a58]
17:26:25.676 | INF pkg/nats/logger.go:47 > Server is ready [Server:n-4bd97437-6835-48af-b106-64640f178a58]
17:26:25.694 | INF pkg/nats/server.go:49 > NATS server NCCXXK6JIIZCDBDZIPGCXDKQ4OHRPW4DL2OY3JSLFWAOWD7EECFRET4N listening on nats://0.0.0.0:4222 [NodeID:n-4bd97437]
17:26:27.707 | INF pkg/node/manager/node_manager.go:47 > Nodes joining the cluster will be assigned approval state: APPROVED
17:26:27.707 | INF pkg/node/heartbeat/server.go:59 > Heartbeat server started [NodeID:n-4bd97437]
17:26:27.707 | INF pkg/node/manager/node_manager.go:66 > Node manager started [NodeID:n-4bd97437]
17:26:27.712 | INF pkg/publisher/local/server.go:52 > Running local publishing server on 0.0.0.0:6001 [NodeID:n-4bd97437]
17:26:27.714 | INF pkg/lib/watcher/watcher.go:59 > No checkpoint found, starting from latest [NodeID:n-4bd97437] [watcher_id:compute-logger]
17:26:27.714 | INF pkg/lib/watcher/watcher.go:68 > starting watcher [NodeID:n-4bd97437] [starting_at:latest] [watcher_id:compute-logger]
error starting node: listen tcp 35.194.189.115:1234: bind: can't assign requested address
@aronchick aronchick added the th/game-day Issues reported during game day testing label Sep 17, 2024
@frrist
Copy link
Member

frrist commented Sep 18, 2024

The error: error starting node: listen tcp 35.194.189.115:1234: bind: can't assign requested address comes from here:

if err := standardNode.Start(ctx); err != nil {
return fmt.Errorf("error starting node: %w", err)
}

bacalhau/pkg/node/node.go

Lines 111 to 113 in d0bae63

func (n *Node) Start(ctx context.Context) error {
return n.APIServer.ListenAndServe(ctx)
}

Indicating the server was given an address it cannot bind to - 35.194.189.115

My gut says there is an EnvironmentVariable, such as BACALHAU_API_HOST or BACALHAU_SERVER_HOST that is set causing this issue.

@aronchick
Copy link
Collaborator Author

Issue here is it was picking up config from who knows where. Either we should print out where the config came from at the top of the process log, or have a command to do so.

Was not an env variable.

@frrist
Copy link
Member

frrist commented Sep 19, 2024

We have added logging to the latest release candidate that will print the config file(s) being loaded.

For the case here, using the older release candidate (alpha3), since there are no env vars set, and no flags passed, this indicates configuration from a file is being loaded from ~/Library/Application\ Support/bacalhau/config.yaml assuming you are on OSX. If you are on Linux it's being loaded from ~/.config/bacalhau/config.yaml

The change landed here: #4466 that's now in alpha4 modifies bacalhau to only look in the bacalhau repo for config files. So the confusion around what/where config is being loaded from should be resolved now. Closing the issue, please re-open if this issue is still encountered with alpha4

@frrist frrist closed this as completed Sep 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
th/game-day Issues reported during game day testing
Projects
Status: Done
Development

No branches or pull requests

2 participants