stripe-cli: Listen command stops working with i/o timeout
Issue
The listen command will sometimes suddenly stop working with the following error:
time="Tue, 25 Feb 2020 13:12:20 UTC" level=error msg="read error: read tcp 192.168.0.2:42458->54.187.159.182:443: i/o timeout"
This happens regardless of running it in Docker or on my Mac. It usually happens after a few hours, but sometimes it happens after 15 minutes as well. It pretty much always happens after I put my Mac to sleep for some time.
Expected Behavior
The listen command should recover from an i/o timeout or exit with a failure code so that we can configure Docker to restart.
Steps to reproduce
Not exactly sure.
Traceback
time="Tue, 25 Feb 2020 13:12:20 UTC" level=error msg="read error: read tcp 192.168.0.2:42458->54.187.159.182:443: i/o timeout"
Environment
macOS and Docker on macOS
About this issue
- Original URL
- State: open
- Created 4 years ago
- Reactions: 16
- Comments: 21 (1 by maintainers)
Same issue. I have to restart the forwarder every now and then.
macOS 10.15.7 stripe-cli 1.5.14
In this output we see the CLI sending pings and getting pongs, reconnecting twice, and eventually losing the connection at the end, with the last log output being
stopReadPump. I had to restart it after that, there was no more activity for hours.stripe_listen_output.txt
Different day, same issue…
The only reliable way to get
stripe listento work is to restart the command. If you let it run for, say, 30 min, you never know if it’ll work next time you do a payment test.Agreed. Is there any update or plan to resolve this? It’s been over a year since it was being looked into.
Same Issue
MacOS Big Sur
Events stop coming and its reconnecting every few seconds.
➜ ~ stripe version stripe version 1.5.11 via brew
@tomer-stripe I actually wasn’t, just let it open for a while so you can see the timeouts. I can run it again next time I’m working with Stripe CLI to send events.
I released a new version (1.3.10) that has some some more verbose debugging output. If you all have a chance to upgrade to the newer version and share the debugging output that’d be amazing!
One thing I want to call out is that there were two possible
read errorswe were showing errors for in the CLI. One of them is safe in that the CLI automatically reconnects after seeing it, so I changed the loglevel there fromERRORtoDEBUG. This should make timeout that’s causing reconnection issues louder.For some additional context: the CLI itself is expected to disconnect and reconnect automatically (periodically and for errors). In this specific case it seems like something’s gone wrong with our reconnection logic and I’m trying to isolate the case that’s not reconnecting.
I’m having the same problem on macOS + virtualbox
EDIT:
stripe listencontinues to work after timeout in my case. However, during that period when timeouts occur, events aren’t reaching my machine and are not even registered in Stripe dashboard under “Webhook CLI responses” (when i view specific event).@Stripe staff: feel free to contact me if you like. I can share some example event IDs