#Ryan Montgomery
1 messages ยท Page 1 of 1 (latest)
Hello, what exactly is refusing the connection? Are events getting to your server and it is responding with that?
dial tcp: lookup myapp.dev on 192.168.1.254:53: read udp 192.168.1.95:57008->192.168.1.254:53: i/o timeout
This is what I'm getting back from the Stripe CLI:
[ERROR] Failed to POST: Post "https://myapp.dev/stripe/events": dial tcp: lookup myapp.dev on 192.168.1.254:53: read udp 192.168.1.95:57008->192.168.1.254:53: i/o timeout
curl -X POST https://myapp.dev/stripe/events
This curl returns the page I expect.
It's an error Stripe::SignatureVerificationError but that's expected because I'm not sending the signing header.
But it connects
Do you see any traffic at your myapp.dev server or does this seem to be timing out before you even get that?
There is no traffic on the server. It times out before that.
(thanks for responding so quickly and helping me troubleshoot this btw, that's really awesome of you)
Gotcha, thanks for checking. I will reach out to a colleague for help here, will get back to you soon
Hi ๐
This may seem kind of silly but can you try appending a / to your forward-to URL?
Also, just to confirm, this URL is running locally on your dev box, correct?
yes this is running locally and I will give that try
stripe listen --forward-to https://myapp.dev/stripe/events/ --skip-verify
Just to be clear, I mean https://myapp.dev/stripe/events/. Some web frameworks don't like POST requests that don't end in a / by default
Failed to POST: Post "https://myapp.dev/stripe/events/": dial tcp 23.202.231.169:443: connect: connection refused
๐ค
Damn.
Let me try on my integration. I have it served on an HTTPS URL but also locahost. I normally run the stripe listen command with the localhost URL
Yeah I was going to try that next. We use puma-dev to run our app locally and so we can test things like subdomains.
I was successful in mapping my own local dev to an https: route. I would try using the localhost address and, if you are still hitting this error, I think you may need to review any security rules that might refuse connections.
Ok. Thank you. I'll try localhost and see what they produces.
If it's helpful to anyone on the dev team I was able to get ngrok to work with our local server running puma-dev.
With puma-dev apparently host-header needs to be set. ngrok http --host-header=myapp.dev 443
I also see in the ngrok logs reconnecting (context deadline exceeded) but then a second later it fixes itself and connects fine.
Nice! Glad you could get that config working and thanks for sharing