Hello Jose,

Yes, this problem that enabled saving empty runscript was fixed in Baculum here:

https://www.bacula.org/git/cgit.cgi/bacula/commit/?h=Branch-9.6&id=72e91629b33dba22a20c939af4c819731fcc611b

The fix is available in 9.6.0 and greater.

Best regards,
Marcin Haba (gani)

On Fri, 17 Apr 2020 at 18:56, Jose Alberto <j.se...@gmail.com> wrote:
>
> After several tests to rule out, I managed to find the problem:
>
> Job {
>   Name = "redhatRman-job"
>   Type = "Backup"
>   Level = "Full"
>   Messages = "Standard"
>   Storage = "MSL4048"
>   Pool = "bbdd"
>   Client = "redhat-fd"
>   Fileset = "redhat-fileset"
>   Schedule = "redhat-sch"
>   Runscript {
>   }
> }
>
> The block  Runscript in the job redhatRman-job :
>      Runscript {
>   }
>
> was the cause of the problem, I had even updated Bacula 9.4.4 to 9.6.3  and 
> Baculum 9.4.4 to 9.6.3  (Debian 9, Postgres).
>
> it should be noted that this block was not recognized as a syntax error with 
> the commands bdirjson (-t)  and bacula-dir (-dt).
>
> so it was difficult to find the possible error, especially in a file of 1935 
> line (bacula-dir.conf)
>
> I as a solvent?  I had to install Webmin (which if I could continue 
> configuring without problems) that gave me the indication, that it was then 
> something in Baculum strut,
>
> I started using webmin deleting the last configured jobs and testing the 
> answer from the following url 
> http://ipBacula:9096/api/v1/config/dir?director=s1vmbaculapro-dir
>
> erase and restore until you find the job with the problem.  delete:
>
> Runscript {
>   }
>
> in the job.
>
>
>
>
>
>
>
> On Wed, Mar 4, 2020 at 2:21 AM Marcin Haba <ganius...@gmail.com> wrote:
>>
>> Hello Jose,
>>
>> One more note. It can be less visible, because unfortunately the line
>> with command has been wrapped, but between echo and
>> json_last_error_msg() there is a space character.
>>
>> Best regards
>> Marcin Haba (gani)
>>
>> On Wed, 4 Mar 2020 at 07:12, Marcin Haba <ganius...@gmail.com> wrote:
>> >
>> > Hello Jose,
>> >
>> > It looks that something is wrong with that JSON string. Baculum uses
>> > PHP json_decode() function to decode JSON string, which doesn't show
>> > in which part of JSON string is the problem.
>> >
>> > To check what is wrong  you can try to put to a file all this JSON
>> > string from 'Parse output' line starting from [ character and ending
>> > on last ] character. After that you can use simple script on your
>> > Debian 9:
>> >
>> > echo -e "<?php\njson_decode(file_get_contents(\$argv[1]), true);\necho
>> > json_last_error_msg() . PHP_EOL;" > /tmp/json_check.php
>> >
>> > and at the end to execute it, please do:
>> >
>> > php /tmp/json_check.php path_to_your_file_with_json
>> >
>> > for example:
>> >
>> > php /tmp/json_check.php /tmp/json.out
>> >
>> > If in output you will see 'Syntax error', then please use a tool to
>> > validate JSON string that shows where exactly is the problem, for
>> > example (Perl tool in this case):
>> >
>> > $ cat path_to_your_file_with_json | json_pp
>> >
>> > for example:
>> >
>> > cat /tmp/json.out | json_pp
>> >
>> > Please share the results if you find some errors.
>> >
>> > Thanks in advance.
>> >
>> > Best regards,
>> > Marcin Haba (gani)
>> >
>> > On Wed, 4 Mar 2020 at 01:32, Jose Alberto <j.se...@gmail.com> wrote:
>> > >
>> > > Result:
>> > >
>> > > Mar 03 20:24:22 [Debug] [External] Command=Parse output, Output=[{  
>> > > "Director": {    "Name": "s1vmbaculapro-dir",    "Messages": "Daemon",   
>> > >  "QueryFile": "/opt/bacula/scripts/query.sql",    "WorkingDirectory": 
>> > > "/opt/bacula/working",    "PidDirectory": "/opt/bacula/working",    
>> > > "MaximumConcurrentJobs": 20,    "Password": "123123"  }},{  "Client": {  
>> > >   "Name": "Dataprotector-fd",    "Description": "Cliente de data 
>> > > Protector",    "Address": "172.16.100.60",    "Password": "123123",    
>> > > "Catalog": "MyCatalog"  }},{  "Client": {    "Name": "Ocs-fd",    
>> > > "Description": "Ocs inventory",    "Address": "172.16.100.161",    
>> > > "Password": "123123",    "Catalog": "MyCatalog"  }},{  "Client": {    
>> > > "Name": "Siscord-fd",    "Description": "Siscord App",    "Address": 
>> > > "172.16.100.132",    "Password": "123qwe",    "Catalog": "MyCatalog"  
>> > > }},{  "Client": {    "Name": "Wstablas-fd",    "Description": "Sicri en 
>> > > linea",    "Address": "172.16.100.107",    ........
>> > >
>> > > very extended
>> > >
>> > > final line
>> > >
>> > > File=/usr/share/baculum/htdocs/protected/API/Class/JSONTools.php, 
>> > > Line=50 (line 74, 
>> > > /usr/share/baculum/htdocs/protected/Common/Class/Logging.php)
>> > >
>> > > in bacula:   bacula-dir -t /opt/bacula/etc/bacula-dir.conf    all OK.
>> > >
>> > > bconsole:  reload     All OK.
>> > >
>> > > Edit manually bacula-dir.conf  and  add   client, fileset, schedule and 
>> > > job.  All OK.
>> > >
>> > > But with baculum  error. but  but.    edit with baculum  bacula-sd.conf 
>> > > o   fd     all ok.
>> > >
>> > >
>> > > It seems as if the file (bacula-dir.conf)  had a hidden character or 
>> > > space that worsens baculum
>> > >
>> > >
>> > >
>> > >
>> > >
>> > >
>> > > On Mon, Mar 2, 2020 at 11:39 PM Marcin Haba <ganius...@gmail.com> wrote:
>> > >>
>> > >> Hello Jose,
>> > >>
>> > >> Error 83 means that JSON tool (bdirjson in this case) returned
>> > >> something different than JSON output. To see what it is, you can
>> > >> enable debug in Baculum API. To do that you can switch in the
>> > >> following file:
>> > >>
>> > >> /usr/share/baculum/htdocs/protected/API/Config/api.conf
>> > >>
>> > >> in [api] section the option debug to "1".
>> > >>
>> > >> After that please reproduce the problem and at the end please look in a 
>> > >> file:
>> > >>
>> > >> /usr/share/baculum/htdocs/protected/API/Logs/baculum-api.log
>> > >>
>> > >> for a line with this string at the beginning:
>> > >>
>> > >> Command=Parse output
>> > >>
>> > >> Best regards,
>> > >> Marcin Haba (gani)
>> > >>
>> > >> On Tue, 3 Mar 2020 at 04:15, Jose Alberto <j.se...@gmail.com> wrote:
>> > >> >
>> > >> > Hi.
>> > >> >
>> > >> > I have bacula for more than 6 months working well. but days ago I 
>> > >> > have trouble writing in the principal's file (bacula-dir.conf)  with 
>> > >> > error:
>> > >> >
>> > >> >
>> > >> >  JSON tool output was unable to parse  83.
>> > >> >
>> > >> > But i edit  bacula-sd.conf  or  bacula-fd.conf   with baculum, all 
>> > >> > good.  no problem.
>> > >> >
>> > >> > The fields are not shown to me. example. when try add client.  the 
>> > >> > fiel Catalog  no show the value  "MyCatalog"
>> > >> >
>> > >> > But add add conf direct in the file bacula-dir.con  all fine.  Bacula 
>> > >> > run.
>> > >> >
>> > >> > Bacula. 9.4.4   Baculum 9.4.4 Debian 9  with postgres.
>> > >> >
>> > >> >
>> > >> > --
>> > >> > #############################
>> > >> > #   Sistema Operativo: Debian      #
>> > >> > #        Caracas, Venezuela          #
>> > >> > #############################
>> > >> > _______________________________________________
>> > >> > Bacula-users mailing list
>> > >> > Bacula-users@lists.sourceforge.net
>> > >> > https://lists.sourceforge.net/lists/listinfo/bacula-users
>> > >>
>> > >>
>> > >>
>> > >> --
>> > >> "Greater love hath no man than this, that a man lay down his life for
>> > >> his friends." Jesus Christ
>> > >>
>> > >> "Większej miłości nikt nie ma nad tę, jak gdy kto życie swoje kładzie
>> > >> za przyjaciół swoich." Jezus Chrystus
>> > >
>> > >
>> > >
>> > > --
>> > > #############################
>> > > #   Sistema Operativo: Debian      #
>> > > #        Caracas, Venezuela          #
>> > > #############################
>> >
>> >
>> >
>> > --
>> > "Greater love hath no man than this, that a man lay down his life for
>> > his friends." Jesus Christ
>> >
>> > "Większej miłości nikt nie ma nad tę, jak gdy kto życie swoje kładzie
>> > za przyjaciół swoich." Jezus Chrystus
>>
>>
>>
>> --
>> "Greater love hath no man than this, that a man lay down his life for
>> his friends." Jesus Christ
>>
>> "Większej miłości nikt nie ma nad tę, jak gdy kto życie swoje kładzie
>> za przyjaciół swoich." Jezus Chrystus
>
>
>
> --
> #############################
> #   Sistema Operativo: Debian      #
> #        Caracas, Venezuela          #
> #############################



-- 
"Greater love hath no man than this, that a man lay down his life for
his friends." Jesus Christ

"Większej miłości nikt nie ma nad tę, jak gdy kto życie swoje kładzie
za przyjaciół swoich." Jezus Chrystus


_______________________________________________
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users

Reply via email to