Hello Elias,
Your bconsole is 7.4.x version or earlier. I know it isn't requirement
but here it makes a problem.
Could you try to update your bconsole to 9.6.6 version?
Best regards,
Marcin Haba (gani)
On Fri, 2 Oct 2020 at 22:23, Elias Pereira wrote:
>
> Outputs in pastebin.
>
> https://pastebin.com/u81FRDu8
>
> On Fri, Oct 2, 2020 at 4:57 PM Martin Simmons wrote:
>>
>> It looks like bconsole is broken. Does it work with other commands,
>> e.g. restore?
>>
>> The code doesn't contain many other useful debug messages, but please run
>> again with -d900 instead of -d400.
>>
>> Also, please run bconsole with -d900 as well.
>>
>> __Martin
>>
>>
>> > On Fri, 2 Oct 2020 13:47:54 -0300, Elias Pereira said:
>> >
>> > Ok. I even tested giving enter after sqlquery, but it leaves the bconsole.
>> >
>> > I run console in one terminal and bacula-dir -d400 in another. Here the
>> > output.
>> > bconsole:
>> >
>> > Connecting to Director 200.132.218.178:9101
>> > 1000 OK: 103 bacula.sertao.ifrs.edu.br-dir Version: 9.6.6 (20 September
>> > 2020)
>> > Enter a period to cancel a command.
>> > *sqlquery
>> > Automatically selected Catalog: MyCatalog
>> > Using Catalog "MyCatalog"
>> > root@bacula:/etc/bacula#
>> >
>> > bacula-dir -d400:
>> >
>> > root@bacula:/home/ifrs# bacula-dir: bsock.c:851-0 socket=6 who=client
>> > host=xxx.xxx.xxx.xxx port=47096
>> > bacula-dir: job.c:1767-0 wstorage=FreeNAS1
>> > bacula-dir: job.c:1776-0 wstore=FreeNAS1 where=Job resource
>> > bacula-dir: job.c:1430-0 JobId=0 created
>> > Job=-Console-.2020-10-02_13.43.32_08
>> > bacula-dir: cram-md5.c:69-0 send: auth cram-md5 challenge
>> > <1943621602.1601657012@bacula-dir> ssl=0
>> > bacula-dir: cram-md5.c:133-0 cram-get received: auth cram-md5
>> > <326090878.1601657012@bconsole> ssl=0
>> > bacula-dir: cram-md5.c:157-0 sending resp to challenge:
>> > +5/WIh+jd3/Hx4/XN4UOoC
>> > bacula-dir: ua_dotcmds.c:177-0 Cmd: .help all
>> > bacula-dir: ua_cmds.c:2613-0 UA Open database
>> > bacula-dir: mysql.c:119-0 db_init_database first time
>> > bacula-dir: mysql.c:224-0 mysql_init done
>> > bacula-dir: mysql.c:263-0 mysql_real_connect done
>> > bacula-dir: mysql.c:265-0 db_user=bacula db_name=bacula
>> > db_password=xxx
>> > bacula-dir: mysql.c:301-0 opendb ref=1 connected=1 db=7fcaec005360
>> > bacula-dir: ua_cmds.c:2662-0 DB bacula opened
>> > bacula-dir: mysql.c:325-0 closedb ref=0 connected=1 db=7fcaec005360
>> > bacula-dir: mysql.c:332-0 close db=7fcaec005360
>> > bacula-dir: job.c:1466-0 Start dird free_jcr
>> > bacula-dir: mem_pool.c:372-0 garbage collect memory pool
>> > bacula-dir: job.c:1522-0 End dird free_jcr
>> >
>> >
>> > On Fri, Oct 2, 2020 at 12:56 PM Martin Simmons
>> > wrote:
>> >
>> > > This output makes no sense to me.
>> > >
>> > > Firstly, you need to put the SELECT on a separate line. It should look
>> > > like
>> > > this:
>> > >
>> > > Enter a period to cancel a command.
>> > > *sqlquery
>> > > Automatically selected Catalog: MyCatalog
>> > > Using Catalog "MyCatalog"
>> > > Entering SQL query mode.
>> > > Terminate each query with a semicolon.
>> > > Terminate query mode with a blank line.
>> > > Enter SQL query: SELECT * FROM Path WHERE Path='';
>> > > No results to list.
>> > > Enter SQL query:
>> > > End query mode.
>> > > *
>> > >
>> > > Secondly, even if I enter it all on one line like you did, it still
>> > > prints
>> > > "Entering SQL query mode." etc, but your output just contains the shell
>> > > prompt. Does bconsole crash?
>> > >
>> > > __Martin
>> > >
>> > >
>> > > > On Fri, 2 Oct 2020 10:51:05 -0300, Elias Pereira said:
>> > > >
>> > > > Enter a period to cancel a command.
>> > > > *sqlquery SELECT * FROM Path WHERE Path='';
>> > > > Automatically selected Catalog: MyCatalog
>> > > > Using Catalog "MyCatalog"
>> > > > root@bacula:~#
>> > > >
>> > > > Enter a period to cancel a command.
>> > > > *sqlquery SELECT * FROM Path WHERE PathId=92295;
>> > > > Automatically selected Catalog: MyCatalog
>> > > > Using Catalog "MyCatalog"
>> > > > root@bacula:/home/ifrs# cd
>> > > > root@bacula:~#
>> > > >
>> > > > Enter a period to cancel a command.
>> > > > *sqlquery SELECT 'D', tmp.PathId, 0, tmp.Path, JobId, LStat, FileId,
>> > > > FileIndex FROM (SELECT PathHierarchy.PPathId AS PathId, '..' AS Path
>> > > > FROM
>> > > > PathHierarchy JOIN PathVisibility USING (PathId) WHERE
>> > > PathHierarchy.PathId
>> > > > = 92295 AND PathVisibility.JobId IN (17911) UNION SELECT 92295 AS
>> > > > PathId,
>> > > > '.' AS Path) AS tmp LEFT JOIN ( SELECT File1.PathId AS PathId,
>> > > File1.JobId
>> > > > AS JobId, File1.LStat AS LStat, File1.FileId AS FileId, File1.FileIndex
>> > > AS
>> > > > FileIndex, Job1.JobTDate AS JobTDate FROM File AS File1 JOIN Job AS
>> > > > Job1
>> > > > USING (JobId)WHERE File1.FilenameId = 3 AND File1.JobId IN (17911)) AS
>> > > > listfile1 ON (tmp.PathId = listfile1.PathId) ORDER BY tmp.Path,
>> > > > JobTDate
>> > > > DESC;
>> > > > Automatically selected Catalog: My