From owner-freebsd-net@FreeBSD.ORG Tue Aug 23 07:51:18 2011 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F215E106564A; Tue, 23 Aug 2011 07:51:18 +0000 (UTC) (envelope-from gadidot@gmail.com) Received: from mail-ww0-f50.google.com (mail-ww0-f50.google.com [74.125.82.50]) by mx1.freebsd.org (Postfix) with ESMTP id 645DE8FC15; Tue, 23 Aug 2011 07:51:18 +0000 (UTC) Received: by wwi36 with SMTP id 36so5763343wwi.31 for ; Tue, 23 Aug 2011 00:51:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:cc:content-type; bh=W3G8JvJy9XOCmlb04eWwhWPbBan31j1+Iq+gOMHlvoU=; b=cLL+r2qhojJvBgud8i2AmiXpMEz1niqmEb0l194ecYaCMzrEdJbzh6VClx4otGqRu9 ucSE9Jnkd10lV9yR7uEFfyCcQgu3y74d00dM0s+2rZYS4QKtuLBUhYsIGIEXZ9WWs0gF jhLWdoXjM5WdAZ3GReipNPR/c3iZgn+9MCNvM= MIME-Version: 1.0 Received: by 10.216.232.158 with SMTP id n30mr2917573weq.69.1314084568933; Tue, 23 Aug 2011 00:29:28 -0700 (PDT) Received: by 10.216.61.76 with HTTP; Tue, 23 Aug 2011 00:29:28 -0700 (PDT) Date: Tue, 23 Aug 2011 15:29:28 +0800 Message-ID: From: Gi Dot To: freebsd-pf@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: freebsd-net@freebsd.org Subject: Error - mysql_connect: Operation not permitted. X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Aug 2011 07:51:19 -0000 Hi, I'm getting the following errors in my apache22 log: [Mon Aug 22 23:09:02 2011] [error] [client 192.168.30.10] PHP Warning: mysql_connect(): Operation not permitted in /usr/local/sites/xxx/demonlords4.lib.php on line 23, referer: http://a.b.com/main.php?location=missiondungeon&action=launchstop&perform=start&mid=358 [Mon Aug 22 23:09:03 2011] [error] [client 192.168.30.10] PHP Warning: mysql_connect(): [2002] Operation not permitted (trying to connect via tcp://10.10.10.101:3306) in /usr/local/sites/xxx/demonlords4.lib.php on line 23, referer: http://a.b.com/main.php?location=group [Mon Aug 22 23:09:03 2011] [error] [client 192.168.30.10] PHP Warning: mysql_connect(): Operation not permitted in /usr/local/sites/xxx/demonlords4.lib.php on line 23, referer: http://a.b.com/main.php?location=group . . . [Tue Aug 23 07:31:46 2011] [error] [client 192.168.30.10] PHP Warning: mysql_pconnect(): MySQL server has gone away in /usr/local/sites/xxx/test.php on line 282, referer: http://a.b.com/test.php [Tue Aug 23 07:31:50 2011] [error] [client 192.168.30.10] PHP Warning: mysql_pconnect(): MySQL server has gone away in /usr/local/sites/xxx/test.php on line 282 I just wonder if it could be caused by improper configurations in my pf.conf. I have found a couple of threads where the users managed to solve the problem by lowering the value of tcp.closed. It doesn't work for me though (I lowered the value from 90s to 15s). My apache22 run on jails and managed by haproxy. Both haproxy and apache22 reside in the same server (haproxy runs on host, apache22 run on 2 jails). Database also running on a jail but on a different host. All jails are using private IP addresses. Following is my pf.conf on web server(haproxy-1.4.15 & apache-2.2.19): http://pastebin.com/HM7jWH3X And this is my pf.conf on db server (mysql-server-5.5.14): http://pastebin.com/vFB7Jagt Both servers' uname -a: 8.2-RELEASE FreeBSD 8.2-RELEASE #7: Sun Jul 17 06:32:10 CEST 2011 root@webm01.xx.xx:/usr/obj/usr/src/sys/WEBM01 amd64 Appreciate any advice offered. Thanks.