{"action":"closed","issue":{"url":"https://api.github.com/repos/OpenSCAP/openscap-daemon/issues/66","repository_url":"https://api.github.com/repos/OpenSCAP/openscap-daemon","labels_url":"https://api.github.com/repos/OpenSCAP/openscap-daemon/issues/66/labels{/name}","comments_url":"https://api.github.com/repos/OpenSCAP/openscap-daemon/issues/66/comments","events_url":"https://api.github.com/repos/OpenSCAP/openscap-daemon/issues/66/events","html_url":"https://github.com/OpenSCAP/openscap-daemon/issues/66","id":139247174,"number":66,"title":"Daemon fails to start when configuration file is invalid","user":{"login":"jan-cerny","id":9050916,"avatar_url":"https://avatars.githubusercontent.com/u/9050916?v=3","gravatar_id":"","url":"https://api.github.com/users/jan-cerny","html_url":"https://github.com/jan-cerny","followers_url":"https://api.github.com/users/jan-cerny/followers","following_url":"https://api.github.com/users/jan-cerny/following{/other_user}","gists_url":"https://api.github.com/users/jan-cerny/gists{/gist_id}","starred_url":"https://api.github.com/users/jan-cerny/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jan-cerny/subscriptions","organizations_url":"https://api.github.com/users/jan-cerny/orgs","repos_url":"https://api.github.com/users/jan-cerny/repos","events_url":"https://api.github.com/users/jan-cerny/events{/privacy}","received_events_url":"https://api.github.com/users/jan-cerny/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-03-08T11:00:29Z","updated_at":"2016-03-08T16:49:57Z","closed_at":"2016-03-08T16:49:57Z","body":"If `/etc/oscapd/config.ini` contains some nonsense, the deamon fails to start and gives a traceback.\r\nI think we should catch the exception, add an error message into journal and continue without trying to parse the configuration file.\r\n\r\n\r\nHere is the traceback:\r\n\r\n```\r\nStarting OpenSCAP Daemon...\r\nINFO:OpenSCAP Daemon 0.1.3\r\nStarted OpenSCAP Daemon.\r\nDEBUG:Initialized AsyncManager, 4 workers\r\nINFO:Loading configuration from '/etc/oscapd/config.ini'.\r\ndetected unhandled Python exception in '/usr/bin/oscapd'\r\nTraceback (most recent call last):\r\nFile \"/usr/bin/oscapd\", line 70, in <module>\r\nmain()\r\nFile \"/usr/bin/oscapd\", line 64, in main\r\nobj = dbus_daemon.OpenSCAPDaemonDbus(bus, config_file)\r\nFile \"/usr/lib/python3.4/site-packages/openscap_daemon/dbus_daemon.py\", line 42, in __init__\r\nself.system = system.System(config_file)\r\nFile \"/usr/lib/python3.4/site-packages/openscap_daemon/system.py\", line 47, in __init__\r\nself.config.load(config_file)\r\nFile \"/usr/lib/python3.4/site-packages/openscap_daemon/config.py\", line 154, in load\r\nconfig.read(config_file)\r\nFile \"/usr/lib64/python3.4/configparser.py\", line 672, in read\r\nself._read(fp, filename)\r\nFile \"/usr/lib64/python3.4/configparser.py\", line 1058, in _read\r\nraise MissingSectionHeaderError(fpname, lineno, line)\r\nconfigparser.MissingSectionHeaderError: File contains no section headers.\r\nfile: '/etc/oscapd/config.ini', line: 1 \r\n'faoghaio\\n'\r\n```"}}