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

Unix Sockets broken for AdvertiseClientUrls and AdvertisePeerUrls #17443

Closed
4 tasks done
NHAS opened this issue Feb 17, 2024 · 3 comments
Closed
4 tasks done

Unix Sockets broken for AdvertiseClientUrls and AdvertisePeerUrls #17443

NHAS opened this issue Feb 17, 2024 · 3 comments
Labels

Comments

@NHAS
Copy link

NHAS commented Feb 17, 2024

Bug report criteria

What happened?

When trying to start an ETCd member with a unix socket for advertise peer url, or client urls the address is not accepted and required the url to be in host:port format.

etcd --name server0 --initial-advertise-peer-urls unix:///tmp/c139ad0d297f3e31eb4e517e7822aa64/test \
  --listen-peer-urls unix:///tmp/c139ad0d297f3e31eb4e517e7822aa64/test \
  --listen-client-urls http://127.0.0.1:2480 \
  --advertise-client-urls http://127.0.0.1:2380 \
  --initial-cluster-token wag-test \
  --initial-cluster server0=unix:///tmp/c139ad0d297f3e31eb4e517e7822aa64/test
  
  invalid value "unix:///tmp/c139ad0d297f3e31eb4e517e7822aa64/test" for flag -initial-advertise-peer-urls: URL address does not have the form "host:port": unix:///tmp/c139ad0d297f3e31eb4e517e7822aa64/test
Usage:

<omitted>

What did you expect to happen?

To be able to create a unix socket at any file location without requirement for the format host:port

How can we reproduce it (as minimally and precisely as possible)?

etcd --name server0 --initial-advertise-peer-urls unix:///tmp/c139ad0d297f3e31eb4e517e7822aa64/test \
  --listen-peer-urls unix:///tmp/c139ad0d297f3e31eb4e517e7822aa64/test \
  --listen-client-urls http://127.0.0.1:2480 \
  --advertise-client-urls http://127.0.0.1:2380 \
  --initial-cluster-token wag-test \
  --initial-cluster server0=unix:///tmp/c139ad0d297f3e31eb4e517e7822aa64/test

Anything else we need to know?

No response

Etcd version (please run commands below)

$ etcd --version
3.5.12

$ etcdctl version
3.5.11

Etcd configuration (command line flags or environment variables)

etcd --name server0 --initial-advertise-peer-urls unix:///tmp/wag-c139ad0d297f3e31eb4e517e7822aa64/test
--listen-peer-urls unix:///tmp/wag-c139ad0d297f3e31eb4e517e7822aa64/test
--listen-client-urls http://127.0.0.1:2480
--advertise-client-urls http://127.0.0.1:2380
--initial-cluster-token wag-test
--initial-cluster server0=unix:///tmp/wag-c139ad0d297f3e31eb4e517e7822aa64/test

Etcd debug information (please run commands below, feel free to obfuscate the IP address or FQDN in the output)

N/A

Relevant log output

No response

@NHAS NHAS added the type/bug label Feb 17, 2024
@ahrtr
Copy link
Member

ahrtr commented Feb 18, 2024

Unfortunately, the PR, which fixes this issue, hasn't been merged yet.

#15940

@ahrtr
Copy link
Member

ahrtr commented Feb 20, 2024

Resolved in #15940, which will be included in 3.5.13

Please try the main branch or release-3.5

@ahrtr ahrtr closed this as completed Feb 20, 2024
@Matviy
Copy link

Matviy commented Sep 4, 2024

I don't believe that this has been fully resolved:

./etcd --listen-client-urls=unix:///tmp/socket \
       --advertise-client-urls=unix:///tmp/socket
       
{"level":"warn","ts":"2024-09-04T12:32:54.642135-0700","caller":"embed/config.go:687","msg":"Running http and grpc server on single port. This is not recommended for production."}
{"level":"info","ts":"2024-09-04T12:32:54.642234-0700","caller":"etcdmain/etcd.go:73","msg":"Running: ","args":["./etcd","--listen-client-urls=unix:///tmp/socket","--advertise-client-urls=unix:///tmp/socket"]}
{"level":"warn","ts":"2024-09-04T12:32:54.642252-0700","caller":"etcdmain/etcd.go:75","msg":"failed to verify flags","error":"--advertise-client-urls \"unix:///tmp/socket\" must be \"host:port\" (missing port in address)"}

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

No branches or pull requests

3 participants