mumble-voip / mumo

Mumble Moderator framework simplifying development of plugins that connect to Mumble servers via Ice. (handles basic ICE connectivity, contains basic module loading and message multiplexing)
52 stars 30 forks source link

Mumo runs into RuntimeError; ends up not running #28

Closed AlexPewMaster closed 5 months ago

AlexPewMaster commented 6 months ago

What happened?

When I try to run ./mumo.py, it almost instantly jumps back into my main terminal prompt.

Logs

2024-03-04 17:40:37,266 DEBUG root Initializing Ice
2024-03-04 17:40:37,299 INFO root Loading slice from server
/tmp/tmpm6_rlrw0.ice:5: error: Can't open include file "Ice/SliceChecksumDict.ice"
    #include <Ice/SliceChecksumDict.ice>
1 error in preprocessor.
2024-03-04 17:40:37,321 ERROR root Retrieving slice from server failed
2024-03-04 17:40:37,322 ERROR root Slice preprocessing failed for `'
Traceback (most recent call last):
  File "/home/alex/mumo/mumo.py", line 119, in dynload_slice
    load_slice(dynslicefilepath)
  File "/home/alex/mumo/mumo.py", line 91, in load_slice
    Ice.loadSlice('', slicedirs + [slice])
RuntimeError: Slice preprocessing failed for `'
Traceback (most recent call last):
  File "/home/alex/mumo/mumo.py", line 585, in <module>
    ret = do_main_program()
          ^^^^^^^^^^^^^^^^^
  File "/home/alex/mumo/mumo.py", line 157, in do_main_program
    dynload_slice(prx)
  File "/home/alex/mumo/mumo.py", line 119, in dynload_slice
    load_slice(dynslicefilepath)
  File "/home/alex/mumo/mumo.py", line 91, in load_slice
    Ice.loadSlice('', slicedirs + [slice])
RuntimeError: Slice preprocessing failed for `'
!! 03/04/24 17:40:37.860 error: communicator not destroyed during global destruction.2024-03-04 17:43:10,953 DEBUG root Initializing Ice
2024-03-04 17:43:10,957 INFO root Loading slice from server
/tmp/tmpznow3bs5.ice:5: error: Can't open include file "Ice/SliceChecksumDict.ice"
    #include <Ice/SliceChecksumDict.ice>
1 error in preprocessor.
2024-03-04 17:43:10,963 ERROR root Retrieving slice from server failed
2024-03-04 17:43:10,964 ERROR root Slice preprocessing failed for `'
Traceback (most recent call last):
  File "/home/alex/mumo/./mumo.py", line 119, in dynload_slice
    load_slice(dynslicefilepath)
  File "/home/alex/mumo/./mumo.py", line 91, in load_slice
    Ice.loadSlice('', slicedirs + [slice])
RuntimeError: Slice preprocessing failed for `'
Traceback (most recent call last):
  File "/home/alex/mumo/./mumo.py", line 585, in <module>
    ret = do_main_program()
          ^^^^^^^^^^^^^^^^^
  File "/home/alex/mumo/./mumo.py", line 157, in do_main_program
    dynload_slice(prx)
  File "/home/alex/mumo/./mumo.py", line 119, in dynload_slice
    load_slice(dynslicefilepath)
  File "/home/alex/mumo/./mumo.py", line 91, in load_slice
    Ice.loadSlice('', slicedirs + [slice])
RuntimeError: Slice preprocessing failed for `'
!! 03/04/24 17:43:11.397 error: communicator not destroyed during global destruction.2024-03-04 17:43:50,941 DEBUG root Initializing Ice
2024-03-04 17:43:50,946 INFO root Loading slice from server
/tmp/tmp3drhszfz.ice:5: error: Can't open include file "Ice/SliceChecksumDict.ice"
    #include <Ice/SliceChecksumDict.ice>
1 error in preprocessor.
2024-03-04 17:43:50,953 ERROR root Retrieving slice from server failed
2024-03-04 17:43:50,953 ERROR root Slice preprocessing failed for `'
Traceback (most recent call last):
  File "/home/alex/mumo/./mumo.py", line 119, in dynload_slice
    load_slice(dynslicefilepath)
  File "/home/alex/mumo/./mumo.py", line 91, in load_slice
    Ice.loadSlice('', slicedirs + [slice])
RuntimeError: Slice preprocessing failed for `'
Traceback (most recent call last):
  File "/home/alex/mumo/./mumo.py", line 585, in <module>
    ret = do_main_program()
          ^^^^^^^^^^^^^^^^^
  File "/home/alex/mumo/./mumo.py", line 157, in do_main_program
    dynload_slice(prx)
  File "/home/alex/mumo/./mumo.py", line 119, in dynload_slice
    load_slice(dynslicefilepath)
  File "/home/alex/mumo/./mumo.py", line 91, in load_slice
    Ice.loadSlice('', slicedirs + [slice])
RuntimeError: Slice preprocessing failed for `'
!! 03/04/24 17:43:51.438 error: communicator not destroyed during global destruction.

Config file (mumo.ini)

;
;Ice configuration
;
[ice]

; Host and port of the Ice interface on
; the target Murmur server.

host = 127.0.0.1
port = 6502

; Slicefile to use (e.g. /etc/slice/Murmur.ice), 
; if empty MuMo will load the slice file from the
; target server at startup.

slice = 

; Semicolon seperated list of slice include directories
; to consider. This is only used on legacy platforms
; with old or broken Ice versions.
slicedirs = /usr/share/slice;/usr/share/Ice/slice

; Shared secret between the MuMo and the Murmur
; server. For security reason you should always
; use a shared secret.

secret = ********

;Check Ice connection every x seconds

watchdog = 15

[murmur]
; Comma seperated list of server ids to listen on (empty for all)
; note that if a server isn't listed here no events for it can
; be received in any module
servers = 

[modules]
mod_dir = modules/
cfg_dir = modules-enabled/
timeout = 2

[system]
pidfile = mumo.pid

; Logging configuration
[log]
; Available loglevels: 10 = DEBUG (default) | 20 = INFO | 30 = WARNING | 40 = ERROR

level =
file = mumo.log

[iceraw]
Ice.ThreadPool.Server.Size = 5

Blanked out secret for privacy reasons

System information

OS: Raspberry Pi OS Lite (Uses Debian 12) CPU Architecture: arm64 / aarch64 Kernel: 6.1.0-rpi8-rpi-v8 Python version: 3.11.2

Kissaki commented 5 months ago

Did you install python3-zeroc-ice (as listed in the requirements)? That should include the ice lib files that it says can't be opened.

AlexPewMaster commented 5 months ago

Did you install python3-zeroc-ice (as listed in the requirements)? That should include the ice lib files that it says can't be opened.

python3-zeroc-ice is installed. Running sudo apt install python3-zeroc-ice returns "python3-zeroc-ice is already the newest version (3.7.8-2.1+b1)."

Kissaki commented 5 months ago

In the ini you set

slicedirs = /usr/share/slice;/usr/share/Ice/slice

Do you see/Can you located Ice/SliceChecksumDict.ice somewhere in there?

Kissaki commented 5 months ago

I don't see it in https://packages.debian.org/bookworm/amd64/python3-zeroc-ice/filelist

so maybe it's no longer part of that deb package.

Kissaki commented 5 months ago

It's part of zeroc-ice-slice

https://packages.debian.org/bookworm/all/zeroc-ice-slice/filelist

/usr/share/ice/slice/Ice/SliceChecksumDict.ice

So /usr/share/ice/slice seems fitting.

Do you have that file under that path?

Is the package zeroc-ice-slice installed?

Looks like the first does not depend on the latter. So I would expect installing it to fix it.

On Ubuntu 10 it looks like I installed it manually too.

Kissaki commented 5 months ago

In the README I added zeroc-ice-slice as a requirement.

Please confirm whether that fixes your issue.

AlexPewMaster commented 5 months ago

Installing the package zeroc-ice-slice seemed to fix the issue! I do have another question though: How do I stop Mumo? I ran python3 mumo.py and it's running in the background. What's the proper way to stop it?

Kissaki commented 5 months ago

The config file has a pidfile setting - https://github.com/mumble-voip/mumo/blob/master/mumo.ini#L45-L46

so that file (mumo.pid by default) should be created, and contain the process ID. You can shut down the process through that process ID.

I would expect the following to work

kill `cat mumo.pid`