问题: I am trying to connect to a postgres database installed in a remote server using the following command: psql -h host_ip -U db_username -d db_name This the error that occurs: psql: could not connect to server: Connection refused Is the server runn…
Oracle Linux 6.8 PostgreSQL Server IP: 192.168.10.220 Windows 7 x64 pgAdmin Custom Port IP: 192.168.10.2 Unable to connect to server: could not connect to server: Connection refused (0x0000274D/10061) Is the server running on host "192.168.10.220&quo…
nginx一直报错, 2016/12/02 10:23:19 [error] 1472#0: *31 connect() failed (111: Connection refused)while connecting to upstream, client: 101.18.123.107, server: localhost 网上说是php相关的,但是我没有使用php. 我这边是因为远程服务器(client)要ping我的服务器,但是我的服务器禁用了ping,一直出错.允许ping即可.…
安装好nginx,php环境后,配置虚拟主机,结果访问后就报502 gateway,查看日志文件后,显示错误如下: 2019/04/29 16:24:39 [error] 19433#19433: *1 connect() failed (111: Connection refused) while connecting to upstream, client: 192.168.1.52, server: 192.168.1.222, request: "GET / HTTP/1.1"…
公司网站搬迁到新服务器后,发现站点访问不了,network里面提示502,查看相关的server配置,感觉没有什么问题,经过测试发现txt.html.等非php文件能够直接访问,也就是php访问不了,初步断定有可能是php-fpm没有安装或者没有启动导致. 首先判断php-fpm是否已经安装,没有安装的情况就需要先安装php-fpm,安装可以参数相关资料. 确定好服务器已经安装了php-fpm之后,查看是否已经启动或者直接重启: [root@izwz9glf2r6p2z8ytslvblz /]#…
最近在用docker跑rails,也遇到了一些坑,这里记录一下. 首先build项目: docker-compose build 然后就开始报错了: psql: could not connect to server: No such file or directory Is the server running locally and accepting connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432&q…
嗯哼,刚装了个ubuntu的lnmp,我的天啊,踩的坑比我脂肪还多了 比如刚装完的时候访问显示502, 也不知道什么问题,就去看了一下nginx日志  /var/log/nginx/error.log,发现了这个错误 2018/06/03 13:38:23 [error] 21332#21332: *301 connect() failed (111: Connection refused) while connecting to upstream, client: 115.159.183.71…
错误提示: psql: could not connect to server: No such file or directory Is the server running locally and accepting connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"?  出现该问题的很多,以下是目前碰到的几种情况,之后碰到继续补充:  1.删除了/tmp路径中的.s.PGSQL.5432 与.…
一个邮件发送问题,整整弄了我一周时间,起因是这样的,之前弄的一个网站,需要在邮箱里面认证之后才可以注册成功.网站上线了差不多一年之后,客户突然跟我说,网站不能注册了,然后我就查看了一下代码. 发现报这个错误:SMTP -> ERROR: Failed to connect to server: Connection timed out (110)   smtp connect() failed: 这是我的配置. 然后我就想,之前都是可以用的,那会不会可能是客户在邮箱里面更改客户端密码呢?然后我就…
使用nginx时, 有可能遇到connect() failed (111: Connection refused) while connecting to upstream的问题. 如果upstream是fastcgi://127.0.0.1:9000,造成这个问题的原因大致有三个 1.php-fpm没有安装 centos安装php php-fpm 以及 配置nginx 2.php-fpm没有运行 可查看端口是否存在,默认端口是9000 netstat -ant | /usr/local/php…
由于环境变量 PGHOST配置不当引起的 postgres@pgdb-> psql psql: could not connect to server: No such file or directory Is the server running locally and accepting connections on Unix domain socket "/tmp/.s.PGSQL.1921"? 若环境变量PGHOST未配置,且psql不加-h命令的时候,则默认使用的是数据…
今天访问公司的网站突然报错,抛出一些英文,提示看一下Nginx的error.log日志: cd  /usr/local/nginx/logs/  看到了error.log ,下一步 tail -n 20 error.log  看到了报错的内容: connect() failed (111: Connection refused) while connecting to upstream 从英文可以看出连接PHP进程管理器失败,于是看了一下PHP进程管理器的状态,service php-fpm s…
错误提示: psql: could not connect to server: No such file or directory Is the server running locally and accepting connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"? 出现该问题的很多,以下是目前碰到的几种情况,之后碰到继续补充: 1.删除了/tmp路径中的.s.PGSQL.5432 与.s.…
postgresql报错: psql: could not connect to server: No such file or directory         Is the server running locally and accepting         connections on Unix domain socket "/tmp/.s.PGSQL.5432"? 1.可能是服务没启动,以下3中启动方式: (1) postmaster -D /usr/local/pgsq…
配置好lamp后,在浏览器中运行程序后,出现上面的错误. 转自:http://www.xuejiehome.com/blread-1828.html I'm experiencing 502 gateway errors when accessing a PHP file in a directory (http://domain.com/dev/index.php), the logs simply says this: // :: [error] #: * connect() failed…
php-fpm没有运行 执行如下命令查看是否启动了php-fpm,如果没有则启动你的php-fpm即可 查看: netstat -ant | grep 9000 执行 /usr/local/php/sbin/php-fpm…
php-fpm没有运行 执行如下命令查看是否启动了php-fpm,如果没有则启动你的php-fpm即可 netstat -ant | grep 9000 没有运行为空,有运行显示 tcp 0 0 127.0.0.1:9000 0.0.0.0:* LISTEN 启动方法 sudo /usr/local/php/sbin/php-fpm //sudo 启动 /usr/local/php/sbin/php-fpm -R //以root身份启动 php-fpm队列满了 php-fpm.conf配置文件p…
遇到这种情况, 首先 1.检查php-fpm是否启动---------如果没启动->启动, 2.用命令 netstat -ant | grep 9000 查看php-fpm进程,如果没启动->启动,但是还有一种情况,自己已经启动了,但是用这个命令还是什么也不显示,那么请往下看 3.其实这种情况还是 php与nginx没有配置好,解决方法如下: 看下nginx的配置的端口,和www.conf中的listen是否一致 vim /etc/php/7.2/fpm/pool.d/www.conf lis…
新lnmp环境调试项目时,nginx报错如下: 解决: 发现php-fpm.conf是以套接字方式通信,而nginx是以端口方式通信,见下图: 将nginx.conf修改为如下,重新reload即可…
SQL Server Connection Pooling (ADO.NET) Connecting to a database server typically consists of several time-consuming steps. A physical channel such as a socket or a named pipe must be established, the initial handshake with the server must occur, the…
connect() failed (111: Connection refused) while connecting to upstream fastcgi://127.0.0.1:9000 netstat -ant | grep 9000 vim /etc/php/7.0/fpm/php-fpm.conf or /etc/php/7.0/fpm/pool.d/www.conf 发现 listen = /run/php/php7.0-fpm.sock 修改nginx fastcgi_pass…
在进入mongo的时候,出现在下面错误信息.那如何解决呢? 标记一下,以便下次理碰的到时候,有个参考. warning: Failed to connect to 127.0.0.1:27017, reason: errno:111 Connection refused Error: couldn't connect to server 127.0.0.1:27017 (127.0.0.1), connection attempt failed at src/mongo/shell/mongo.…
最近遇到了nginx疯狂抛错,access.log一天一共5W多条,但error.log中有大概9K多条,基本都是111: Connection refused,这到底是为什么呢? 从日志看起 我们还是先来看日志.我提取了一条error.log当中抛错的日志(稍微分一下行,否则实在太长,敏感信息稍微处理了一下): 2019/06/06 10:09:45 [error] 28652#0: *883239 connect() failed (111: Connection refused) whil…
请问,我在win7上学习使用phpmailer时,出现这种错误怎么处理啊? SMTP ERROR: Failed to connect to server: (0) SMTP connect() failed. SMTP connect() failed. 我php用的是apache,win7防火墙关了,用的邮箱也开启smtp功能了 smtp没连接上,或者你的用户名密码错误 追问 用户名密码没错啊?我开过了smtp 我也检查了allow_url_fopen = On extension=php_…
配置docker网络flannel时,配置etcd的key的时候出现以下错误 Error:  client: etcd cluster is unavailable or misconfigured; error #0: dial tcp 127.0.0.1:4001: getsockopt: connection refused; error #1: dial tcp 127.0.0.1:2379: getsockopt: connection refused error #0: dial t…
Issue : 通过 vSphere 连接VM控制台的时候, 报错       Unable to connect to the MKS : Failed to connect to server XXXXXX:903 Error : Unable to connect to the MKS : Failed to connect to server XXXXXX:903 Case :ESX防火墙阻止903端口.此端口用于通过控制台管理虚拟机. Solution :  我们可以用代理 “vmau…
如何解决远程连接mysql出现Can’t connect to MySQL server on (111 “Connection refused”)的问题 开放Mysql的远程连接 在服务器上登录mysql,然后执行以下的命令. 登录mysql: /usr/local/mysql-5.6/bin/mysql -u root -p 执行赋权的命令: MySQL> GRANT ALL PRIVILEGES ON *.* TO 'root'@'%'IDENTIFIED BY '123456' WITH…
com.microsoft.sqlserver.jdbc.SQLServerException: 通过端口 1433 连接到主机 localhost 的 TCP/IP 连接失败.错误:“Connection refused: connect.请验证连接属性,并检查 SQL Server 的实例正在主机上运行,且在此端口接受 TCP/IP 连接,还要确保防火墙没有阻止到此端口的 TCP 连接.”. 在命令行中输入:telnet localhost 1433,连接不上: 检查下配置:服务和连接的外围…
1. Mysql连接问题 远程访问mysql或者通过docker访问宿主机mysql经常会碰到下面的问题: Can't connect to MySQL server on (111 "Connection refused") 解决 找到自己MySQL数据库配置文件的位置,编辑 /etc/mysql/mysql.conf.d# vi mysqld.cnf 将 bind_address 127.0.0.1 注释掉 2. 开放远程连接后,会出现第二个问题: "Host 'x.x.…
python代码在linux终端中执行时报错: Unable to init server: Could not connect: Connection refused Unable to init server: 无法连接: Connection refused 解决办法: 在要执行的python文件里加入以下两句代码: 切记:在最开头添加. import matplotlib matplotlib.use('Agg')…