fresh-yak-35965
06/13/2024, 4:03 PMService/cockroachdb
listening on 26257. I also have a manifest that looks as follows:
kind: Deploy
type: kubernetes
name: cockroach-client
dependencies:
- run.cockroach-db-confirm
spec:
files:
- dev/client.yml
portForwards:
...
- name: db
resource: Service/cockroachdb
targetPort: 26257
localPort: 26257
I can connect using the cockroach sql
CLI tool using this port-forward without any issues. However, I'm trying to use a tool called JetBrains Datagrip to connect (over JDBC driver) to localhost:26257. It does not work -- the connection fails (a connection failure, not certs or something else). What's extremely strange to me is that when I manually port-forward using kubectl port-forward svc/cockroachdb 26257:26257
, it works every time. No issues.
I understand that this might actually be a Datagrip limitation, but I wanted to post it here because datagrip is simply a client looking for a valid connection. The fact that the manual port-forward works when the port-forward created by garden does not (at least for this one tool) is perplexing and leaves me with questions about how garden sets up the port forward. I would assume it's just the exact command I wrote out above, but maybe not?
Thanks again for your help team.fresh-yak-35965
06/13/2024, 4:39 PMfreezing-pharmacist-34446
06/18/2024, 11:50 AMThe preferred local port to forward from. If none is set, a random port is chosen. If the specified port is not available, a warning is shown and a random port chosen instead.
If the configured localPort
is already in use, a random port is chosen. Is it possible that this was the case?fresh-yak-35965
07/01/2024, 11:35 PMkubectl port-forward
, I think.fresh-yak-35965
07/03/2024, 2:54 PMnetstat -an | grep ESTABLISHED | grep <localPort>
that it wasn't occupied.freezing-pharmacist-34446
07/03/2024, 2:55 PMfresh-yak-35965
07/03/2024, 2:58 PMfresh-yak-35965
07/03/2024, 2:59 PM➜ ~ netstat -an | grep 26257
tcp6 0 0 ::1.26257 *.* LISTEN
fresh-yak-35965
07/03/2024, 3:15 PMkind: Project
apiVersion: garden.io/v1
name: kraken
defaultEnvironment: dev
proxy:
hostname: 127.0.0.1
I have had some long standing issue in my macos where localhost doesn't work properly despite /etc/hosts being properly specified. No idea what's going on there.fresh-yak-35965
07/03/2024, 3:15 PMfreezing-pharmacist-34446
07/03/2024, 3:46 PM