{"action":"created","issue":{"url":"https://api.github.com/repos/rethinkdb/rethinkdb/issues/4745","labels_url":"https://api.github.com/repos/rethinkdb/rethinkdb/issues/4745/labels{/name}","comments_url":"https://api.github.com/repos/rethinkdb/rethinkdb/issues/4745/comments","events_url":"https://api.github.com/repos/rethinkdb/rethinkdb/issues/4745/events","html_url":"https://github.com/rethinkdb/rethinkdb/issues/4745","id":102505824,"number":4745,"title":"Pid-File containing non-running pid, blocking start","user":{"login":"RubenKelevra","id":614929,"avatar_url":"https://avatars.githubusercontent.com/u/614929?v=3","gravatar_id":"","url":"https://api.github.com/users/RubenKelevra","html_url":"https://github.com/RubenKelevra","followers_url":"https://api.github.com/users/RubenKelevra/followers","following_url":"https://api.github.com/users/RubenKelevra/following{/other_user}","gists_url":"https://api.github.com/users/RubenKelevra/gists{/gist_id}","starred_url":"https://api.github.com/users/RubenKelevra/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RubenKelevra/subscriptions","organizations_url":"https://api.github.com/users/RubenKelevra/orgs","repos_url":"https://api.github.com/users/RubenKelevra/repos","events_url":"https://api.github.com/users/RubenKelevra/events{/privacy}","received_events_url":"https://api.github.com/users/RubenKelevra/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-08-22T05:43:05Z","updated_at":"2015-08-26T21:25:31Z","closed_at":null,"body":"Sometimes the pid-file is still on disk, when rethinkdb is not running, containing a not-running pid:\r\n\r\n`$ cat /var/run/rethinkdb/default.pid` \r\n`253`\r\n\r\n`$ ps aux | grep 253` \r\n`ruben     1208  0.0  0.1  11260  2312 pts/0    S+   07:39   0:00 grep 253`\r\n\r\nBut still rethinkdb doesn't want to start up:\r\n\r\n`[ruben@fulla ~]$ sudo systemctl start rethinkdb@freifunk` \r\n`[ruben@fulla ~]$ sudo systemctl status rethinkdb@freifunk` \r\n`● rethinkdb@freifunk.service - RethinkDB database server for instance 'freifunk'` \r\n`   Loaded: loaded (/usr/lib/systemd/system/rethinkdb@.service; enabled; vendor preset: disabled)` \r\n`   Active: failed (Result: exit-code) since Sa 2015-08-22 07:38:29 CEST; 4s ago` \r\n`  Process: 1174 ExecStart=/usr/bin/rethinkdb serve --config-file /etc/rethinkdb/instances.d/%i.conf (code=exited, status=1/FAILURE)` \r\n` Main PID: 1174 (code=exited, status=1/FAILURE)`  \r\n`Aug 22 07:38:27 fulla systemd[1]: Started RethinkDB database server for instance 'freifunk'.` \r\n`Aug 22 07:38:29 fulla rethinkdb[1174]: Warning: The following options are not used by this invocation of rethinkdb and will be ignored: server-name` \r\n`Aug 22 07:38:29 fulla rethinkdb[1174]: error: The pid-file specified already exists. This might mean that an instance is already running.` \r\n`Aug 22 07:38:29 fulla systemd[1]: rethinkdb@freifunk.service: Main process exited, code=exited, status=1/FAILURE` \r\n`Aug 22 07:38:29 fulla systemd[1]: rethinkdb@freifunk.service: Unit entered failed state.`\r\n\r\n\r\nRethinkdb should check, if the pid is running, else it should remove the file and start."},"comment":{"url":"https://api.github.com/repos/rethinkdb/rethinkdb/issues/comments/135174484","html_url":"https://github.com/rethinkdb/rethinkdb/issues/4745#issuecomment-135174484","issue_url":"https://api.github.com/repos/rethinkdb/rethinkdb/issues/4745","id":135174484,"user":{"login":"danielmewes","id":505365,"avatar_url":"https://avatars.githubusercontent.com/u/505365?v=3","gravatar_id":"","url":"https://api.github.com/users/danielmewes","html_url":"https://github.com/danielmewes","followers_url":"https://api.github.com/users/danielmewes/followers","following_url":"https://api.github.com/users/danielmewes/following{/other_user}","gists_url":"https://api.github.com/users/danielmewes/gists{/gist_id}","starred_url":"https://api.github.com/users/danielmewes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danielmewes/subscriptions","organizations_url":"https://api.github.com/users/danielmewes/orgs","repos_url":"https://api.github.com/users/danielmewes/repos","events_url":"https://api.github.com/users/danielmewes/events{/privacy}","received_events_url":"https://api.github.com/users/danielmewes/received_events","type":"User","site_admin":false},"created_at":"2015-08-26T21:25:31Z","updated_at":"2015-08-26T21:25:31Z","body":"@anatol do you know anything about how this works with systemd? I'm not too familiar with it unfortunately."}}