I am using laravel-gamp (https://github.com/irazasyed/laravel-gamp) to track events in my Laravel 5.2 REST server. However if I set sending method to sync I always get this error (I am using SSL):
cURL error 7: Failed to connect to ssl.google-analytics.com port 443:
Connection refused (see
http://curl.haxx.se/libcurl/c/libcurl-errors.html)
I am running Laravel on a Ubuntu VM with cURL updated to the latest version.
How can I fix this error?
Thanks
Simply it was Ubuntu iptables blocking outgoing connections for port 443
Related
I have two apps both hosted on DO through Laravel Forge and both in the same region. One hosts my application, the other is a dedicated Meilisearch server. Both are in each other's server network. I've got the correct Meilisearh credentials in my app's .env and my Scout config is correct.
I'm getting a 504 gateway time-out when visiting the home page of the app (which has a search feature) and when trying to run php artisan scout:import "App\Models\ModelName" when ssh'ed into my application server I get the following error:
MeiliSearch\Exceptions\CommunicationException
cURL error 28: Failed to connect to "SERVER IP ADDRESS" port 7700: Connection timed out
I'm not sure how else to troubleshoot this so any help is appreciated.
MeiliSearch is probably on port 80
I really tried to fix this by myself in the past 3 days but I run out of ideas.
The thing is that when I was testing the application on azure I didn't have any issues.
I already had a windows server VM, where I installed WAMP to test out the PHP app.
Everything was fine and working till I migrated the app to another hosting provider where I think they run Red Hat on the VM.
All ports are open for the IMAP and the PHP IMAP extension is enabled.
The thing is that I'm getting an error message when I try to connect to Server
name: outlook.office365.com
Port: 993
Encryption method: TLS/SSL (I tried both, but on the previous server was TLS)
Can't connect to FRA-efz.ms-acdc.office.com,993: Connection refused
Do you have any idea why this is happening?
Thank you in advance!
I have a system in JSP and DB PostgreSQL running on a CentOS 7 server however the error happened in a test VM running Lubuntu
I made an API in PHP with Laravel that sends and receives requests from an APP mobile
Until then everything was working correctly, but if I restart this server I lose the connection with the DB, it will return me this error:
SQLSTATE[08006] [7] could not connect to server: Connection refused
Is the server running on host "127.0.0.1" and accepting
TCP/IP connections on port 5432?
If I try to access the DB through pgAdmin, this returns Connecting to database ... Failed.
The VM accesses correctly through the XenCenter console, however the SSH connection that previously connected correctly is presented Network error: Conection refused
It is as if after restarting blocking all the ports, but until the firewall is disabled
[EDIT]
After some tests I discovered that the problem happens only after enabling mod_rewrite
I'm a newbie in aws and have created an ec2 instance on ubuntu server with php, mysql and apache installed where I have hosted couple of html files along with other scripting php files. The website is working fine. I have created a webservice which has to be consumed in different clients. The purpose of this webservice is to insert some values in a remote db table.
a) www.abc.com/client/add.php returns success and I cud see the values getting updated in the db table
The above webservice is working fine on a test server but when I had uploaded the same set of files on aws ec2, the webservice is giving me an error.
b) www.abc.com/client/add.php returns failure. I have checked the db configuration file, connection strings for remote host is correct.
I am also facing similar issue in integrating sms api to push sms to consumers cell. On Test server, my code is working fine and sms are pushed but same piece of code is not working on aws ec2.
I suspect, it is related to the rules in ec2 security group because of which it cannot connect to the remote mysql host and to the sms gateway.
Can any of you help me in assigning the proper rules ?
Currently I have assigned the below privileges for Inbound rules
type HTTP, port 80 for all
type Mysql port 3306 for all
All traffic for all
type SSh, port 22 for all
Do I have to assign any outbound rule as well ?
Firstly thanking #bluto for pointing me to the log files where I was able to see the errors and fix them.
My aws inbound and outbound rules were appropriate.
From the log files, I identified mysql_connect(): Access denied for user.
To fix this I had to explicitly assign the host IP address in allowable host section of the db webserver.
For the second issue wherein my SMS api was not working, I identified the error in log file
PHP Fatal error: Call to undefined method mysqli_stmt::get_result().
To fix this, I came to know that mysqlnd is required to execute Bind_result() & fetch() which was missing in my aws ubuntu server.
http://php.net/manual/en/mysqli-stmt.get-result.php
I had to install mysqlnd by the following command.
apt-get install php5-mysqlnd
Pls remember that installing mysqlnd will break your appcode. For it to work, I added the following line in the end of of php.ini file. The path of php.ini file can be find by output of php.info()
extension=mysqlnd.so
After successful installation, I saw that curl needs to be installed in the server as I was getting an error. I installed it by the below command. Ensure to restart the apache server after the installation
sudo apt-get install php5-curl
References:
Call to undefined method mysqli_stmt::get_result
https://askubuntu.com/questions/386887/install-curl-ubuntu-12-04
I have a PHP based SFTP application I created and it has been working great. Now I have to put it on a server that has a firewall. I get this error:
Message: ssh2_connect(): php_network_getaddresses: getaddrinfo failed: Name or service not known
If I turn off the firewall it works fine. The firewall accepts:
ALL outbound ports.
All inbound 443 traffic, buts drops ALL other inbound traffic.
I read something about cURL needing port 9091 inbound open but that did not work.
I tried allowing all inbound port 22 (ssh) traffic but that did not work.
I tried allowing all inbound port 80 (http) traffic but still not working.
I tried using phpseclib instead of SSH2 PECL, but still get the same type of error.
Does anyone have any idea what inbound port has to be open?
Or have any ideas on what else might be going on?