Error when adding a view

General discussions here

Google Ads


Error when adding a view

Postby paladin1974 » Fri Jul 23, 2010 1:14 pm

Hi all,
I need to store a timestamp with date/time (including milliseconds) to postgreSql and managed to do it, even so as string and not as Date or timestamp type.
Now, I wanted to create a view which shows this high_precision_timestamp together with three or four other SYSLOG information items which are stored in the DB.

First I add the high_precision_timestamp to Fields tab in the Admin Center. Then I added an DBMapping entry. So far so good, but when I want to add a view, LogAnalyser responds with an "Critical Error occured" message. An internal error seems to have occured. (see attachment)

Unfortunatly, I haven't found any documentation about the functionality/dependencies of View/Field/DBMapping settings . Is there documentation on these topics available?

Any help is welcome!
By the way, I am running LogAnalyzer 3.0.0.
Attachments
logAnalyser_failure_on_add_view.jpg
logAnalyser_failure_on_add_view.jpg (15.74 KiB) Viewed 95 times
paladin1974
New
 
Posts: 3
Joined: Fri Jul 23, 2010 8:09 am

phpLogCon professional services

  • Custom phpLogCon configuration?
  • Maintenance Contract?
  • Installation support?

Re: Error when adding a view

Postby paladin1974 » Mon Jul 26, 2010 1:59 pm

Servus,
I have to make an addition. Sorry, I have just now enabled the debug output. Created user and group and assigned a newly created view to the goup, but the error still exist and LogAnalyzer logs following ErrorMessage to (r)SysLog:

LogAnalyzer[15446]: DB_PrintError: Database error: Invalid SQL: INSERT INTO logcon_views (DisplayName, Columns, userid, groupid) #012#011#011#011#011#011#011#011VALUES ('test', #012#011#011#011#011#011#011#011'devicereportedtime, msg, logtime_high_precision, FROMHOST',#012#011#011#011#011#011#011#011null, #012#011#011#011#011#011#011#0111 #012#011#011#011#011#011#011#011) <br>mysql error:You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version ....

Well, I am a bit puzzled about the #012#011... pattern which I never seen before, should I?

Guess, this should be something like an container?
paladin1974
New
 
Posts: 3
Joined: Fri Jul 23, 2010 8:09 am

Re: Error when adding a view

Postby alorbach » Fri Jul 30, 2010 8:33 am

Hi,

very odd. Is this really a clean installation or have you modified the codefiles?
Because to be honest I have no idea from where this #011 strings come, and how they end up in the middle of the SQL Statement.

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

Re: Error when adding a view

Postby rgerhards » Fri Jul 30, 2010 9:55 am

not sure if that helps anything, but 011 is 9, thus US ASCII tab if encoded in octal. #octal is something that rsyslog does by default for control characters, but I don't see how this could be related here...
rgerhards
Site Admin
 
Posts: 2831
Joined: Thu Feb 13, 2003 11:57 am

Re: Error when adding a view

Postby manikutty » Fri Aug 06, 2010 11:13 am

I too have the similar problem. I have 3.0.1 version of LogAnalyzer and PHP 5.0.4 running on Fedora 4.
Please help.

Thanks
MK
manikutty
Avarage
 
Posts: 11
Joined: Fri Aug 06, 2010 9:40 am

Re: Error when adding a view

Postby manikutty » Fri Aug 06, 2010 11:21 am

manikutty wrote:I too have the similar problem. I have 3.0.1 version of LogAnalyzer and PHP 5.0.4 running on Fedora 4.
Please help.

Thanks
MK


Also I do not see any error messages or strange chars on syslog or web server logs.
manikutty
Avarage
 
Posts: 11
Joined: Fri Aug 06, 2010 9:40 am

Re: Error when adding a view

Postby Burn » Mon Aug 09, 2010 5:19 am

manikutty wrote:
manikutty wrote:I too have the similar problem. I have 3.0.1 version of LogAnalyzer and PHP 5.0.4 running on Fedora 4.
Please help.

Thanks
MK


Also I do not see any error messages or strange chars on syslog or web server logs.

I think you can start with updating your software
Burn
Frequent Poster
 
Posts: 60
Joined: Wed Jan 20, 2010 7:15 am

Re: Error when adding a view

Postby manikutty » Thu Aug 12, 2010 7:31 am

Burn wrote:
manikutty wrote:
manikutty wrote:I too have the similar problem. I have 3.0.1 version of LogAnalyzer and PHP 5.0.4 running on Fedora 4.
Please help.

Thanks
MK


Also I do not see any error messages or strange chars on syslog or web server logs.

I think you can start with updating your software


I found the problem. This was happening due to a code bug in views.php. The logcon_views table has a column with name as
'Columns' which I think is a reserved word in mysql. The query in the code was
$sqlquery = "INSERT INTO " . DB_VIEWS. " (DisplayName, Columns, userid, groupid) . I added backticks to the word
Columns and it worked !.
Here is the modified query :
$sqlquery = "INSERT INTO " . DB_VIEWS. " (DisplayName, `Columns`, userid, groupid)

-mk
manikutty
Avarage
 
Posts: 11
Joined: Fri Aug 06, 2010 9:40 am

Google Ads



Return to General

Who is online

Users browsing this forum: No registered users and 1 guest

cron