I’m about to lose my mind.
My downstream service, for whatever reason, cannot connect Envoy to reach the upstream:
time="2020-09-23T22:46:47Z" level=info msg="Connecting to database at: bolt://127.0.0.1:7687"
time="2020-09-23T22:46:47Z" level=warning msg="Connection error: dial tcp 127.0.0.1:7687: connect: connection refused"
Here are my service definitions in Nomad:
Upstream:
service {
name = "${BASE}-bolt-internal"
port = "bolt"
connect {
sidecar_service {}
}
}
Downstream:
service {
name = "${BASE}-api"
port = "web"
check {
type = "http"
port = "web"
path = "/"
interval = "60s"
timeout = "10s"
}
connect {
sidecar_service {
proxy {
upstreams {
destination_name = "jnexus-database-group-bolt-internal"
local_bind_port = 7687
}
}
}
}
}
Sidecar logs from the downstream don’t show anything abnormal. The listener starts and then the sidecar gets terminated because the main process dies.
[2020-09-24 02:27:32.674][1][info][main] [source/server/server.cc:500] all clusters initialized. initializing init manager
[2020-09-24 02:27:32.681][1][info][upstream] [source/server/lds_api.cc:60] lds: add/update listener 'public_listener:0.0.0.0:31919'
[2020-09-24 02:27:32.682][1][info][upstream] [source/server/lds_api.cc:60] lds: add/update listener 'jnexus-database-group-bolt-internal:127.0.0.1:7687'
[2020-09-24 02:27:32.682][1][info][config] [source/server/listener_manager_impl.cc:761] all dependencies initialized. starting workers
[2020-09-24 02:28:15.264][1][warning][main] [source/server/server.cc:468] caught SIGINT
[2020-09-24 02:28:15.264][1][info][main] [source/server/server.cc:567] shutting down server instance
[2020-09-24 02:28:15.264][1][info][main] [source/server/server.cc:521] main dispatch loop exited
[2020-09-24 02:28:15.265][1][info][main] [source/server/server.cc:560] exiting