Laravel 5.2 swiftmailer error - laravel

I keep getting this error, despite trying all I could in the .env file. I even hardcoded the values in the config/mail file (removed them from the .env file), and it still gave the same error. I'm using a sandbox domain, with verified email addresses. The sandbox is active, and so are the email addresses.
PHP warning: stream_socket_client(): unable to connect to tcp://smtp.mailgun.org:587 (No connection could be made because the target machine actively refused it.
) in C:\xampp\htdocs\laravelproject\vendor\swiftmailer\swiftmailer\lib\classes\Swift\Transport\StreamBuffer.php on line 267
Swift_TransportException with message 'Connection could not be established with host smtp.mailgun.org [No connection could be made because the target machine actively refused it.
#10061]'

Related

Can't connect to external API using Laravel Sail

The project was working fine, suddenly I couldn't connection to Stripe nor Mailtrap APIs.
Stripe error
Could not connect to Stripe (https://api.stripe.com/v1/setup_intents). 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)
Mailtrap error
Connection could not be established with host "smtp.mailtrap.io:587": stream_socket_client(): php_network_getaddresses: getaddrinfo for smtp.mailtrap.io failed: Temporary failure in name resolution
I tried to delete the containers and build them again with --no-cache
sail down -v
sail build --no-cache
But I got an error running apt-get commands because it can't reach to the endpoint.

GRPC server on Mac not working when using laptop's actual IP address instead of localhost

I am following the GRPC tutorials here https://grpc.io/docs/languages/python/.
In greeter_client.py over here - https://github.com/grpc/grpc/blob/master/examples/python/helloworld/greeter_client.py, instead of using
with grpc.insecure_channel('localhost:50051') as channel:
(the above code works fine), I use the following -
with grpc.insecure_channel('XX.XX.XX.XX:50051') as channel:
where XX.XX.XX.XX is my laptop's public IP address from https://www.whatsmyip.org/.
I get this error
raise _InactiveRpcError(state)
grpc._channel._InactiveRpcError: <_InactiveRpcError of RPC that terminated with:
status = StatusCode.UNAVAILABLE
details = "failed to connect to all addresses; last error: UNKNOWN: ipv4:XX.XX.XX.XX:50051: Failed to connect to remote host: Connection refused"
debug_error_string = "UNKNOWN:failed to connect to all addresses; last error: UNKNOWN: ipv4:XX.XX.XX.XX:50051: Failed to connect to remote host: Connection refused {created_time:"2022-12-29T23:18:44.033798+00:00", grpc_status:14}"
does anyone know why this happens? I think this might be a MacOS issue. Mine is a MacOS Monterey, and I have the firewalls all disabled, so I am not sure what else I should be doing. Is this expected behaviour?
Turns out, the best way to deal with this is by using ngrok. The steps would be something like -
Download ngrok (can use brew install ngrok)
Set up forwarding using something like ngrok tcp 50051
Once you click 'enter', there will be a field under Forwarding, which you should then use. Remember to remove the tcp://

Facing this error when i upload laraval app to live server

This error occur when i trying to hit api from live server.But locally api running correctly. I got this error
cURL error 28: Failed to connect to testapi.certccie.com port 443: Connection timed out (see https://curl.haxx.se/libcurl/c/libcurl-errors.html)
Here we uploaded error image
https://i.stack.imgur.com/MKUZn.png
Maybe this is because of your host that your host dont access to certccie.com.
Try on another host.

WebSocket connection to 'protocol=7&client=js&version=4.3.1&flash=false' failed: Error in connection establishment: net::ERR_CONNECTION_REFUSED

I was implementing laravel websockets package in project it is working fine in my local machine but on server first it was giving error of Connection timeout That problem was solved when add TCP port in aws security group but after that it starts giving new error
WebSocket connection to 'ws://52.64.101.38:6001/app/ABCDEF?protocol=7&client=js&version=4.3.1&flash=false' failed: Error in connection establishment: net::ERR_CONNECTION_REFUSED
Here are errors I am getting in console when try to connect websocket server
I was searching about this error i found this github thread . Which is saying try to bound with 0.0.0.0 but I dont know what does it means,
https://github.com/GeniusesOfSymfony/WebSocketBundle/issues/251
I was also getting this error on local machine but was later resolved when i downgrade package version 1.6
NOTE: I am using ubuntu server aws services

Ispconfig 3: Error: Authentication failed. Error: Critical error Error: Could not connect to server

I am using ispconfig, and I have created a FTP user with the respective password. But when I try to connect to that server I hm experiencing this error.
Error: Authentication failed.
Error: Critical error
Error: Could not connect to server
I tried all the solutions given Here, but to no avail.
So I found the error,
I had used FileZilla to login into the server for uploading some file, and the connection was using the sftp:// protocol.
When I tried to conenct with the ftp account the above error was being reported, even after I updated/confirmed the user password.
Finally I realized that the protocol was wrong and after removing the sftp:// protocol prefix, it defaulted to ftp:// which the server readily accepted.

Resources