Bug 842773
Summary: | Zoneminder fails at startup | ||
---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Jonn Taylor <jonnt> |
Component: | zoneminder | Assignee: | Martin Ebourne <fedora> |
Status: | CLOSED WONTFIX | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
Severity: | high | Docs Contact: | |
Priority: | unspecified | ||
Version: | 17 | CC: | bill, fedora, germano.massullo, j, mammes, wally |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | x86_64 | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2013-08-01 00:23:31 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Jonn Taylor
2012-07-24 14:58:14 UTC
Try adding an After= ordering clause to the service file and see if it helps. Zoneminder still uses init file located in /etc/inid.d/zoneminder. Hm, indeed, it uses systemd in rawhide but not f17. I am not sure there's anything that can be done here. When mysql was using initscripts the ordering was correct. With everything using systemd the ordering appears to be correct (or at least it worked OK in my testing, though I will double check). But I do not know if there is a way to enforce ordering between services using the old and new startup methods. At this point all I can really suggest is that you work around the issue by adding a sleep to the zoneminder initscript, though I'll be happy to look at any other options. How about an updated packaged for fc17 to use systemd? or can I rebuild the src package from rawhide and use it on fc17? Adding a sleep 10 to the init script gave mysql time to complete startup. start() { sleep 10 zmupdate || return $? loadconf || return $? #Make sure the directory for our PID folder exists or create one. [ ! -d $pidfile ] \ && mkdir -m 774 $pidfile \ && chown $ZM_WEB_USER:$ZM_WEB_GROUP $pidfile #Make sure the folder for the socks file exists or create one GetPath="select Value from Config where Name='ZM_PATH_SOCKS'" dbHost=`echo $ZM_DB_HOST | cut -d: -f1` dbPort=`echo $ZM_DB_HOST | cut -d: -s -f2` if [ "$dbPort" = "" ] then ZM_PATH_SOCK=`echo $GetPath | mysql -B -h$ZM_DB_HOST -u$ZM_DB_USER -p$ZM_DB_PASS $ZM_DB_NAME | grep -v '^Value'` else ZM_PATH_SOCK=`echo $GetPath | mysql -B -h$dbHost -P$dbPort -u$ZM_DB_USER -p$ZM_DB_PASS $ZM_DB_NAME | grep -v '^Value'` fi [ ! -d $ZM_PATH_SOCK ] \ && mkdir -m 774 $ZM_PATH_SOCK \ && chown $ZM_WEB_USER:$ZM_WEB_GROUP $ZM_PATH_SOCK echo -n $"Starting $prog: " $command start RETVAL=$? [ $RETVAL = 0 ] && success || failure echo [ $RETVAL = 0 ] && touch $LOCKFILE return $RETVAL } Updating a package from sysv to systemd is not permitted within a Fedora release. You are welcome to rebuild the F18 source package for F17 if you like. If I was at my dev station instead of on vacation here at one of the far ends of the Earth, I'd do a build for you. This problem persists in F18 and I am struggling with it right now. Since zm connects via unix sockets, is there a way to tell systemd to wait for the mysqld socket to exist before trying to start zm? I guess mysql could use socket activation. I don't know; that's really something that should be taken up with the mysq1 maintainers. Dealing with this issue is supposed to be one of the reasons systemd was created, but I'm not really the person to ask about that. The system.d startup profile for zm is part of the zm rpm. I really don't think the mysql guys have anything to do with this fix. I'm glad that's what you think, but unfortunately you are not correct. If mysql wants to make use of the systemd socket activation feature, where clients can connect and systemd will simply hold their connections until mysql actually starts up, then the mysql maintainers are going to have to do that. It's nothing I can do in zoneminder. After adding After and Requires entries to /etc/systemd/system/multi-user.target.wants/zoneminder.service, zm starts up properly. [Unit] Description=Video security and surveillance system After=mysqld.service Requires=mysqld.service [Service] Type=forking ExecStart=/usr/bin/zmpkg.pl start ExecReload=/usr/bin/zmpkg.pl reload PIDFile=/run/zoneminder/zm.pid [Install] WantedBy=multi-user.target Axel: This is just an FYI. I tried your fix on a fully patched F17 and it doesn't work for me. There was no zoneminder.service file in multi-user.target.wants, so I just created it. Don't know enough about systemd to really know what I did. When I execute a systemctl enable for this it still segways to chkconfig, so what I have is still not part of a REAL systemd setup. This message is a reminder that Fedora 17 is nearing its end of life. Approximately 4 (four) weeks from now Fedora will stop maintaining and issuing updates for Fedora 17. 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 '17'. 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 17'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 17 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 change the 'version' to a later Fedora version prior to Fedora 17's end of life. 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. Fedora 17 changed to end-of-life (EOL) status on 2013-07-30. Fedora 17 is no longer maintained, which means that it will not receive any further security or bug fix updates. As a result we are closing this bug. If you can reproduce this bug against a currently maintained version of Fedora please feel free to reopen this bug against that version. Thank you for reporting this bug and we are sorry it could not be fixed. I just installed zoneminder on a fully patched F19, and it still exhibits the failure as described above. However, the fix to add: After=mysqld.service Requires=mysqld.service to /etc/systemd/system/multi-user.target.wants/zoneminder.service also as described above works. I just wanted someone to know that adding those 2 lines to that file fixes the problem. This was happening on 18, 19, 20.. Maybe it'll get a fix in 21? |