**FIXED** ZM service no longer starts after upgrade from 1.35 to 1.36.35 on OpenSuse Tumbleweed

Discussions related to the 1.36.x series of ZoneMinder
Post Reply
User avatar
emailej
Posts: 23
Joined: Wed Aug 24, 2016 12:31 am

**FIXED** ZM service no longer starts after upgrade from 1.35 to 1.36.35 on OpenSuse Tumbleweed

Post by emailej »

I am getting a failure for zm to start. I can login and see all my monitors and events but just cant start the service. The only error I can find is related to zmdatabaseinit such as "ModuleNotFoundError: No module named 'zm_dbinit'".

Any suggestions or help? Unless i'm missing something I assume I'll probably need to contact the packager? I have submitted the following bug report:

https://bugzilla.opensuse.org/show_bug.cgi?id=1241127

Bug 1241127 - Zoneminder (zm) service no longer starts after upgrade from 1.35 to 1.36.36 on OpenSuse Tumbleweed (edit)

Also, my system info and output from systemctl below.

Operating System: openSUSE Tumbleweed 20250403
KDE Plasma Version: 6.3.4
KDE Frameworks Version: 6.12.0
Qt Version: 6.8.2
Kernel Version: 6.11.7-1-default (64-bit)
Graphics Platform: X11
Processors: 16 × AMD Ryzen 7 5800X 8-Core Processor
Memory: 31.3 GiB of RAM
Graphics Processor: Quadro K4200
Manufacturer: Micro-Star International Co., Ltd.
Product Name: MS-7C84
System Version: 1.0

Code: Select all

[# systemctl status zm.service
× zm.service - ZoneMinder Video Surveillance System
     Loaded: loaded (/usr/lib/systemd/system/zm.service; enabled; preset: disabled)
     Active: failed (Result: exit-code) since Sun 2025-04-13 09:25:15 PDT; 14s ago
 Invocation: 3fe7d6ab78be4a9aacf1f869c498904b
    Process: 470470 ExecStartPre=/usr/bin/zm_database_init --non-interactive (code=exited, status=1/FAILURE)
        CPU: 32ms

Apr 13 09:25:15 Valhalla systemd[1]: Starting ZoneMinder Video Surveillance System...
Apr 13 09:25:15 Valhalla zm_database_init[470470]: Traceback (most recent call last):
Apr 13 09:25:15 Valhalla zm_database_init[470470]:   File "/usr/bin/zm_database_init", line 15, in <module>
Apr 13 09:25:15 Valhalla zm_database_init[470470]:     from zm_dbinit.userprompt import UserPrompt
Apr 13 09:25:15 Valhalla zm_database_init[470470]: ModuleNotFoundError: No module named 'zm_dbinit'
Apr 13 09:25:15 Valhalla systemd[1]: zm.service: Control process exited, code=exited, status=1/FAILURE
Apr 13 09:25:15 Valhalla systemd[1]: zm.service: Failed with result 'exit-code'.
Apr 13 09:25:15 Valhalla systemd[1]: Failed to start ZoneMinder Video Surveillance System.
/code]

[code]# journalctl -xeu zm.service
 
 A start job for unit zm.service has finished with a failure.

The job identifier is 92742 and the job result is failed.
Apr 13 09:25:15 Valhalla systemd[1]: Starting ZoneMinder Video Surveillance System...
Subject: A start job for unit zm.service has begun execution
Defined-By: systemd
Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel

A start job for unit zm.service has begun execution.

The job identifier is 92950.
Apr 13 09:25:15 Valhalla zm_database_init[470470]: Traceback (most recent call last):
Apr 13 09:25:15 Valhalla zm_database_init[470470]:   File "/usr/bin/zm_database_init", line 15, in <module>
Apr 13 09:25:15 Valhalla zm_database_init[470470]:     from zm_dbinit.userprompt import UserPrompt
Apr 13 09:25:15 Valhalla zm_database_init[470470]: ModuleNotFoundError: No module named 'zm_dbinit'
Apr 13 09:25:15 Valhalla systemd[1]: zm.service: Control process exited, code=exited, status=1/FAILURE
Subject: Unit process exited
Defined-By: systemd
Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel

An ExecStartPre= process belonging to unit zm.service has exited.

The process' exit code is 'exited' and its exit status is 1.
Apr 13 09:25:15 Valhalla systemd[1]: zm.service: Failed with result 'exit-code'.
Subject: Unit failed
Defined-By: systemd
Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel

The unit zm.service has entered the 'failed' state with result 'exit-code'.
Apr 13 09:25:15 Valhalla systemd[1]: Failed to start ZoneMinder Video Surveillance System.
Subject: A start job for unit zm.service has failed
Defined-By: systemd
Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel

A start job for unit zm.service has finished with a failure.
Last edited by emailej on Sat Apr 19, 2025 9:32 pm, edited 2 times in total.
User avatar
emailej
Posts: 23
Joined: Wed Aug 24, 2016 12:31 am

Re: ZM service no longer starts after upgrade from 1.35 to 1.36.36 on OpenSuse Tumbleweed

Post by emailej »

Resolved: As an FYI to the community, Dirk Hartmann is no longer maintaining the project and has now deleted it from the build service. So the Monex repository @ https://download.opensuse.org/repositor ... umbleweed/ is no longer viable for us Tumbleweed users. :( Anyways thanks to Dirk for his many years of support and happy trails my friend!

Luckily I was able to find the cause. The python version expected by zm_database_init is python 3.11 but tumbleweed is using python 3.13.2 and that seems to have thrown things out of whack.

Code: Select all


Valhalla:/ # find /usr -name zm_dbinit -type d
/usr/lib/python3.11/site-packages/zm_dbinit

Valhalla:/ # find /usr -name userprompt.py
/usr/lib/python3.11/site-packages/zm_dbinit/userprompt.py

Valhalla:/ # head -n 1 /usr/bin/zm_database_init
#!/usr/bin/python3

Valhalla:/ # python3 --version
Python 3.13.2
When running zm_database_init directly with python 3.11 it goes normally.

Code: Select all

Valhalla:/ # /usr/bin/python3.11 /usr/bin/zm_database_init
INFO: when db is correctly installed and you just reinstalled rpm, then answer all questions with 'n'
/usr/bin/mysql: Deprecated program name. It will be removed in a future release, use '/usr/bin/mariadb' instead
database is already installed. if you want to recreate the database drop it manually!!
Apache successfully restarted
removing lock file
So I updated the shebang in /usr/bin/zm_database_init from #!/usr/bin/python3 to #!/usr/bin/python3.11

Code: Select all

Valhalla:/ # head -n 1 /usr/bin/zm_database_init
#!/usr/bin/python3.11

And after restarting the service everything is running normally. :D :D :D
joelgb
Posts: 11
Joined: Fri Jun 11, 2010 12:50 am

Re: **FIXED** ZM service no longer starts after upgrade from 1.35 to 1.36.35 on OpenSuse Tumbleweed

Post by joelgb »

I branched Monex's packages and have been building recent version of ZoneMinder for a while (submitting them back to his OBS before he deleted).

Here's the release version: https://build.opensuse.org/package/show ... ZoneMinder
Here's 1.37.x/Master: https://build.opensuse.org/package/show ... ZoneMinder


I'm also (re)building the -MP versions of ZoneMinder on a private server. Maybe I can work with iconner to put them out on zoneminder.com for other OpenSuSE users?

-Joel
Post Reply