Hi all,
I now have a working HA setup using heartbeat and drbd, as recommended in the 
user guide. However, now I've come to install packetfence on top I am seeing 
the following errors on startup:

Aug 08 12:32:16 pfcmd.pl(2724) FATAL: unable to connect to database: Can't 
connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) at 
/usr/local/pf/lib/pf/person.pm line 77
(pf::db::db_connect)
Aug 08 12:32:19 pfcmd.pl(2724) INFO: called file_reload_violation_config 
(pf::config::cached::file_reload_violation_config)
Aug 08 12:32:19 pfcmd.pl(2724) FATAL: unable to connect to database: Can't 
connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) at 
/usr/local/pf/lib/pf/trigger.pm line 70
(pf::db::db_connect)

I've checked, and there is no mysql.sock file in that folder. I've tried 
running a reinstall of Packetfence on the server, but still nothing.

I've had no issues like this installing Packetfence on a standalone server, so 
I'm assuming it's something to do with the drbd synching the /var/lib/mysql 
directory, however, most unusually my secondary node seems to have a more 
up-to-date version of the same directory:

Primary node:
[root@pfencedev01 ~]# cat /proc/drbd
version: 8.4.2 (api:1/proto:86-101)
GIT-hash: 7ad5f850d711223713d6dcadc3dd48860321070c build by dag@Build64R6, 
2012-09-06 08:16:10
0: cs:Connected ro:Primary/Secondary ds:UpToDate/UpToDate C r-----
    ns:4 nr:8 dw:12 dr:693 al:1 bm:1 lo:0 pe:0 ua:0 ap:0 ep:1 wo:f oos:0

[root@pfencedev01 ~]# ls /var/lib/mysql/
ibdata1  ib_logfile0  ib_logfile1  lost+found  mysql

[root@pfencedev01 ~]# df -k
Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/cciss/c0d0p2    383803492   1634824 362672580   1% /
tmpfs                  8165112         0   8165112   0% /dev/shm
/dev/cciss/c0d0p1       247919     45542    189577  20% /boot
/dev/drbd0            30962712    197724  29192176   1% /var/lib/mysql

Secondary node:
[root@pfencedev02 mysql]# cat /proc/drbd
version: 8.4.2 (api:1/proto:86-101)
GIT-hash: 7ad5f850d711223713d6dcadc3dd48860321070c build by dag@Build64R6, 
2012-09-06 08:16:10
0: cs:Connected ro:Secondary/Primary ds:UpToDate/UpToDate C r-----
    ns:396 nr:5080 dw:5660 dr:13446 al:5 bm:5 lo:0 pe:0 ua:0 ap:0 ep:1 wo:f 
oos:0

[root@pfencedev02 mysql]# ls /var/lib/mysql
ibdata1  ib_logfile0  ib_logfile1  mysql  mysql.sock  pf  test

[root@pfencedev02 mysql]# df -k
Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/cciss/c0d0p2     89229528   1568884  83128012   2% /
tmpfs                 20575424         0  20575424   0% /dev/shm
/dev/cciss/c0d0p1       247919     45592    189527  20% /boot

Any thoughts on why my mysql database is having trouble on this server?

Cheers,
Andi

-------------------------------------
Andi Morris
IT Security Officer
Cardiff Metropolitan University
T: 02920 205720
E: [email protected]<mailto:[email protected]>
--------------------------------------

------------------------------------------------------------------------------
Get 100% visibility into Java/.NET code with AppDynamics Lite!
It's a free troubleshooting tool designed for production.
Get down to code-level detail for bottlenecks, with <2% overhead. 
Download for free and get started troubleshooting in minutes. 
http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk
_______________________________________________
PacketFence-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/packetfence-users

Reply via email to