I have trouble connecting to Stripe with my Laravel / React application. Locally it works and the same code on a Digital Ocean droplet doesn't. I get this message:
Could not connect to Stripe (https://api.stripe.com/v1/invoices/upcoming?customer=cus_XXXXXXXXXX). Please check your internet connection and try again. If this problem persists, you should check Stripe's service status at https://twitter.com/stripestatus, or let us know at support#stripe.com. (Network error [errno 7]: )
That is the error message from Laravel. The important part is (Network error [errno 7]: ). It has to do with CURL that encounters this error: CURLE_COULDNT_CONNECT (error code 7).
Also I would expect something like this (Network error [errno 7]: Failed connect to api.stripe.com:443; Operation now in progress). Not a blank space after the colon.
I have tried this:
The server uses SSL (https://xxxxx.xxx)
Reboot the server
Redeploy the application
Clear caches for config, route, view etc.
php artisan optimize:clear
Re-run composer
Checked my Stripe API keys
Tried manually to connect fromt the shell with curl and it works.
Tried https://github.com/stripe/stripe-reachability#stripe-reachability
For reference, you can see the error on https://curl.haxx.se/libcurl/c/libcurl-errors.html and means :
CURLE_COULDNT_CONNECT (7) - Failed to connect() to host or proxy.
This is not an issue in the code, you may need to check your server hosting provider.
BTW, you may need to look at This answer. It's the same.
It is solved with him by changing the server and when communicating with the host provider, he found that the port is blocked because of high traffic.
Related
This is my first time using Stripe and I am faced with a problem that I cannot solve. I am using Laravel Cashier with Stripe Webhooks and did everything as described in the documentation , and so I think that I have nothing to show in the code. No event works, I always get this error in the Stripe Webhooks logs Failed to connect to remote host . I am using Docker for my project and my site on HTTPS with valid SSL certificates. I even tried different internet providers, I thought there might be a problem with this, but that didn't help either. And I understand that the problem is not in the code. Can you please help me? I really need help.
And here's a picture to make everything clear.
Install ngrok (https://ngrok.com/download)
Then follow this: youtube.com/watch?v=S1uExj7mMgM&ab_channel=Twilio
to set up ngrok to forward to your localhost on the port you are listening to, eg:
ngrok http 4000
See the Stripe documentation on webhooks: https://stripe.com/docs/webhooks/quickstart
I've been trying to deploy a Laravel application using Forge for a while now, but I always get stuck on Predis giving me the following error:
Predis\Connection\ConnectionException
Error while reading line from the server. [tcp://127.0.0.1:6379]
And everywhere I look the fix appears to be read_write_timeout to -1 or 0 in config/database.php, however this doesn't fix the issue for me. I've cleared all caches (manually and via Artisan) but the error remains.
So basically whatever fix I try and apply, the error remains.
If you have Kaspersky installed, disable Network Attack Blocker will fix it.
I've tried both Predis and PhpRedis but still error:
read error on connection to 127.0.0.1:6379 or Error while reading line from the server. [tcp://127.0.0.1:6379]
The only way is disable Network Attack Blocker (Kaspersky doesn't even show any events in report, but it blocks redis somehow)
Can you check if Redis is installed on your server ?
We are trying to make a connection from PowerBI Desktop, to the Google Big Query Database. Upon starting the app and immediately after trying to make the connection to the Google Data Source, we get the error below:
Unable to Connect
We encountered an error.
Details: "ODBC: ERROR [HY000] [Microsoft][DriverOAuthSupport] (8701) Error interacting with REST API: Couldn't resolve host name
ERROR [HY000] [Microsoft][DriverOAuthSupport] (8701) Error interacting with REST
API: Couldn't resolve host name"
I suppose that it has something to do with the proxy used inside our corporate environment but i haven't found anything so far on what urls/ports should be opened in order for this connection to work.
Please do keep in mind that this is a new business need and it is not something that worked and stopped working.
ApiConnection in CurlClient.php line 234:
Could not connect to Stripe (https://api.stripe.com/v1/accounts). Please check your internet connection and try again. If this problem persists, you should check Stripe's service status at https://twitter.com/stripestatus, or let us know at support#stripe.com.
(Network error [errno 6]: Could not resolve host: api.stripe.com)
If you're on Ubuntu, you may want to try rebooting the server. If that doesn't work, you'll probably want to write into Support about this.
When users are registered Laravel fires of a welcome email using Swiftmail configured to use SMTP with Mandrill. With the existing config, this works perfectly on my local installation.
When moving to the production server (Unmanaged, CentOS with WHM/Cpanel), the first HELO fails, giving this error:
Swift_TransportException in AuthHandler.php line 181:
Failed to authenticate on SMTP server with username "info#mydomain.com" using 2 possible
authenticators
in AuthHandler.php line 181
at Swift_Transport_Esmtp_AuthHandler->afterEhlo(object(Swift_SmtpTransport)) in
EsmtpTransport.php line 307
All other questions I can find with this error are about Gmail needing to have it's authentication weakened to allow the connection. This is directly with Mandrill so such things can't be the issue.
I've already checked the correct port (578) is open - nmap says it is.
That the credentials in mail.php are valid - API key is correct, so is user information.
And that the server can access the remote server - I can telnet smtp.mandrillapp.com without issue.
I'm running out of things to test for to fix.
Any suggestions welcome, and thank you in advance!