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


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

Reply via email to