Bacula-users

[Bacula-users] Config token too long - limit of 500 characters?

2014-03-23 15:13:32
Subject: [Bacula-users] Config token too long - limit of 500 characters?
From: Dan Langille <dan AT langille DOT org>
To: bacula-users <bacula-users AT lists.sourceforge DOT net>
Date: Sun, 23 Mar 2014 14:53:38 -0400
For the record, given that I’ve found this error in the archives and did not 
find the answer.

I was working on a COPY job today, expanding the SQL to help with some testing. 
I have encountered the config token limit.

The error is:

###
$ sudo service bacula-dir restart
Stopping bacula_dir.
Waiting for PIDS: 92978.
Starting bacula_dir.
23-Mar 18:48 bacula-dir: ERROR TERMINATION at lex.c:268
Config token too long, file: /usr/local/etc/bacula/client-crey.conf, line 104, 
begins at line 87
/usr/local/etc/rc.d/bacula-dir: WARNING: failed to start bacula_dir
###


The problem lines are:

###
  Selection Pattern = "
SELECT DISTINCT J.JobId, J.StartTime
   FROM Job J, Pool P
   WHERE P.Name = 'IncrFile'
     AND P.PoolId = J.PoolId
     AND J.Type = 'B'
     AND J.JobStatus IN ('T','W')
     AND J.jobBytes > 0
     AND J.JobId NOT IN
         (SELECT PriorJobId
            FROM Job
           WHERE Type IN ('B','C')
             AND Job.JobStatus IN ('T','W')
             AND PriorJobId != 0)
     AND J.endtime > current_timestamp - interval '21 day'
   AND J.jobid = 165750
ORDER BY J.StartTime
  LIMIT 1
“
###

If I remove a character from the query, any character, the problem goes away.

It appears that the query cannot be more than 500 characters including 
beginning and ending quotes.

-- 
Dan Langille - http://langille.org

Attachment: signature.asc
Description: Message signed with OpenPGP using GPGMail

------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/13534_NeoTech
_______________________________________________
Bacula-users mailing list
Bacula-users AT lists.sourceforge DOT net
https://lists.sourceforge.net/lists/listinfo/bacula-users
<Prev in Thread] Current Thread [Next in Thread>