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

Unable to register webhook endpoint in stripe-cli #671

Closed
rohit-githubAccount opened this issue May 18, 2021 · 3 comments
Closed

Unable to register webhook endpoint in stripe-cli #671

rohit-githubAccount opened this issue May 18, 2021 · 3 comments
Labels
bug Something isn't working

Comments

@rohit-githubAccount
Copy link

rohit-githubAccount commented May 18, 2021

When I run the command

sudo docker run --rm -it --net=bridge stripe/stripe-cli listen --forward-to http://localhost:3000/xxxxxxx --api-key API_KEY

On receiving event I am getting
[ERROR] Failed to POST: Post "http://localhost:3000/xxxxxxx": dial tcp 127.0.0.1:3000: connect: connection refused

I am running docker on KDE Neon OS

@rohit-githubAccount rohit-githubAccount added the bug Something isn't working label May 18, 2021
@pepin-stripe
Copy link
Contributor

pepin-stripe commented May 18, 2021

Hi @rohit-githubAccount,

you can use http://host.docker.internal:3000/xxxxxxx instead of localhost. This is a special DNS which will resolve to the internal IP address of the container host.

Since you are on Linux, you need to pass the --add-host host.docker.internal:host-gateway flag as well.

Documentation here: https://docs.docker.com/docker-for-mac/networking/#use-cases-and-workarounds


Alternatively, since you are on Linux you should be able to pass the --network="host", which will not isolate the container's network stack from its host.

Documentation here: https://docs.docker.com/network/host/

Hope this helps, and please feel free to reopen if you are still facing problems!

@rohit-githubAccount
Copy link
Author

rohit-githubAccount commented May 19, 2021

Thank you for your assistance. It worked.

@pepin-stripe
Copy link
Contributor

Glad I could help!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants