Warning: mysql_pconnect()

Post support questions that directly relate to Linux/Unix operating systems.

Moderators: Developers, Moderators

Post Reply
Plurnay
Posts: 28
Joined: Wed Jun 23, 2010 7:34 am
Location: Moncton

Warning: mysql_pconnect()

Post by Plurnay »

I deleted some log file to save some space in the /var/log/mysql folder with the rm command... Now like you guess it i cant loggin in cacti anymore...

I get this error when I try to connect

Warning: mysql_pconnect() [function.mysql-pconnect]: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) in /usr/share/php/adodb/drivers/adodb-mysql.inc.php on line 383

What should I do to fix this
thanks
everyone
Last edited by Plurnay on Mon Jul 05, 2010 12:04 pm, edited 1 time in total.
Plurnay
Posts: 28
Joined: Wed Jun 23, 2010 7:34 am
Location: Moncton

Post by Plurnay »

I can now log back in
but i dont get the graph working

this are the error in my log

07/05/2010 01:50:34 PM - RECACHE STATS: RecacheTime:2.5037 HostsRecached:3
07/05/2010 01:50:33 PM - PCOMMAND: Poller[0] Host[7] WARNING: Recache Event Detected for Host
07/05/2010 01:50:33 PM - PCOMMAND: Poller[0] Host[29] WARNING: Recache Event Detected for Host
07/05/2010 01:50:32 PM - PCOMMAND: Poller[0] Host[14] WARNING: Recache Event Detected for Host
07/05/2010 01:50:27 PM - SYSTEM STATS: Time:5.6768 Method:cmd.php Processes:1 Threads:N/A Hosts:37 HostsPerProcess:37 DataSources:265 RRDsProcessed:0
07/05/2010 01:50:27 PM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed!, Error:'1017', SQL:"select poller_output.output, poller_output.time, poller_output.local_data_id, poller_item.rrd_path, poller_item.rrd_name, poller_item.rrd_num from (poller_output,poller_item) where (poller_output.local_data_id=poller_item.local_data_id and poller_output.rrd_name=poller_item.rrd_name) "
07/05/2010 01:50:27 PM - CMDPHP: Poller[0] Time: 4.5278 s, Theads: N/A, Hosts: 36
07/05/2010 01:50:27 PM - CMDPHP: Poller[0] ERROR: A DB Exec Failed!, Error:'1017', SQL:"insert into poller_output (local_data_id, rrd_name, time, output) values (173, 'traffic_out', '2010-07-05 13:50:26', '518')'
07/05/2010 01:50:27 PM - CMDPHP: Poller[0] Host[43] DS[173] SNMP: v1: 192.168.10.18, dsname: traffic_out, oid: .1.3.6.1.2.1.2.2.1.16.3, output: 518
07/05/2010 01:50:27 PM - CMDPHP: Poller[0] ERROR: A DB Exec Failed!, Error:'1017', SQL:"insert into poller_output (local_data_id, rrd_name, time, output) values (173, 'traffic_in', '2010-07-05 13:50:26', '540')'
07/05/2010 01:50:27 PM - CMDPHP: Poller[0] Host[43] DS[173] SNMP: v1: 192.168.10.18, dsname: traffic_in, oid: .1.3.6.1.2.1.2.2.1.10.3, output: 540
07/05/2010 01:50:27 PM - CMDPHP: Poller[0] ERROR: A DB Exec Failed!, Error:'1017', SQL:"insert into poller_output (local_data_id, rrd_name, time, output) values (172, 'traffic_out', '2010-07-05 13:50:26', '518')'
07/05/2010 01:50:27 PM - CMDPHP: Poller[0] Host[43] DS[172] SNMP: v1: 192.168.10.18, dsname: traffic_out, oid: .1.3.6.1.2.1.2.2.1.16.2, output: 518
07/05/2010 01:50:27 PM - CMDPHP: Poller[0] ERROR: A DB Exec Failed!, Error:'1017', SQL:"insert into poller_output (local_data_id, rrd_name, time, output) values (172, 'traffic_in', '2010-07-05 13:50:26', '540')'
07/05/2010 01:50:27 PM - CMDPHP: Poller[0] Host[43] DS[172] SNMP: v1: 192.168.10.18, dsname: traffic_in, oid: .1.3.6.1.2.1.2.2.1.10.2, output: 540
07/05/2010 01:50:27 PM - CMDPHP: Poller[0] ERROR: A DB Exec Failed!, Error:'1017', SQL:"insert into poller_output (local_data_id, rrd_name, time, output) values (171, 'traffic_out', '2010-07-05 13:50:26', '19304160')'
07/05/2010 01:50:27 PM - CMDPHP: Poller[0] Host[43] DS[171] SNMP: v1: 192.168.10.18, dsname: traffic_out, oid: .1.3.6.1.2.1.2.2.1.16.1, output: 19304160

what can I do about that???

ps Nagios is still not wokring after i deleted some mysql-bin.0000XX
Plurnay
Posts: 28
Joined: Wed Jun 23, 2010 7:34 am
Location: Moncton

Post by Plurnay »

i do get this when i go to Technical Support
poller_output Unknown Unknown Can't find file: 'poller_output' (errno: 2)

I saw some post that say to go to mysql but i dont know how to do that i need extra information
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

Please repair the mysql tables. There's a script in the cli directory
R.
Plurnay
Posts: 28
Joined: Wed Jun 23, 2010 7:34 am
Location: Moncton

Post by Plurnay »

gandalf wrote:Please repair the mysql tables. There's a script in the cli directory
R.
i cant find that "cli" directory... where is it located?
Plurnay
Posts: 28
Joined: Wed Jun 23, 2010 7:34 am
Location: Moncton

Post by Plurnay »

Plurnay wrote:
gandalf wrote:Please repair the mysql tables. There's a script in the cli directory
R.
i cant find that "cli" directory... where is it located?

And can someone give me a big more info how to repair the mysql table... I am very new at this not sure how to do it...
Plurnay
Posts: 28
Joined: Wed Jun 23, 2010 7:34 am
Location: Moncton

Post by Plurnay »

does this makes any sense to you guys
is that what i was suposed to do?

root@NMon:/etc/cacti# mysqlcheck --auto-repair --databases cacti -u cacti -p
Enter password:
cacti.cdef OK
cacti.cdef_items OK
cacti.colors OK
cacti.data_input OK
cacti.data_input_data OK
cacti.data_input_fields OK
cacti.data_local OK
cacti.data_template OK
cacti.data_template_data OK
cacti.data_template_data_rra OK
cacti.data_template_rrd OK
cacti.graph_local OK
cacti.graph_template_input OK
cacti.graph_template_input_defs OK
cacti.graph_templates OK
cacti.graph_templates_gprint OK
cacti.graph_templates_graph OK
cacti.graph_templates_item OK
cacti.graph_tree OK
cacti.graph_tree_items OK
cacti.host OK
cacti.host_graph OK
cacti.host_snmp_cache OK
cacti.host_snmp_query OK
cacti.host_template OK
cacti.host_template_graph OK
cacti.host_template_snmp_query OK
cacti.poller OK
cacti.poller_command OK
cacti.poller_item OK
cacti.poller_output
Error : Can't find file: 'poller_output' (errno: 2)
error : Corrupt
cacti.poller_reindex OK
cacti.poller_time OK
cacti.rra OK
cacti.rra_cf OK
cacti.settings OK
cacti.settings_graphs OK
cacti.settings_tree OK
cacti.snmp_query OK
cacti.snmp_query_graph OK
cacti.snmp_query_graph_rrd OK
cacti.snmp_query_graph_rrd_sv OK
cacti.snmp_query_graph_sv OK
cacti.user_auth OK
cacti.user_auth_perms OK
cacti.user_auth_realm OK
cacti.user_log OK
cacti.version OK

Repairing tables
cacti.poller_output
Error : Can't find file: 'poller_output' (errno: 2)
error : Corrupt

I also try
root@NMon:/etc/cacti# mysql -u cacti -p -e'repair table cacti.poller_output'
Enter password:
+---------------------+--------+----------+---------------------------------------------+
| Table | Op | Msg_type | Msg_text |
+---------------------+--------+----------+---------------------------------------------+
| cacti.poller_output | repair | Error | Can't find file: 'poller_output' (errno: 2) |
| cacti.poller_output | repair | error | Corrupt |
+---------------------+--------+----------+---------------------------------------------+
root@NMon:/etc/cacti#

I dont know what to do next???
Plurnay
Posts: 28
Joined: Wed Jun 23, 2010 7:34 am
Location: Moncton

Post by Plurnay »

i cant find the cli directory or the cacti.sql file????
is it any help if I upgrade first???

Date Tue, 06 Jul 2010 10:41:41 -0300
Cacti Version 0.8.7b
Cacti OS unix
SNMP Version net-snmp
RRDTool Version RRDTool 1.2.x
Hosts 36
Graphs 135
Data Sources Script/Command: 11
SNMP: 26
SNMP Query: 114
Script Query: 1
Total: 152
Poller Information
Interval 300
Type cmd.php
Items Action[0]: 254
Action[1]: 11
Total: 265
Concurrent Processes 1
Max Threads 1
PHP Servers 1
Script Timeout 25
Max OID 10
Last Run Statistics Time:8.1262 Method:cmd.php Processes:1 Threads:N/A Hosts:37 HostsPerProcess:37 DataSources:265 RRDsProcessed:0
PHP Information
PHP Version 5.2.4-2ubuntu5.4
PHP OS Linux
PHP uname Linux NMon 2.6.24-22-virtual #1 SMP Mon Nov 24 19:55:07 UTC 2008 i686
PHP SNMP Installed
max_execution_time 30
memory_limit 16M
Plurnay
Posts: 28
Joined: Wed Jun 23, 2010 7:34 am
Location: Moncton

Post by Plurnay »

turn out I had the exact same problem...
I just truncate the table and its started working

http://forums.cacti.net/viewtopic.php?p=193589#193589

thanks
Post Reply

Who is online

Users browsing this forum: No registered users and 5 guests