Bug 689913

Summary: FATAL: failed to create pid file '/var/run/sphinx/searchd.pid': No such file or directory
Product: [Fedora] Fedora Reporter: Michał Piotrowski <mkkp4x4>
Component: sphinxAssignee: Christof Damian <christof>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: urgent    
Version: 18CC: christof, gbcox, ondrejj
Target Milestone: ---Keywords: Reopened
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-04-25 14:04:46 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Michał Piotrowski 2011-03-22 19:09:21 UTC
Hi,

Description of problem:
/usr/bin/searchd --config /etc/sphinx/sphinx.conf
Sphinx 0.9.9-release (r2117)
Copyright (c) 2001-2009, Andrew Aksyonoff

using config file '/etc/sphinx/sphinx.conf'...
FATAL: failed to create pid file '/var/run/sphinx/searchd.pid': No such file or directory

Best regards,
Michal


Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.
  
Actual results:


Expected results:


Additional info:

Comment 1 Michał Piotrowski 2011-03-22 19:20:20 UTC
For me this works

/etc/tmpfiles.d/searchd.conf
d /var/run/sphinx   710 root root

but I use my custom systemd service file, that somehow I could not force to run as sphinx user, so I used root.

Comment 2 Christof Damian 2011-03-22 19:37:50 UTC
I haven't tested it on f15 yet, but on f14 sphinx should run as sphinx user and the /var/run/sphinx directory should be owned by sphinx.root .

I will try it on f15 when I have some time.

Comment 3 Jan ONDREJ 2012-01-13 16:47:51 UTC
Same problem here. Please fix. Is this package still maintained?

Comment 4 Fedora End Of Life 2012-08-07 15:41:26 UTC
This message is a notice that Fedora 15 is now at end of life. Fedora
has stopped maintaining and issuing updates for Fedora 15. It is
Fedora's policy to close all bug reports from releases that are no
longer maintained. At this time, all open bugs with a Fedora 'version'
of '15' have been closed as WONTFIX.

(Please note: Our normal process is to give advanced warning of this
occurring, but we forgot to do that. A thousand apologies.)

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, feel free to reopen
this bug and simply change the 'version' to a later Fedora version.

Bug Reporter: Thank you for reporting this issue and we are sorry that
we were unable to fix it before Fedora 15 reached end of life. If you
would still like to see this bug fixed and are able to reproduce it
against a later version of Fedora, you are encouraged to click on
"Clone This Bug" (top right of this page) and open it against that
version of Fedora.

Although we aim to fix as many bugs as possible during every release's
lifetime, sometimes those efforts are overtaken by events. Often a
more recent Fedora release includes newer upstream software that fixes
bugs or makes them obsolete.

The process we are following is described here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 5 Jan ONDREJ 2012-08-07 18:27:10 UTC
I think it's still present in Fedora 16, changing version.

Comment 6 Fedora End Of Life 2013-01-16 22:26:02 UTC
This message is a reminder that Fedora 16 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 16. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '16'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 16's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 16 is end of life. If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora, you are encouraged to click on 
"Clone This Bug" and open it against that version of Fedora.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 7 Gerald Cox 2013-04-18 16:54:26 UTC
With the advent of Google reader shutting down and more people switching to Tiny Tiny RSS, this service is going to start getting alot more usage.  Tiny Tiny RSS uses Sphinx as it's search service - that is how I encountered this bug.  When installing the sphinx rpm, /var/run/sphinx is created - but for some reason it is deleted upon reboot.  This causes the service to fail when searchd.service is started during reboot.  To work around, after each system reboot you have to:

1.  cd /var/run
2.  mkdir sphinx
3.  chown sphinx sphinx
4.  systemctl start searchd.service

This doesn't appear to be an upstream issue, this appears to be an issue with the way the software was packaged.  Has this package been orphaned?

Comment 8 Michał Piotrowski 2013-04-18 17:04:25 UTC
Hi,

(In reply to comment #7)
[..]
> 1.  cd /var/run
> 2.  mkdir sphinx
> 3.  chown sphinx sphinx
> 4.  systemctl start searchd.service
> 
> This doesn't appear to be an upstream issue, this appears to be an issue
> with the way the software was packaged.

You may want to try this solution
https://bugzilla.redhat.com/show_bug.cgi?id=689913#c1
I don't know if it still works.

>  Has this package been orphaned?

There are new builds, so I guess that it's not orphaned.

Best regards,
Michal

Comment 9 Christof Damian 2013-04-18 17:20:51 UTC
(In reply to comment #7)
> Has this package been orphaned?

no, I am just lacking time. 

There is also sphinx 2.0.0 in rawhide, which might fix the issue.

Comment 10 Gerald Cox 2013-04-18 19:14:03 UTC
Thanks for the quick replies.  Solution in this bug report no longer works since the restructure.  Looks like this was originally reported in March, 2011 which was Fedora 14... we're now Fedora 18 - soon to be Fedora 19 in a few weeks.

I'm running sphinx-2.0.3-2.fc18.x86_64 which would be newer than 2.0.0.  There is another https://bugzilla.redhat.com/show_bug.cgi?id=868170 from Upstream Release Monitoring which is reporting that Sphinx 2.0.7 is now available.

Comment 11 Gerald Cox 2013-04-19 14:22:36 UTC
Here is a method to temporarily circumvent until 2.0.7 can be made available for Fedora...instructions are embedded as comments in the script.

Copy and paste the script below into /opt/sphinx/sphinxstart.sh
You can also download the script from here:

https://docs.google.com/file/d/0B96ctNl5KI2aUWdwbVJJWTUzTmc/edit?usp=sharing

#!/bin/bash
#
# This is a temporary circumvention for 
# https://bugzilla.redhat.com/show_bug.cgi?id=689913
# As root:
# mkdir /opt/sphinx/
# Place this file in /opt/sphinx/
# 
# Then create cron entry for root:
# crontab -e
# insert the following 
# @reboot /opt/sphinx/sphinxstart.sh
# 
mkdir "/var/run/sphinx"
chown sphinx "/var/run/sphinx/"
systemctl start searchd.service

Comment 12 Fedora Update System 2013-04-20 21:54:19 UTC
sphinx-2.0.7-1.fc19 has been submitted as an update for Fedora 19.
https://admin.fedoraproject.org/updates/sphinx-2.0.7-1.fc19

Comment 13 Fedora Update System 2013-04-20 22:33:05 UTC
sphinx-2.0.7-1.fc18 has been submitted as an update for Fedora 18.
https://admin.fedoraproject.org/updates/sphinx-2.0.7-1.fc18

Comment 14 Gerald Cox 2013-04-20 23:35:53 UTC
Thanks for the quick update!

I upgraded from 2.0.3 and validated that /var/run/sphinx is now created at boot and searchd.service starts and is working properly.

I also didn't have any issues with compatibility between the two releases.

I did notice that the service isn't enabled automatically, you need to manually enter systemctl enable searchd.service - which is fine if that is what you intended.

I'll comment on bohdi.  Thanks again!

Comment 15 Fedora Update System 2013-04-21 05:02:23 UTC
Package sphinx-2.0.7-1.fc19:
* should fix your issue,
* was pushed to the Fedora 19 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing sphinx-2.0.7-1.fc19'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2013-6184/sphinx-2.0.7-1.fc19
then log in and leave karma (feedback).

Comment 16 Christof Damian 2013-04-21 12:58:29 UTC
(In reply to comment #14)
> I upgraded from 2.0.3 and validated that /var/run/sphinx is now created at
> boot and searchd.service starts and is working properly.

very good. I use the tmpfiles.d config now, as suggested in comment #1

> I did notice that the service isn't enabled automatically, you need to
> manually enter systemctl enable searchd.service - which is fine if that is
> what you intended.

Yes, that is normal for these kind of services. It wouldn't work anyway unless you change the config to your database setup.

Comment 17 Fedora Update System 2013-04-25 14:04:49 UTC
sphinx-2.0.7-1.fc19 has been pushed to the Fedora 19 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 18 Fedora Update System 2013-04-30 03:21:10 UTC
sphinx-2.0.7-1.fc18 has been pushed to the Fedora 18 stable repository.  If problems still persist, please make note of it in this bug report.