Bug 894274 - sqlgrey exits with fatal: setconfig error at /usr/sbin/sqlgrey line 195.
sqlgrey exits with fatal: setconfig error at /usr/sbin/sqlgrey line 195.
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: sqlgrey (Show other bugs)
18
x86_64 Linux
unspecified Severity high
: ---
: ---
Assigned To: Steven Pritchard
Fedora Extras Quality Assurance
: Patch
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-01-11 04:45 EST by Bojan Smojver
Modified: 2013-04-23 04:22 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-03-06 18:05:32 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Proposed patch for sqlgrey RPM (1.00 KB, patch)
2013-01-24 23:23 EST, Bojan Smojver
no flags Details | Diff
Alternative patch: use absolute path for SQLite DB, instead of setting WorkingDirectory (1.09 KB, patch)
2013-01-25 17:38 EST, Bojan Smojver
no flags Details | Diff

  None (edit)
Description Bojan Smojver 2013-01-11 04:45:26 EST
Description of problem:
All default config in F-18, when sqlgrey is started through systemd, it will eventually exit with: "fatal: setconfig error at /usr/sbin/sqlgrey line 195."

Version-Release number of selected component (if applicable):
sqlgrey-1.8.0-2.fc18.noarch

How reproducible:
Always.

Steps to Reproduce:
1. Run: service start sqlgrey.
2. Ask the daemon to do something (via postfix).
3. See it terminate.
  
Actual results:
Exits.

Expected results:
Was running in F-17.

Additional info:
If I login to sqlgrey account and run sqlgrey -d, it works.
Comment 1 Bojan Smojver 2013-01-24 22:40:57 EST
The problem:
---------------
getcwd("/", 512)                        = 2
stat("//sqlgrey.db", 0x7fff6fe1d880)    = -1 ENOENT (No such file or directory)
open("//sqlgrey.db", O_RDWR|O_CREAT|O_CLOEXEC, 0644) = -1 EACCES (Permission denied)
open("//sqlgrey.db", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
---------------

Fix (well, one of):
---------------
--- /usr/lib/systemd/system/sqlgrey.service.orig	2012-07-22 16:09:04.000000000 +1000
+++ /usr/lib/systemd/system/sqlgrey.service	2013-01-25 14:34:42.488649607 +1100
@@ -6,6 +6,7 @@
 Type=forking
 PIDFile=/var/run/sqlgrey.pid
 ExecStart=/usr/sbin/sqlgrey -d
+WorkingDirectory=/var/lib/sqlgrey
 
 [Install]
 WantedBy=multi-user.target
---------------
Comment 2 Bojan Smojver 2013-01-24 23:23:46 EST
Created attachment 687192 [details]
Proposed patch for sqlgrey RPM
Comment 3 Bojan Smojver 2013-01-25 17:38:25 EST
Created attachment 687736 [details]
Alternative patch: use absolute path for SQLite DB, instead of setting WorkingDirectory

This is probably a more straightforward patch. Instead of changing the systemd service file and relying on relative paths, an absolute path in the config file solves the issue just the same.
Comment 4 Fedora Update System 2013-02-25 17:44:03 EST
sqlgrey-1.8.0-4.fc18 has been submitted as an update for Fedora 18.
https://admin.fedoraproject.org/updates/sqlgrey-1.8.0-4.fc18
Comment 5 Fedora Update System 2013-02-26 21:48:15 EST
Package sqlgrey-1.8.0-4.fc18:
* should fix your issue,
* was pushed to the Fedora 18 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing sqlgrey-1.8.0-4.fc18'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2013-3163/sqlgrey-1.8.0-4.fc18
then log in and leave karma (feedback).
Comment 6 Fedora Update System 2013-03-06 18:05:34 EST
sqlgrey-1.8.0-4.fc18 has been pushed to the Fedora 18 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 7 Fedora Update System 2013-04-23 04:22:04 EDT
nodejs-dryice-0.4.10-1.el6 has been submitted as an update for Fedora EPEL 6.
https://admin.fedoraproject.org/updates/nodejs-dryice-0.4.10-1.el6

Note You need to log in before you can comment on or make changes to this bug.