View Issue Details

IDProjectCategoryView StatusLast Update
0000693bareos-corewebuipublic2017-03-26 11:13
Reportertigerfoot Assigned To 
PrioritynormalSeveritymajorReproducibilityalways
Status closedResolutionfixed 
PlatformLinuxOSCentOSOS Version7
Product Version15.2.5 
Fixed in Version16.2.5 
Summary0000693: bareos-webui generate error exception with certain messages
DescriptionI found a reproductible case where the bareos-webui generate an exception parsing the log coming from bareos daemon.

Here the error stack
An error occurred
An error occurred during execution; please try again later.
________________________________
Additional information:
Zend\Json\Exception\RuntimeException
File:
/usr/share/php/Zend/Json/Json.php:68
Message:
Decoding failed: Syntax error
Stack trace:
#0 /usr/share/bareos-webui/module/Job/src/Job/Model/JobModel.php(124): Zend\Json\Json::decode('{ "jsonrpc": "2...', 1)
0000001 /usr/share/bareos-webui/module/Job/src/Job/Controller/JobController.php(70): Job\Model\JobModel->getJobLog(40)
0000002 /usr/share/php/Zend/Mvc/Controller/AbstractActionController.php(82): Job\Controller\JobController->detailsAction()
0000003 [internal function]: Zend\Mvc\Controller\AbstractActionController->onDispatch(Object(Zend\Mvc\MvcEvent))
0000004 /usr/share/php/Zend/EventManager/EventManager.php(444): call_user_func(Array, Object(Zend\Mvc\MvcEvent))
0000005 /usr/share/php/Zend/EventManager/EventManager.php(205): Zend\EventManager\EventManager->triggerListeners('dispatch', Object(Zend\Mvc\MvcEvent), Object(Closure))
0000006 /usr/share/php/Zend/Mvc/Controller/AbstractController.php(118): Zend\EventManager\EventManager->trigger('dispatch', Object(Zend\Mvc\MvcEvent), Object(Closure))
0000007 /usr/share/php/Zend/Mvc/DispatchListener.php(93): Zend\Mvc\Controller\AbstractController->dispatch(Object(Zend\Http\PhpEnvironment\Request), Object(Zend\Http\PhpEnvironment\Response))
0000008 [internal function]: Zend\Mvc\DispatchListener->onDispatch(Object(Zend\Mvc\MvcEvent))
0000009 /usr/share/php/Zend/EventManager/EventManager.php(444): call_user_func(Array, Object(Zend\Mvc\MvcEvent))
0000010 /usr/share/php/Zend/EventManager/EventManager.php(205): Zend\EventManager\EventManager->triggerListeners('dispatch', Object(Zend\Mvc\MvcEvent), Object(Closure))
0000011 /usr/share/php/Zend/Mvc/Application.php(314): Zend\EventManager\EventManager->trigger('dispatch', Object(Zend\Mvc\MvcEvent), Object(Closure))
0000012 /usr/share/bareos-webui/public/index.php(24): Zend\Mvc\Application->run()
0000013 {main}
Steps To ReproduceFind a way to generate non standard message (like daemon inserting errors)
(a future bug id will be inserted)

See attached sample log (beware uncompressed it's 11MB with more than 86220 lines.

Try to show the job log in the interface.
Additional InformationNot 100% sure how to handle that the best, but the stack trace as it is actually give the impression of big failure.
Those kinds of error, should be handled (intercepted) and a user error message should be show in place.
Like sorry error parsing json for log message.
Try to check it with another tools.

In case of very high number of lines, or size, I would also recommend to use deflate on the webserver side to compress json
see http://httpd.apache.org/docs/current/mod/mod_deflate.html

You can revise the major status to normal : I use major, cause customer think the software was broken, when it was the log that was not well formated.
TagsNo tags attached.

Relationships

related to 0000684 closed Long logs aren't displayed 

Activities

tigerfoot

tigerfoot

2016-09-04 11:25

developer  

frank

frank

2017-02-01 16:20

developer   ~0002546

Fix committed to bareos-webui bareos-16.2 branch with changesetid 6844.

Related Changesets

bareos-webui: bareos-16.2 c3c7d6cd

2017-01-31 11:31

frank

Ported: N/A

Details Diff
Fix to bugreport 0000684 and 0000693

Fixes 0000684: Long logs aren't displayed
Fixes 0000693: bareos-webui generate error exception with certain messages
Affected Issues
0000684, 0000693
mod - module/Job/src/Job/Controller/JobController.php Diff File
mod - module/Job/src/Job/Model/JobModel.php Diff File
mod - module/Job/view/job/job/details.phtml Diff File
mod - module/Job/view/job/job/index.phtml Diff File

Issue History

Date Modified Username Field Change
2016-09-04 11:25 tigerfoot New Issue
2016-09-04 11:25 tigerfoot File Added: Restore_Error_With_Daemon_Errors_interleaved.log.xz
2016-09-05 13:16 frank Assigned To => frank
2016-09-05 13:16 frank Status new => assigned
2016-11-03 16:18 frank Status assigned => confirmed
2017-01-31 09:48 frank Relationship added related to 0000684
2017-02-01 16:20 frank Changeset attached => bareos-webui bareos-16.2 c3c7d6cd
2017-02-01 16:20 frank Note Added: 0002546
2017-02-01 16:20 frank Status confirmed => resolved
2017-02-01 16:20 frank Resolution open => fixed
2017-02-01 16:26 frank Status resolved => closed
2017-02-01 16:26 frank Assigned To frank =>
2017-02-01 16:27 frank Assigned To => frank
2017-02-01 16:27 frank Status closed => feedback
2017-02-01 16:27 frank Resolution fixed => reopened
2017-02-01 16:27 frank Status feedback => closed
2017-02-01 16:27 frank Assigned To frank =>
2017-02-01 16:27 frank Resolution reopened => fixed
2017-02-01 16:27 frank Fixed in Version => 16.2.5