Help with phplogcon!!

Discussion in 'Programming/Scripts' started by BigThetan, May 28, 2010.

  1. BigThetan

    BigThetan New Member

    Hi I am running a Ubuntu rsyslog Server and I am trying to manage my logs thru a web interface. I was following the How To @ http://www.unix-tutorials.com/go.php?id=2758 and When I got to step 5 I tried PHPLOGCON config I get this message after i finish entering the setup info.


    Code:
    Checking users input... Done!
    Creating required tables... 
    Database error: Cannot connect to database-server 
    mysql error: Lost connection to MySQL server at 'reading initial communication packet', system error: 111 
    mysql error number: 2013
    Date: 28.05.2010 @ 01:59
    Script: /phplogcon/install/perform.php
    Referer: http://10.78.46.206/phplogcon/install/install.php
    can anyone assist me with this. Mysql is up and listening
     
  2. falko

    falko Super Moderator Howtoforge Staff Moderator HowtoForge Supporter ISPConfig Developer

    What's the output of
    Code:
    netstat -tap
    ?
     
  3. BigThetan

    BigThetan New Member

    Thanks for responding. This what I get

    Code:
    (No info could be read for "-p": geteuid()=1000 but you should be root.)
    Active Internet connections (servers and established)
    Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
    tcp        0      0 localhost:mysql         *:*                     LISTEN      -               
    tcp        0      0 *:www                   *:*                     LISTEN      -               
    tcp        0      0 *:ssh                   *:*                     LISTEN      -               
    tcp        0      0 localhost:ipp           *:*                     LISTEN      -               
    tcp        0      0 *:shell                 *:*                     LISTEN      -               
    tcp        0      0 10.78.46.206:shell      10.78.46.138:47788      ESTABLISHED -               
    tcp        0      0 10.78.46.206:ssh        10.78.46.138:57231      ESTABLISHED -               
    tcp6       0      0 [::]:ssh                [::]:*                  LISTEN      -               
    tcp6       0      0 localhost:ipp           [::]:*                  LISTEN      -               
    tcp6       0      0 [::]:shell              [::]:*                  LISTEN      -    
     
  4. falko

    falko Super Moderator Howtoforge Staff Moderator HowtoForge Supporter ISPConfig Developer

    Can you try to make MySQL listen on all interfaces (not just localhost)?
     
  5. BigThetan

    BigThetan New Member

    Thanks for your reply. I'm a bit of a newb with Linux. how would I go about making it listen on other interfaces?
     
  6. falko

    falko Super Moderator Howtoforge Staff Moderator HowtoForge Supporter ISPConfig Developer

  7. BigThetan

    BigThetan New Member

    Hi So I got MySql to listen on all interfaces. Thanks for the reference. However I am still not able to get phplogcon to connect to the database i get the following error now:

    Code:
    .: phpLogCon Installation :.
    
    
    Checking users input... Done!
    Creating required tables... 
    Database error: Cannot connect to database-server 
    mysql error: Host '10.78.46.206' is not allowed to connect to this MySQL server 
    mysql error number: 1130
    Date: 07.06.2010 @ 01:38
    Script: /phplogcon/install/perform.php
    Referer: http://10.78.46.206/phplogcon/install/install.php
    
    that ip address is the address of the server itself. thanks for your help thus far.
     
  8. falko

    falko Super Moderator Howtoforge Staff Moderator HowtoForge Supporter ISPConfig Developer

    Please take a look at the mysql.user table. Is there a user with the host 10.78.46.206 or %?
     
  9. BigThetan

    BigThetan New Member

    I was doing some research on mysql commands and i did not see the one that would show me how to view that table. Could you point me in the right direction
     
  10. falko

    falko Super Moderator Howtoforge Staff Moderator HowtoForge Supporter ISPConfig Developer

    I suggest you install phpMyAdmin to take a look at your tables.
     
  11. BigThetan

    BigThetan New Member

    ok thanks I will let you know what the result is for mysql.user table
     
  12. BigThetan

    BigThetan New Member

    I was able to view the mysql.user table through phpmyadmin. There is a user with the host 10.78.46.206. It actually says Log-Server1, which is what I named my server.
     
  13. falko

    falko Super Moderator Howtoforge Staff Moderator HowtoForge Supporter ISPConfig Developer

    Can you replace 10.78.46.206 or Log-Server1 with a "%" (without quotation marks)? Restart MySQL. Does it work then?
     
  14. BigThetan

    BigThetan New Member

    That seemed to work. What did inserting the "%" do? I got the following message and error:

    Code:
    Checking users input... Done!
    Creating required tables... Done!
    Inserting values into tables... Done!
    Creating your config file (config.php)... 
    Error: The file '../config.php' is not writeable. Please check the permissions
    
    Go back and correct this!
    ..:: Go back to installation ::..
    
    
    I am assuming I need to change the permissions on that file so that it can write to it.
     
  15. BigThetan

    BigThetan New Member

    Thanks a bunch. I have been able to get phpLogCon working. I just need to figure out how to populate the database with the rsyslog data? Can u point me in the right direction?
     
  16. falko

    falko Super Moderator Howtoforge Staff Moderator HowtoForge Supporter ISPConfig Developer

    % means that all hosts can connect (if they provide the correct username and password).
    Code:
    I just need to figure out how to populate the database with the rsyslog data?
    Did you configure /etc/rsyslog.conf as shown in the tutorial?
     
  17. BigThetan

    BigThetan New Member

    ok thanks fro explaining that. I followed that tutorial exactly; however, I will go back through it to see if I missed anything.
     

Share This Page