View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0001140 | bareos-core | webui | public | 2019-11-19 15:40 | 2024-05-15 15:38 |
Reporter | koef | Assigned To | frank | ||
Priority | normal | Severity | minor | Reproducibility | always |
Status | closed | Resolution | open | ||
Platform | Linux | OS | CentOS | OS Version | 7 |
Product Version | 18.2.5 | ||||
Summary | 0001140: Restore feature always fails from webui (cats/bvfs.cc:927-0 Can't execute q) | ||||
Description | Hello. Restore feature doesn't create restore job from webui. But it works fine from bconsole. Please ask for additional info if it's needed. You can see debug output with level 200 and mysql query log below. Thanks. | ||||
Steps To Reproduce | Merge all client filesets - No Merge all related jobs to last full backup of selected backup job - No | ||||
Additional Information | bareos-dir debug trace: 19-Nov-2019 15:29:15.191147 bareos-dir (100): lib/bsock.cc:81-0 Construct BareosSocket 19-Nov-2019 15:29:15.191410 bareos-dir (100): include/jcr.h:320-0 Construct JobControlRecord 19-Nov-2019 15:29:15.191460 bareos-dir (200): lib/bsock.cc:631-0 Identified from Bareos handshake: admin-R_CONSOLE recognized version: 18.2 19-Nov-2019 15:29:15.191491 bareos-dir (110): dird/socket_server.cc:109-0 Conn: Hello admin calling version 18.2.5 19-Nov-2019 15:29:15.191506 bareos-dir (100): include/jcr.h:320-0 Construct JobControlRecord 19-Nov-2019 15:29:15.191528 bareos-dir (100): dird/storage.cc:157-0 write_storage_list=File 19-Nov-2019 15:29:15.191547 bareos-dir (100): dird/storage.cc:166-0 write_storage=File where=Job resource 19-Nov-2019 15:29:15.191559 bareos-dir (100): dird/job.cc:1519-0 JobId=0 created Job=-Console-.2019-11-19_15.29.15_07 19-Nov-2019 15:29:15.191776 bareos-dir (50): lib/cram_md5.cc:69-0 send: auth cram-md5 <1114491002.1574173755@bareos-dir> ssl=0 19-Nov-2019 15:29:15.192019 bareos-dir (50): lib/cram_md5.cc:88-0 Authenticate OK Gd1+i91cs2Tf7pZiQJs+ew 19-Nov-2019 15:29:15.192200 bareos-dir (100): lib/cram_md5.cc:116-0 cram-get received: auth cram-md5 <9503288492.1574173755@php-bsock> ssl=0 19-Nov-2019 15:29:15.192239 bareos-dir (99): lib/cram_md5.cc:135-0 sending resp to challenge: 1y/il6/RE9/FU8dciG/X6A 19-Nov-2019 15:29:15.273737 bareos-dir (10): dird/ua_audit.cc:146-0 : Console [admin] from [10.105.132.139] cmdline llist backups client="someclient.domain.com" fileset="any" order=desc 19-Nov-2019 15:29:15.273867 bareos-dir (100): dird/ua_db.cc:155-0 UA Open database 19-Nov-2019 15:29:15.273903 bareos-dir (100): cats/sql_pooling.cc:61-0 DbSqlGetNonPooledConnection allocating 1 new non pooled database connection to database bareos, backend type mysql 19-Nov-2019 15:29:15.273929 bareos-dir (100): cats/cats_backends.cc:81-0 db_init_database: Trying to find mapping of given interfacename mysql to mapping interfacename dbi, partly_compare = true 19-Nov-2019 15:29:15.273943 bareos-dir (100): cats/cats_backends.cc:81-0 db_init_database: Trying to find mapping of given interfacename mysql to mapping interfacename mysql, partly_compare = false 19-Nov-2019 15:29:15.273959 bareos-dir (100): cats/mysql.cc:869-0 db_init_database first time 19-Nov-2019 15:29:15.273990 bareos-dir (50): cats/mysql.cc:181-0 mysql_init done 19-Nov-2019 15:29:15.274839 bareos-dir (50): cats/mysql.cc:205-0 mysql_real_connect done 19-Nov-2019 15:29:15.274873 bareos-dir (50): cats/mysql.cc:207-0 db_user=someuser db_name=bareos db_password=somepass 19-Nov-2019 15:29:15.275378 bareos-dir (100): cats/mysql.cc:230-0 opendb ref=1 connected=1 db=7effb000ab20 19-Nov-2019 15:29:15.275854 bareos-dir (150): dird/ua_db.cc:188-0 DB bareos opened 19-Nov-2019 15:29:15.275887 bareos-dir (20): dird/ua_output.cc:579-0 list: llist backups client="someclient.domain.com" fileset="any" order=desc 19-Nov-2019 15:29:15.275937 bareos-dir (100): cats/sql_query.cc:96-0 called: void BareosDb::FillQueryVaList(PoolMem&, BareosDbQueryEnum::SQL_QUERY_ENUM, __va_list_tag*) with query name list_jobs_long (6) 19-Nov-2019 15:29:15.276015 bareos-dir (100): cats/sql_query.cc:102-0 called: void BareosDb::FillQueryVaList(PoolMem&, BareosDbQueryEnum::SQL_QUERY_ENUM, __va_list_tag*) query is now SELECT DISTINCT Job.JobId, Job.Job, Job.Name, Job.PurgedFiles, Job.Type, Job.Level, Job.ClientId, Client.Name as Client, Job.JobStatus, Job.SchedTime, Job.StartTime, Job.EndTime, Job.RealEndTime, Job.JobTDate, Job.VolSessionId, Job.VolSessionTime, Job.JobFiles, Job.JobBytes, Job.JobErrors, Job.JobMissingFiles, Job.PoolId, Pool.Name as PoolName, Job.PriorJobId, Job.FileSetId, FileSet.FileSet FROM Job LEFT JOIN Client ON Client.ClientId=Job.ClientId LEFT JOIN Pool ON Pool.PoolId=Job.PoolId LEFT JOIN JobMedia ON JobMedia.JobId=Job.JobId LEFT JOIN Media ON JobMedia.MediaId=Media.MediaId LEFT JOIN FileSet ON FileSet.FileSetId=Job.FileSetId WHERE Job.JobId > 0 AND Job.Type='B' AND Client.Name='someclient.domain.com' AND JobStatus IN ('T','W') AND (FileSet='v2iFileset' OR FileSet='SelfTest' OR FileSet='LinuxAll' OR FileSet='InfluxdbFileset' OR FileSet='IcingaFileset' OR FileSet='GraylogFileset' OR FileSet='GrafanaFileset' OR FileSet='Catalog') ORDER BY StartTime DESC; 19-Nov-2019 15:29:15.276067 bareos-dir (100): cats/sql_query.cc:124-0 called: bool BareosDb::SqlQuery(const char*, int) with query SELECT DISTINCT Job.JobId, Job.Job, Job.Name, Job.PurgedFiles, Job.Type, Job.Level, Job.ClientId, Client.Name as Client, Job.JobStatus, Job.SchedTime, Job.StartTime, Job.EndTime, Job.RealEndTime, Job.JobTDate, Job.VolSessionId, Job.VolSessionTime, Job.JobFiles, Job.JobBytes, Job.JobErrors, Job.JobMissingFiles, Job.PoolId, Pool.Name as PoolName, Job.PriorJobId, Job.FileSetId, FileSet.FileSet FROM Job LEFT JOIN Client ON Client.ClientId=Job.ClientId LEFT JOIN Pool ON Pool.PoolId=Job.PoolId LEFT JOIN JobMedia ON JobMedia.JobId=Job.JobId LEFT JOIN Media ON JobMedia.MediaId=Media.MediaId LEFT JOIN FileSet ON FileSet.FileSetId=Job.FileSetId WHERE Job.JobId > 0 AND Job.Type='B' AND Client.Name='someclient.domain.com' AND JobStatus IN ('T','W') AND (FileSet='v2iFileset' OR FileSet='SelfTest' OR FileSet='LinuxAll' OR FileSet='InfluxdbFileset' OR FileSet='IcingaFileset' OR FileSet='GraylogFileset' OR FileSet='GrafanaFileset' OR FileSet='Catalog') ORDER BY StartTime DESC; 19-Nov-2019 15:29:15.354800 bareos-dir (10): dird/ua_audit.cc:146-0 : Console [admin] from [10.105.132.139] cmdline llist clients current 19-Nov-2019 15:29:15.354928 bareos-dir (20): dird/ua_output.cc:579-0 list: llist clients current 19-Nov-2019 15:29:15.354968 bareos-dir (100): cats/sql_query.cc:124-0 called: bool BareosDb::SqlQuery(const char*, int) with query SELECT ClientId,Name,Uname,AutoPrune,FileRetention,JobRetention FROM Client ORDER BY ClientId 19-Nov-2019 15:29:15.355739 bareos-dir (200): dird/ua_output.cc:1626-0 filterit: Filter on resource_type 1002 value bareos-fd, suppress output 19-Nov-2019 15:29:15.355779 bareos-dir (200): dird/ua_output.cc:1626-0 filterit: Filter on resource_type 1002 value bareos-dir-node, suppress output 19-Nov-2019 15:29:15.610801 bareos-dir (10): dird/ua_audit.cc:146-0 : Console [admin] from [10.105.132.139] cmdline .bvfs_update jobid=142 19-Nov-2019 15:29:15.616201 bareos-dir (100): lib/htable.cc:77-0 malloc buf=7effb006a718 size=9830400 rem=9830376 19-Nov-2019 15:29:15.616266 bareos-dir (100): lib/htable.cc:220-0 Allocated big buffer of 9830400 bytes 19-Nov-2019 15:29:15.616634 bareos-dir (10): cats/bvfs.cc:359-0 Updating cache for 142 19-Nov-2019 15:29:15.616656 bareos-dir (10): cats/bvfs.cc:190-0 UpdatePathHierarchyCache() 19-Nov-2019 15:29:15.616694 bareos-dir (100): cats/sql_query.cc:124-0 called: bool BareosDb::SqlQuery(const char*, int) with query SELECT 1 FROM Job WHERE JobId = 142 AND HasCache=1 19-Nov-2019 15:29:15.617365 bareos-dir (10): cats/bvfs.cc:202-0 Already computed 142 19-Nov-2019 15:29:15.617405 bareos-dir (100): lib/htable.cc:90-0 free malloc buf=7effb006a718 Pool Maxsize Maxused Inuse NoPool 256 86 0 NAME 1318 16 4 FNAME 2304 75 65 MSG 2634 31 17 EMSG 2299 10 4 BareosSocket 31080 4 2 RECORD 128 0 0 19-Nov-2019 15:29:15.619407 bareos-dir (100): lib/htable.cc:601-0 Done destroy. 19-Nov-2019 15:29:15.620312 bareos-dir (10): dird/ua_audit.cc:146-0 : Console [admin] from [10.105.132.139] cmdline .bvfs_restore jobid=142 fileid=6914 dirid= path=b2000928016 19-Nov-2019 15:29:15.620348 bareos-dir (100): cats/sql_query.cc:124-0 called: bool BareosDb::SqlQuery(const char*, int) with query SELECT VolSessionId,VolSessionTime,PoolId,StartTime,EndTime,JobFiles,JobBytes,JobTDate,Job,JobStatus,Type,Level,ClientId,Name,PriorJobId,RealEndTime,JobId,FileSetId,SchedTime,RealEndTime,ReadBytes,HasBase,PurgedFiles FROM Job WHERE JobId=142 19-Nov-2019 15:29:15.620781 bareos-dir (100): cats/sql_query.cc:124-0 called: bool BareosDb::SqlQuery(const char*, int) with query SELECT ClientId,Name,Uname,AutoPrune,FileRetention,JobRetention FROM Client WHERE Client.ClientId=8 19-Nov-2019 15:29:15.621038 bareos-dir (100): cats/sql_query.cc:124-0 called: bool BareosDb::SqlQuery(const char*, int) with query DROP TABLE btempb2000928016 19-Nov-2019 15:29:15.621252 bareos-dir (100): cats/sql_query.cc:124-0 called: bool BareosDb::SqlQuery(const char*, int) with query DROP TABLE b2000928016 19-Nov-2019 15:29:15.621419 bareos-dir (15): cats/bvfs.cc:924-0 q=CREATE TABLE btempb2000928016 AS SELECT Job.JobId, JobTDate, FileIndex, File.Name, PathId, FileId FROM File JOIN Job USING (JobId) WHERE FileId IN (6914) 19-Nov-2019 15:29:15.621434 bareos-dir (100): cats/sql_query.cc:124-0 called: bool BareosDb::SqlQuery(const char*, int) with query CREATE TABLE btempb2000928016 AS SELECT Job.JobId, JobTDate, FileIndex, File.Name, PathId, FileId FROM File JOIN Job USING (JobId) WHERE FileId IN (6914) 19-Nov-2019 15:29:15.621634 bareos-dir (10): cats/bvfs.cc:927-0 Can't execute q 19-Nov-2019 15:29:15.621662 bareos-dir (100): cats/sql_query.cc:124-0 called: bool BareosDb::SqlQuery(const char*, int) with query DROP TABLE btempb2000928016 19-Nov-2019 15:29:15.661510 bareos-dir (10): dird/ua_audit.cc:146-0 : Console [admin] from [10.105.132.139] cmdline restore file=?b2000928016 client=someclient.domain.com restoreclient=someclient.domain.com restorejob="RestoreFiles" where=/tmp/bareos-restores/ replace=never yes 19-Nov-2019 15:29:15.661580 bareos-dir (100): cats/sql_query.cc:124-0 called: bool BareosDb::SqlQuery(const char*, int) with query SELECT ClientId,Name,Uname,AutoPrune,FileRetention,JobRetention FROM Client WHERE Client.Name='someclient.domain.com' 19-Nov-2019 15:29:15.661982 bareos-dir (100): cats/sql_query.cc:96-0 called: void BareosDb::FillQueryVaList(PoolMem&, BareosDbQueryEnum::SQL_QUERY_ENUM, __va_list_tag*) with query name uar_jobid_fileindex_from_table (32) 19-Nov-2019 15:29:15.662011 bareos-dir (100): cats/sql_query.cc:102-0 called: void BareosDb::FillQueryVaList(PoolMem&, BareosDbQueryEnum::SQL_QUERY_ENUM, __va_list_tag*) query is now SELECT JobId, FileIndex FROM b2000928016 ORDER BY JobId, FileIndex ASC 19-Nov-2019 15:29:15.662022 bareos-dir (100): cats/sql_query.cc:140-0 called: bool BareosDb::SqlQuery(const char*, int (*)(void*, int, char**), void*) with query SELECT JobId, FileIndex FROM b2000928016 ORDER BY JobId, FileIndex ASC Pool Maxsize Maxused Inuse NoPool 256 86 0 NAME 1318 16 5 FNAME 2304 75 65 MSG 2634 31 17 EMSG 2299 10 4 BareosSocket 31080 4 2 RECORD 128 0 0 19-Nov-2019 15:29:15.702682 bareos-dir (10): dird/ua_audit.cc:146-0 : Console [admin] from [10.105.132.139] cmdline .bvfs_cleanup path=b2000928016 19-Nov-2019 15:29:15.702753 bareos-dir (100): cats/sql_query.cc:124-0 called: bool BareosDb::SqlQuery(const char*, int) with query DROP TABLE b2000928016 19-Nov-2019 15:29:15.714596 bareos-dir (100): cats/mysql.cc:252-0 closedb ref=0 connected=1 db=7effb000ab20 19-Nov-2019 15:29:15.714646 bareos-dir (100): cats/mysql.cc:259-0 close db=7effb000ab20 19-Nov-2019 15:29:15.714817 bareos-dir (200): dird/job.cc:1560-0 Start dird FreeJcr 19-Nov-2019 15:29:15.714871 bareos-dir (200): dird/job.cc:1624-0 End dird FreeJcr 19-Nov-2019 15:29:15.714888 bareos-dir (100): lib/jcr.cc:446-0 FreeCommonJcr: 7effb0007898 19-Nov-2019 15:29:15.714909 bareos-dir (100): lib/bsock.cc:129-0 Destruct BareosSocket 19-Nov-2019 15:29:15.714924 bareos-dir (100): include/jcr.h:324-0 Destruct JobControlRecord Mysql query log: 191119 15:29:15 37 Connect bareos@localhost as anonymous on bareos 37 Query SELECT VersionId FROM Version 37 Query SET wait_timeout=691200 37 Query SET interactive_timeout=691200 37 Query SELECT DISTINCT Job.JobId, Job.Job, Job.Name, Job.PurgedFiles, Job.Type, Job.Level, Job.ClientId, Client.Name as Client, Job.JobStatus, Job.SchedTime, Job.StartTime, Job.EndTime, Job.RealEndTime, Job.JobTDate, Job.VolSessionId, Job.VolSessionTime, Job.JobFiles, Job.JobBytes, Job.JobErrors, Job.JobMissingFiles, Job.PoolId, Pool.Name as PoolName, Job.PriorJobId, Job.FileSetId, FileSet.FileSet FROM Job LEFT JOIN Client ON Client.ClientId=Job.ClientId LEFT JOIN Pool ON Pool.PoolId=Job.PoolId LEFT JOIN JobMedia ON JobMedia.JobId=Job.JobId LEFT JOIN Media ON JobMedia.MediaId=Media.MediaId LEFT JOIN FileSet ON FileSet.FileSetId=Job.FileSetId WHERE Job.JobId > 0 AND Job.Type='B' AND Client.Name='someclient.domain.com' AND JobStatus IN ('T','W') AND (FileSet='v2iFileset' OR FileSet='SelfTest' OR FileSet='LinuxAll' OR FileSet='InfluxdbFileset' OR FileSet='IcingaFileset' OR FileSet='GraylogFileset' OR FileSet='GrafanaFileset' OR FileSet='Catalog') ORDER BY StartTime DESC 37 Query SELECT ClientId,Name,Uname,AutoPrune,FileRetention,JobRetention FROM Client ORDER BY ClientId 37 Query SELECT 1 FROM Job WHERE JobId = 142 AND HasCache=1 37 Query SELECT VolSessionId,VolSessionTime,PoolId,StartTime,EndTime,JobFiles,JobBytes,JobTDate,Job,JobStatus,Type,Level,ClientId,Name,PriorJobId,RealEndTime,JobId,FileSetId,SchedTime,RealEndTime,ReadBytes,HasBase,PurgedFiles FROM Job WHERE JobId=142 37 Query SELECT ClientId,Name,Uname,AutoPrune,FileRetention,JobRetention FROM Client WHERE Client.ClientId=8 37 Query DROP TABLE btempb2000928016 37 Query DROP TABLE b2000928016 37 Query CREATE TABLE btempb2000928016 AS SELECT Job.JobId, JobTDate, FileIndex, File.Name, PathId, FileId FROM File JOIN Job USING (JobId) WHERE FileId IN (6914) 37 Query DROP TABLE btempb2000928016 37 Query SELECT ClientId,Name,Uname,AutoPrune,FileRetention,JobRetention FROM Client WHERE Client.Name='someclient.domain.com' 37 Query SELECT JobId, FileIndex FROM b2000928016 ORDER BY JobId, FileIndex ASC 37 Query DROP TABLE b2000928016 37 Quit | ||||
Tags | director, webui | ||||
This was reported for an end-of-life (EOL) version of Bareos. If you can reproduce this bug against a currently maintained version of Bareos please feel free to open a new issue against that version at https://github.com/bareos/bareos/issues Thank you for reporting this bug and we are sorry it could not be fixed. |
|
Date Modified | Username | Field | Change |
---|---|---|---|
2019-11-19 15:40 | koef | New Issue | |
2019-11-19 15:40 | koef | Tag Attached: director | |
2019-11-19 15:40 | koef | Tag Attached: webui | |
2021-04-29 10:38 | frank | Assigned To | => frank |
2021-04-29 10:38 | frank | Status | new => assigned |
2024-05-15 15:38 | arogge | Note Added: 0005937 | |
2024-05-15 15:38 | arogge | Status | assigned => closed |