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

API usage via curl with podman-desktop 1.8.0 with HyperKit not working #345

Closed
c-goes opened this issue Apr 8, 2024 · 2 comments
Closed

Comments

@c-goes
Copy link

c-goes commented Apr 8, 2024

It seems to be not possible to use the curl examples in the README.md with podman-desktop 1.8.0

First I searched for the path of the unix socket of gvproxy

$ ps x | grep gvproxy
62934   ??  S      4:28.04 /opt/homebrew/Cellar/podman/5.0.1/libexec/podman/gvproxy -mtu 1500 -ssh-port 50078 -listen-vfkit unixgram:///var/folders/q9/fdrhq7r90310knpl_04bc30c0000gn/T/podman/podman-machine-default-gvproxy.sock ...............

My path is /var/folders/q9/fdrhq7r90310knpl_04bc30c0000gn/T/podman/podman-machine-default-gvproxy.sock

Access to the API is not working:

curl -v --unix-socket /var/folders/q9/fdrhq7r90310knpl_04bc30c0000gn/T/podman/podman-machine-default-gvproxy.sock http:/unix/services/forwarder/expose http:/unix/stats
*   Trying /var/folders/q9/fdrhq7r90310knpl_04bc30c0000g:0...
* Immediate connect fail for /var/folders/q9/fdrhq7r90310knpl_04bc30c0000g: Protocol wrong type for socket
* Failed to connect to unix port 80 after 0 ms: Couldn't connect to server
* Closing connection
curl: (7) Failed to connect to unix port 80 after 0 ms: Couldn't connect to server
*   Trying /var/folders/q9/fdrhq7r90310knpl_04bc30c0000g:0...
* Immediate connect fail for /var/folders/q9/fdrhq7r90310knpl_04bc30c0000g: Protocol wrong type for socket
* Failed to connect to unix port 80 after 0 ms: Couldn't connect to server
* Closing connection
curl: (7) Failed to connect to unix port 80 after 0 ms: Couldn't connect to server
@cfergeau
Copy link
Collaborator

cfergeau commented Apr 8, 2024

The doc is misleading, the host-side API is only available when gvproxy was started with --listen, which is not the case when podman starts gvproxy. This means the behaviour you are seeing is correct.

This forwarder API is also accessible inside the guest over http://192.168.127.1:80, maybe you can use this instead?

I created #346 to improve the documentation.

@c-goes
Copy link
Author

c-goes commented Apr 8, 2024

Thank you. That's exactly what I wanted to know. Works perfectly inside the guest.

@c-goes c-goes closed this as completed Apr 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants