Laravel - Mailing system doesn't work on my Web server but gives cURL error 7: (see http://curl.haxx.se/libcurl/c/libcurl-errors.html) - laravel

I am using Mailgun to send mail and It works well on my local server, but on my Web Server, where the site is hosted on HackFlix, It produces this error after sending
GuzzleHttp\Exception\ConnectException
cURL error 7: (see http://curl.haxx.se/libcurl/c/libcurl-errors.html)
I have done many research to this problem and i didn't get any correct answer that solves cURL error 7. Some people say that i should ping or nslookup smtp.mailgun.org but I don't have SSH shell access on my server. Please, what is the solution to this problem?

Related

"message": "cURL error 60: SSL: no alternative certificate subject name matches target host name 'api-.pusher.com'

We are implementing a custom chat in a web application using Laravel and pusher. The basic functionalities like sending and receiving messages with file-sharing were working perfectly fine for few days but all of a sudden we encountered an error as follows:
"message": "cURL error 60: SSL: no alternative certificate subject
name matches target host name 'api-.pusher.com' (see
https://curl.haxx.se/libcurl/c/libcurl-errors.html) for
https://api-.pusher.com/apps//events?auth_key=&auth_timestamp=1622911129&auth_version=1.0&body_md5=994999b61168dbbbb9172e79341131b8&auth_signature=51992f8acbe3f6943163bb358399f30b7d8020d30a5d121e1650953480642397",
"exception": "GuzzleHttp\Exception\RequestException",
"file": "/home/techfin/public_html/testtest.com/vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php",
"line": 211
It works perfectly fine on the local machine but causes problems on the server.
I think you should install the CURL extension as below (on Linux):
sudo apt-get install php-curl
This will install a dependency package, which depends on the default PHP version. After that restart apache
sudo service apache2 restart
on windows:
read this article
You're missing the cluster ID from the curl. Normally you'd have an API URL like https://api-mt1.pusher.com. You can find the cluster for your app in the Pusher dashboard.

"Bad configuration option: KexAlgorithms"

I am trying to ssh into a remote server for my university on a Windows 10 computer.
I installed OpenSSH. When I first tried to ssh in, I would get the error
no kex alg
Doing some googling, I put the following in my /.ssh/config file
KexAlgorithms kexalgorithms curve25519-sha256,curve25519-sha256#libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha256,diffie-hellman-group14-sha1
However, now when I try to ssh, I get these errors:
/cygdrive/c/Users/name/.ssh/config: line 3: Bad configuration option: KexAlgorithms
/cygdrive/c/Users/name/.ssh/config: terminating, 1 bad configuration options
I'm new to trying this and have been frustrated for hours. Anyone know how I can fix this? Thank you :)
UPDATE: Changed my config file to this based off comment, still getting error:
Host name#remote_server
HostName name#remote_server
KexAlgorithms curve25519-sha256,curve25519-sha256#libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha256,diffie-hellman-group14-sha1
Error message still the same, still getting error with line 3, KeyAlgorithmns
The binaries of ssh in windows 10 are outdated. You should download the new ssh binaries and add them to the windows environment variables and it's fixed. Stack overflow post

Laravel Dusk Testing has an error on the server Curl error thrown for http POST to /session with params

I would like to ask me to try the following instructions on Plesk Server:
php artisan dusk
The following error will occur:
1) Tests\Browser\ExampleTest::testBasicExample
Facebook\WebDriver\Exception\WebDriverCurlException: Curl error thrown for http POST to /session with params: {"desiredCapabilities":{"browserName":"chrome","platform":"ANY","chromeOptions":{"binary" :".\/vendor\/laravel\/dusk\/bin\/chromedriver-linux","args":["--disable-gpu","--headless","--no-sandbox"," --verbose","--window-size=1024,768"]}}}
Failed connect to localhost:9515; Connection refused
/var/www/vhosts/fanswoo.com/fanswoo-framework/vendor/facebook/webdriver/lib/Remote/HttpCommandExecutor.php:292
/var/www/vhosts/fanswoo.com/fanswoo-framework/vendor/facebook/webdriver/lib/Remote/RemoteWebDriver.php:126
/var/www/vhosts/fanswoo.com/fanswoo-framework/tests/DuskTestCase.php:43
/var/www/vhosts/fanswoo.com/fanswoo-framework/vendor/laravel/dusk/src/Concerns/ProvidesBrowser.php:192
/var/www/vhosts/fanswoo.com/fanswoo-framework/vendor/laravel/framework/src/Illuminate/Support/helpers.php:754
/var/www/vhosts/fanswoo.com/fanswoo-framework/vendor/laravel/dusk/src/Concerns/ProvidesBrowser.php: 193
/var/www/vhosts/fanswoo.com/fanswoo-framework/vendor/laravel/dusk/src/Concerns/ProvidesBrowser.php:93
/var/www/vhosts/fanswoo.com/fanswoo-framework/vendor/laravel/dusk/src/Concerns/ProvidesBrowser.php:64
/var/www/vhosts/fanswoo.com/fanswoo-framework/tests/Browser/ExampleTest.php:22
I suspected that the Chrome Driver could not be executed, so I used the following command to detect:
./vendor/laravel/dusk/bin/chromedriver-linux
The return is as follows:
Starting ChromeDriver 2.43.600233 (523efee95e3d68b8719b3a1c83051aa63aa6b10d) on port 9515
Only local connections are allowed.
Indicates that ChromeDriver can be opened normally.
The code can also be detected on the local computer. Only when the dusk command is executed in Plesk Server will the error occur. May I ask what God should I continue to do or what to modify? Thank you!
The server specifications are as follows:
CentOS 7.5
PHP 7.1
DB SQLite3
Laravel Version 5.7
ChromeDriver Version 69
If you able to start chromedriver successfully, now try to access the below url with respective port.
http://localhost:{port}/status
For e.g., in above message, the server started on port 9515. Access the url in browser, http://localhost:9515/status
You should get above message indicating server is accessible with hostname as localhost
If your are not able access, then fix the specific issue

Docker For Mac / Lando: cannot cURL external webservice

I am testing out Lando for a new local dev setup.
Everything has gone well so far but I am running into an error that I don't get on my old Vagrant/VM environment, but do with Lando.
We have part of the site that uses Guzzle to fetch data from a web service. On Lando, I get a cURL error:
cURL error 7: Failed to connect to webservice.internalsite.com port 80: No route to host
How can I resolve this? When I try to ping that url, it says "Destination host unreachable". I am using Docker For Mac if that factors in.

Getting "Server refused to allocate pty" error when trying to connect to Bitbucket via SSH on Windows

I'm trying to hook up Mercurial to Bitbucket on a PC and it's being really tough. I followed the instructions here:
http://www.codza.com/mercurial-with-ssh-setup-on-windows
and I'm running pageant set to my private key. I typed this at the command line:
plink -v hg#bitbucket.org and I get the following output:
C:\mypath>plink -v hg#bitbucket.org
"skipped for briefness"
Access granted
Opened channel for session
Server refused to allocate pty
Started a shell/command
conq: invalid command syntax
Server sent command exit status 0
Disconnected: All channels closed
My friend got the same error when he tried it on his PC. Can you help explain what the problem is or how to debug?
Running plink ssh://hg#bitbucket.org gives Using username ssh://hg and Disconnected: No supported authentication methods available.
Thanks for your help,
Kevin
You cannot connect to Bitbucket like that and get a login shell -- their backend process (called conq) will only accept Mercurial commands. With TortoiseHg, you don't have to do anything special -- so hg push ssh://hg#bitbucket.org/... should just work out of the box.
Using HTTPS is generally a nicer option for Bitbucket and as we discussed on IRC, there are plenty of ways to cache the passwords.

Resources