Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 509438 - dev-db/couchdb - add systemd support
Summary: dev-db/couchdb - add systemd support
Status: RESOLVED OBSOLETE
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: No maintainer - Look at https://wiki.gentoo.org/wiki/Project:Proxy_Maintainers if you want to take care of it
URL:
Whiteboard: Pending removal: 2018-12-11
Keywords: PMASKED
Depends on:
Blocks: install-systemd-unit
  Show dependency tree
 
Reported: 2014-05-03 08:37 UTC by Austin M. Matherne
Modified: 2018-12-11 13:24 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
systemd Unit File for CouchDB (couchdb.service,241 bytes, text/plain)
2014-05-03 08:37 UTC, Austin M. Matherne
Details
systemd tmpfile for CouchDB (couchdb.conf,67 bytes, text/plain)
2014-05-03 08:38 UTC, Austin M. Matherne
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Austin M. Matherne 2014-05-03 08:37:49 UTC
Created attachment 376264 [details]
systemd Unit File for CouchDB

It would be nice if we could get systemd support for CouchDB. I'm using the attached unit and tmpfile, which works perfectly for me.
Comment 1 Austin M. Matherne 2014-05-03 08:38:45 UTC
Created attachment 376266 [details]
systemd tmpfile for CouchDB
Comment 2 alexander haensch 2014-07-01 17:01:42 UTC
please add this to the ebuild.

Works for me.
Comment 3 Pacho Ramos gentoo-dev 2014-07-01 17:25:49 UTC
Running as "simple" instead of "forking" is preferred:
[Unit]
Description=CouchDB Server
After=network.target

[Service]
User=couchdb
PermissionsStartOnly=true
ExecStart=/usr/bin/couchdb -o /dev/null -e /dev/null
ExecStop=/usr/bin/couchdb -d

[Install]
WantedBy=multi-user.target

But it doesn't look to work due permissions problems:
# systemctl status couchdb
● couchdb.service - CouchDB Server
   Loaded: loaded (/usr/lib64/systemd/system/couchdb.service; disabled)
   Active: failed (Result: exit-code) since mar 2014-07-01 19:24:38 CEST; 3s ago
  Process: 10086 ExecStop=/usr/bin/couchdb -d (code=exited, status=0/SUCCESS)
  Process: 10060 ExecStart=/usr/bin/couchdb -o /dev/null -e /dev/null (code=exited, status=1/FAILURE)
 Main PID: 10060 (code=exited, status=1/FAILURE)

jul 01 19:24:37 belkin5 couchdb[10060]: =ERROR REPORT==== 1-Jul-2014::21:24:37 ===
jul 01 19:24:37 belkin5 couchdb[10060]: File operation error: eacces. Target: /lost+found/ebin. Function: read_file_info. Process: code_server.
jul 01 19:24:37 belkin5 couchdb[10060]: =ERROR REPORT==== 1-Jul-2014::21:24:37 ===
jul 01 19:24:37 belkin5 couchdb[10060]: File operation error: eacces. Target: /packages/ebin. Function: read_file_info. Process: code_server.
jul 01 19:24:37 belkin5 couchdb[10060]: =ERROR REPORT==== 1-Jul-2014::21:24:37 ===
jul 01 19:24:37 belkin5 couchdb[10060]: File operation error: eacces. Target: /root/ebin. Function: read_file_info. Process: code_server.
jul 01 19:24:38 belkin5 couchdb[10060]: Apache CouchDB 1.6.0 (LogLevel=info) is starting.
jul 01 19:24:38 belkin5 couchdb[10060]: Error opening log file /var/log/couchdb/couch.log: permission denied{"init terminating in do_boot",{{badmat...
jul 01 19:24:38 belkin5 couchdb[10060]: init terminating in do_boot ()
jul 01 19:24:38 belkin5 couchdb[10086]: Apache CouchDB is not running.
Hint: Some lines were ellipsized, use -l to show in full.
Comment 4 Dirkjan Ochtman (RETIRED) gentoo-dev 2014-12-29 10:49:12 UTC
Please provide information on how to adapt the ebuild for this.
Comment 5 Pacho Ramos gentoo-dev 2014-12-29 13:53:13 UTC
We need to know if the unit works (due to that permission problems that I suffered when tried to handle this... but maybe there were because I need to do some other configuration related with how couchdb works)

The problem is that we try to start it as user couchdb and, then, it fails to create /var/log/couchdb/couch.log
Comment 6 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2018-12-11 13:24:05 UTC
Removing wrt #594624.