maintenance php error

General discussions here

Google Ads


maintenance php error

Postby atalon » Thu Dec 19, 2013 7:25 pm

Code: Select all
php maintenance.php cleardata 2 olderthan 86400
Num.    Facility .      Debug Message


        Critical Error occured  -       Errordetails:
        Logstream Source with ID '2' could not be found in the Database!

        Terminating now!

I arbitrarily tried ID '1' and it didn't work either. How do I find out what my Logstream Source ID is?
atalon
Avarage
 
Posts: 11
Joined: Mon Dec 16, 2013 6:38 pm

Urgent Question?

  • Pulling out your Hair?
  • Wasting Time and Money?
  • Deadline Approaching?

Re: maintenance php error

Postby atalon » Thu Dec 19, 2013 8:54 pm

Running RHEL6 and mysql by the way.
atalon
Avarage
 
Posts: 11
Joined: Mon Dec 16, 2013 6:38 pm

Re: maintenance php error

Postby alorbach » Fri Dec 20, 2013 9:16 am

Hi,

take a look to the querystring when you run a search in Loganalyzer. It contains the logstream ID in it's parameters.

best regards,
Andre Lorbach
alorbach
Site Admin
 
Posts: 1627
Joined: Thu Feb 13, 2003 11:55 am

Re: maintenance php error

Postby atalon » Fri Dec 20, 2013 2:29 pm

This is what I see below. IF the stream id is "1123" then each entry has its own number, so how to I say all numbers before a date or so many days for the maintenance tool?

Image
atalon
Avarage
 
Posts: 11
Joined: Mon Dec 16, 2013 6:38 pm

Re: maintenance php error

Postby alorbach » Fri Jan 03, 2014 12:07 pm

Get the LogStreamID by looking at the selected source on the upper right.
alorbach
Site Admin
 
Posts: 1627
Joined: Thu Feb 13, 2003 11:55 am

Re: maintenance php error

Postby atalon » Tue Mar 11, 2014 5:54 pm

The only source shown is "My Syslog Source" how does this translate to a number to put in the command for the maintenance page? Or do I type out the words in quotes?
atalon
Avarage
 
Posts: 11
Joined: Mon Dec 16, 2013 6:38 pm

Re: maintenance php error

Postby alorbach » Wed Mar 12, 2014 10:14 am

Take a look to the URL, it contains an ID parameter.
alorbach
Site Admin
 
Posts: 1627
Joined: Thu Feb 13, 2003 11:55 am

Re: maintenance php error

Postby atalon » Thu Mar 13, 2014 3:41 pm

The URL is shown in the picture above and it only shows the uID (message ID) and not the LogStreamID as I understand it. Maybe you can show me a picture of what you are trying to get me to see since it is not showing up in my picture and we are not understanding each other.
atalon
Avarage
 
Posts: 11
Joined: Mon Dec 16, 2013 6:38 pm

Re: maintenance php error

Postby alorbach » Fri Mar 14, 2014 12:55 pm

Kindly go to the index, switch source and switch back. You will see the sourceid in the url parameters.

best regards,
Andre Lorbach

PS: Alternative go to the Admin Center and look into the Sources Admin.
alorbach
Site Admin
 
Posts: 1627
Joined: Thu Feb 13, 2003 11:55 am

Re: maintenance php error

Postby atalon » Fri Mar 14, 2014 2:04 pm

There is only 1 source. There is no switching.

I could not get the userDB working on Redhat 6.4 so I don't have an admin center. (or am I mistaken?)
atalon
Avarage
 
Posts: 11
Joined: Mon Dec 16, 2013 6:38 pm

Re: maintenance php error

Postby alorbach » Fri Mar 14, 2014 4:59 pm

Then take a look to the config.php, at the end you should see the configured sourceid.

best regards,
Andre
alorbach
Site Admin
 
Posts: 1627
Joined: Thu Feb 13, 2003 11:55 am

Re: maintenance php error

Postby atalon » Fri Mar 14, 2014 8:30 pm

This still is not working. Here is the end of the file with the SourceID defined.
Code: Select all
$CFG['DefaultSourceID'] = 'Source1';

$CFG['Sources']['Source1']['ID'] = 'Source1';
$CFG['Sources']['Source1']['Name'] = 'My Syslog Source';
$CFG['Sources']['Source1']['ViewID'] = 'SYSLOG';
$CFG['Sources']['Source1']['SourceType'] = SOURCE_DB;
$CFG['Sources']['Source1']['DBTableType'] = 'monitorware';
$CFG['Sources']['Source1']['DBType'] = DB_MYSQL;
$CFG['Sources']['Source1']['DBServer'] = 'localhost';
$CFG['Sources']['Source1']['DBName'] = 'rsysdb';
$CFG['Sources']['Source1']['DBUser'] = 'rsyslog';
$CFG['Sources']['Source1']['DBPassword'] = 'XXXXX';
$CFG['Sources']['Source1']['DBTableName'] = 'SystemEvents';
$CFG['Sources']['Source1']['DBEnableRowCounting'] = true;



And here are the different iterations I tried for the source id
Code: Select all
 php maintenance.php cleardata Source1 olderthan 86400
Num.    Facility .      Debug Message


        Critical Error occured  -       Errordetails:
        Logstream Source with ID '0' could not be found in the Database!

        Terminating now!
[root@vseapps029 cron]# php maintenance.php cleardata "Source1" olderthan 86400
Num.    Facility .      Debug Message


        Critical Error occured  -       Errordetails:
        Logstream Source with ID '0' could not be found in the Database!

        Terminating now!
[root@vseapps029 cron]# php maintenance.php cleardata 1 olderthan 86400
Num.    Facility .      Debug Message


        Critical Error occured  -       Errordetails:
        Logstream Source with ID '1' could not be found in the Database!

        Terminating now!
[root@vseapps029 cron]# php maintenance.php cleardata 'Source1' olderthan 86400
Num.    Facility .      Debug Message


        Critical Error occured  -       Errordetails:
        Logstream Source with ID '0' could not be found in the Database!

        Terminating now!


So the error messages would suggest that it should be a number or the maintenance.php is expecting a number when it is a string.
atalon
Avarage
 
Posts: 11
Joined: Mon Dec 16, 2013 6:38 pm

Re: maintenance php error

Postby alorbach » Mon Mar 17, 2014 10:28 am

There is a typo in your command:
Code: Select all
php maintenance.php clea[b]n[/b]data Source1 olderthan 86400


Anyway there is indeed a bug in the maintenance script which hasn't been detected before,
The sourceid is forced to an integer which causes the script to fail.

To fix this please edit mainrtenance.php, search for:
Code: Select all
      // Set to SourceID property!
      $content['SOURCEID'] = intval( $_SERVER["argv"][2] );


replace with
Code: Select all
      // Set to SourceID property!
      $content['SOURCEID'] = $_SERVER["argv"][2];


best regards,
Andre Lorbach
alorbach
Site Admin
 
Posts: 1627
Joined: Thu Feb 13, 2003 11:55 am

Re: maintenance php error

Postby atalon » Wed Mar 19, 2014 5:50 pm

This worked. I am now able to use the maintenance.php "script"

Also please remove the DBpassword from my post above. I can't seem to edit the post.
atalon
Avarage
 
Posts: 11
Joined: Mon Dec 16, 2013 6:38 pm

Re: maintenance php error

Postby rgerhards » Wed Mar 19, 2014 5:53 pm

I removed one password, let me know if there are more. Edits are not permitted after a while to keep the threat consistent (it is really anoying when someone edits days later and the replies out of the sudden make no more sense - this *has* hapened).

Rainer
rgerhards
Site Admin
 
Posts: 3807
Joined: Thu Feb 13, 2003 11:57 am

Google Ads



Return to General

Who is online

Users browsing this forum: No registered users and 0 guests

cron