lists.netmrg.net lists.netmrg.net
NetMRG discussion and support
 
FAQ :: Search :: Memberlist :: Usergroups :: Register
Profile :: Log in to check your private messages :: Log in

Error connecting on new install

 
Post new topic   Reply to topic    lists.netmrg.net Forum Index -> Support
Author Message
cantripnet
Helper


Joined: 09 Dec 2004
Posts: 11

PostPosted: Thu Mar 10, 2005 2:41 am    Post subject: Error connecting on new install Reply with quote

well my first install of NetMRG worked great..

my second attempt has not been as friendly
I am installing on Fedora RC3 and with a lot of trial and error I got it to compile and make install ok

all of the other installation instructions appeared to have worked ok however....

the web page shows
[DB_ERROR:: Cannot connect to the database server.

and the httpd error_log shows

Wed Mar 09 18:30:37 2005] [error] [client 127.0.0.1] File does not exist: /var/www/html/favicon.ico
[client 127.0.0.1] PHP Warning: mysql_connect(): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (13) in /var/www/netmrg/lib/database.php on line 33

mysql -u netmrguser --password=netmrgpass

logs in ok

I am not that experienced at all of this and have tried and retried the install instructions

Any advice or other places to look in the logs to see what is going on?
rrdtool is 1.0.49
php -v gives me

PHP Warning: Unknown(): Invalid library (maybe not a PHP library) 'rrdtool.so' in Unknown on line 0
PHP 4.3.9 (cgi) (built: Oct 20 2004 14:52:04)

( does the first error there mean my rrdtool install is not dont correctly?



.
Back to top
silfreed
Site Admin


Joined: 19 Jan 2003
Posts: 394
Location: Shippensburg, PA, USA

PostPosted: Thu Mar 10, 2005 5:23 pm    Post subject: Re: Error connecting on new install Reply with quote

cantripnet wrote:
mysql -u netmrguser --password=netmrgpass


Try connecting to the socket directly from the mysql client, like so:
Code:
mysql -u netmrguser --password=netmrgpass -S /var/lib/mysql/mysql.sock


cantripnet wrote:
PHP Warning: Unknown(): Invalid library (maybe not a PHP library) 'rrdtool.so' in Unknown on line 0
PHP 4.3.9 (cgi) (built: Oct 20 2004 14:52:04)
( does the first error there mean my rrdtool install is not dont correctly?


This error is normal when you have the php-rrdtool package installed (not required by NetMRG) - your RRDtool install is fine.

-Doug
Back to top
cantripnet
Helper


Joined: 09 Dec 2004
Posts: 11

PostPosted: Thu Mar 10, 2005 6:55 pm    Post subject: Reply with quote

thank you-- that invalid library had me a little worried

That seemed to connect just swell

[root@mrtg httpd]# mysql -u netmrguser --password=netmrgpass -S /var/lib/mysql/mysql.sock
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 229 to server version: 3.23.58

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql>

I confirmed that the .xml in etc has the correct paths
<netmrg>
<database>
<host>localhost</host>
<user>netmrguser</user>
<password>netmrgpass</password>
<db>netmrg</db>
<socket></socket>
<port></port>
<timeout>10</timeout>
</database>
<paths>
<rrdtool>/usr/bin/rrdtool</rrdtool>
<lockfile>/var/log/netmrg/lockfile</lockfile>
<runtimefile>/var/log/netmrg/runtime</runtimefile>
<libexec>/usr/libexec/netmrg</libexec>
<rrds>/var/lib/netmrg/rrd</rrds>
<webfileroot>/var/www/netmrg</webfileroot>
</paths>
all seems ok
Back to top
silfreed
Site Admin


Joined: 19 Jan 2003
Posts: 394
Location: Shippensburg, PA, USA

PostPosted: Thu Mar 10, 2005 7:11 pm    Post subject: Reply with quote

Try connecting as a non-root user; su - netmrg, or login as your own user and see if you can still connect to the server with the same command.

-Doug
Back to top
cantripnet
Helper


Joined: 09 Dec 2004
Posts: 11

PostPosted: Fri Mar 11, 2005 11:02 pm    Post subject: Reply with quote

It works fine as myself with the same command
and I have added no rights to the pellis user.

I also tried adding the path in the socket area of the xml, but to no avail
Back to top
cantripnet
Helper


Joined: 09 Dec 2004
Posts: 11

PostPosted: Tue Mar 15, 2005 6:17 pm    Post subject: Reply with quote

Connecting to mysql seems ok and a status seems to look like it is on the right db,host, and user
why I am using a latin1 charset - I do not know
but I issued the command as a non su so it seems to run ok there



mysql Ver 11.18 Distrib 3.23.58, for redhat-linux-gnu (i386)

Connection id: 1655
Current database: netmrg
Current user: netmrguser@localhost
Current pager: stdout
Using outfile: ''
Server version: 3.23.58
Protocol version: 10
Connection: Localhost via UNIX socket
Client characterset: latin1
Server characterset: latin1
UNIX socket: /var/lib/mysql/mysql.sock
Uptime: 5 days 15 hours 2 min 54 sec

Threads: 1 Questions: 5126 Slow queries: 0 Opens: 65 Flush tables: 1 Open t
ables: 30 Queries per second avg: 0.011


My php version is PHP 4.3.9 (cgi) (built: Oct 20 2004 14:52:04)
and RRDTOOL is at RRDtool 1.0.49

what is the best way to check on the versions of the other libraries needed ( libstdc++,Libxml2, and net/ucd-snmp ) ? I am unsure of a command to tell me the versions I have ( all the latest I think but I would like to confirm it)
Back to top
balleman
Site Admin


Joined: 20 Jan 2003
Posts: 282

PostPosted: Tue Mar 15, 2005 9:57 pm    Post subject: Reply with quote

libstdc++ version follows along with your gcc version. Libxml2 and net/ucd-snmp versions should be available by checking the packages that you installed that software from.

Are you having problems now, or has running the database locally fixed everything for you?
Back to top
cantripnet
Helper


Joined: 09 Dec 2004
Posts: 11

PostPosted: Wed Mar 16, 2005 12:32 am    Post subject: Reply with quote

Unluckily it is still giving the exact same error message in the webpage when I try to connect
DB_ERROR:: Cannot connect to the database server.

and the same error_log entry for httpd

[client 149.35.30.154] PHP Warning: mysql_connect(): Can't connect to local MyS
QL server through socket '/var/lib/mysql/mysql.sock' (13) in /var/www/netmrg/lib
/database.php on line 33
(END)
Back to top
balleman
Site Admin


Joined: 20 Jan 2003
Posts: 282

PostPosted: Wed Mar 16, 2005 2:40 am    Post subject: Reply with quote

Have you been able to get any other PHP/MySQL apps to work on your server? From my perspective, it looks as if this problem is not related to NetMRG directly. You might have more luck by debugging things from the PHP and MySQL end of things.
Back to top
cantripnet
Helper


Joined: 09 Dec 2004
Posts: 11

PostPosted: Fri Mar 18, 2005 4:44 pm    Post subject: Reply with quote

I could, but it was 50/50 on anything I tried.

So I started over for the 4th time but made the most bloated
Linux install ever ( I selected EVERYTHING on the Fedora install)

did rrdtool and netmrg from source and had to add the path for rrdtool
into the netmrg, it would not find it on its own.

Now it all works great-
I am sure with several more hours I could have located the specific problems and fixed them; but the complete install took less time.
Back to top
Display posts from previous:   
Post new topic   Reply to topic    lists.netmrg.net Forum Index -> Support All times are GMT
Page 1 of 1

 



smartBlue Style © 2002 Smartor
Powered by phpBB © 2001, 2002 phpBB Group