Hello Carlos, Many thanks for describing your way to find the exact problem and for the workarround. Your analyze looks correct.
I will fix it soon and I will let know here. Thanks for your help. Best regards. Marcin Haba (gani) On Mon, 22 Oct 2018 at 02:07, Catin King via Bacula-devel <bacula-devel@lists.sourceforge.net> wrote: > > > Ok guys, I seem to have stumbled upon something interesting. > > The attached bdirjson output is irrelevant due that is the one in effect > before Baculum tries to update bacula-dir.conf and it's got the correct > information. > > I performed a little bit of code change in Baculum API so even though the > configuration did not pass verifications it would be written to > bacula-dir.conf to find the actual configuration error. Turns out that > baculum would write the "MaximumVolumeBytes" property of any pool that has > any size specified between double quotes (") (like a string) making > bacula-dir -t refuse the value because it seems text and not a number to it > and complaining that it is not getting a size. > > The error message is a bit misleading since it looks like Baculum API is > trying to "convert" from the Vanilla configure file with the comments and so, > to a more redacted version, and chokes when it tries to write the > MaximumVolumeBytes that comes specified in the Default and File pools that > comes on the Vanilla bacula-dir.conf file. > > TL;DR > I found a workaround as follows: > in /usr/share/baculum/htdocs/protected/API/Class/BaculaSettings.php in the > formatDirectiveValue function, i changed this (line 430 in baculum 9.2.1) > > } elseif (is_int($value)) { > > for this: > > } elseif (is_numeric($value)) { > > Thanks, > > > Carlos > > > > > > -----Original Message----- > From: Catin King via Bacula-devel <bacula-devel@lists.sourceforge.net> > To: bacula-devel <bacula-devel@lists.sourceforge.net> > Sent: Sat, Oct 20, 2018 10:30 am > Subject: Re: [Bacula-devel] New to Bacula-GUI, Having a recurring > JSON-related error. > > Hello Guys, Sorry for the late response. > > In the attached bdirjson_output.txt is the number (it's either the "Default" > pool, or the "File", neither of which I use, I use the one I created called > "Diario" with Volume Retention of 2592000). > > { > "Pool": { > "Name": "Default", > "PoolType": "Backup", > "LabelFormat": "Default-", > "MaximumVolumes": 100, > "MaximumVolumeJobs": 5, > "MaximumVolumeBytes": 5368709120, > "VolumeRetention": 604800, > "AutoPrune": true, > "Recycle": true > } > }, > { > "Pool": { > "Name": "Diario", > "PoolType": "Backup", > "LabelFormat": "Diario-", > "MaximumVolumeBytes": 5368709120, > "VolumeRetention": 2592000, > "AutoPrune": true, > "Recycle": true > } > }, > { > "Pool": { > "Name": "File", > "PoolType": "Backup", > "LabelFormat": "Vol-", > "MaximumVolumes": 100, > "MaximumVolumeJobs": 5, > "MaximumVolumeBytes": 5368709120, > "VolumeRetention": 604800, > "AutoPrune": true, > "Recycle": true > } > }, > > > > > -----Original Message----- > From: Catin King <cgg...@aol.com> > To: bacula-devel <bacula-devel@lists.sourceforge.net> > Sent: Fri, Oct 12, 2018 6:39 pm > Subject: New to Bacula-GUI, Having a recurring JSON-related error. > > Hello Bacula Developers, > > I'm new to the project and gotta say thank you for such a fine piece of > software. > > As I am using different types of hardware to perform the functions of the > Backup Solution, I've been faced with compiling bacula 9.2.1 from source > code, which has worked well for me so far. Everything is up and running, the > director, the SD and the FDs, no hassle about that. > > My only issue comes from bacula-gui; whenever I request to perform changes > either in clientes, pools or pretty much anything i get a nasty message in > the bottom of the screen stating the following: > > > " > Error 94: Config validation error.Array ( [output] => JSON tool returned > wrong exitcode. Output:bacula-dir: ERROR TERMINATION at parse_conf.c:788 > Config error: expected a size number, got: VolumeRetention : line 180, col 18 > of file /etc/bacula/config_8etTke VolumeRetention = 604800 12-Oct 18:15 > bacula-dir: ERROR TERMINATION at parse_conf.c:788 Config error: expected a > size number, got: VolumeRetention : line 180, col 18 of file > /etc/bacula/config_8etTke VolumeRetention = 604800 [exitcode] => 82 ) " > > 604800 is a variable number and it changes according to the VolumeRetention > of my pool, which is expected. Seems to me something else is required that > I'm missing. > > On the other hand, webmin has been my helpful hand in configuring and > performing my first test backups succesfully, but i'd like to use Bacula > products accross the board, namely the bacula-gui interface which looks > really polished vs the webmin module. > > If you can provide a hint on which logs to look at, I'd be more than glad to > help or contribute. > > Extra info. > bacula-gui-9.2.1 (baculum) extracted from source tarball, configured using > > make build DESTDIR=/tmp/baculum-release SAMPLETYPE=deb-template \ > HTTPDNAME=apache2 HTTPDSITECONF=sites-available > > > > > > on raspbian stretch . API and Web configured succesfully. > > > > > > Apache2 Version: 2.4.25-3+deb9u5 > > > Version: 1:7.0+49 > > > bdirjson 9.2.1 > > > > > > I also attached an output of the bdirjson command without options and a > screen capture of the error. > > > > Thanks, > > > Carlos. > > > _______________________________________________ > Bacula-devel mailing list > Bacula-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/bacula-devel > _______________________________________________ > Bacula-devel mailing list > Bacula-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/bacula-devel -- "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-devel mailing list Bacula-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-devel