alfg / murmur-rest

:headphones: A RESTful API for administering virtual Mumble servers. Built with Flask and Ice.
https://github.com/alfg/murmur-rest
79 stars 34 forks source link

Error while creating a server #42

Closed Rhodless closed 2 years ago

Rhodless commented 2 years ago

I am trying to create a new mumble server instance but it doesn't seem to work. Here is the output of the POST request

$ sudo curl -X POST http://localhost:8080/servers/
{"message":"Error creating server"}

The murmur rest api output

127.0.0.1 - - [11/Jun/2022 15:01:55] "POST /servers/ HTTP/1.1" 500 -

Note that I installed the rest api without changing anything.

Rhodless commented 2 years ago

I tried debugging to see where is the problem. It doesn't print the debug 2 so the problem is coming from server = meta.newServer()
image

alfg commented 2 years ago

Hey @Rhodless, do you have the Ice server installed and running on the host?

Rhodless commented 2 years ago

I installed zeroc-ice using the command in the readme, and I installed mumble-server. I didn't change anything.

alfg commented 2 years ago

Hi @Rhodless, did you install both python-zeroc-ice and zeroc-ice-compilers? Also, are you running this through the Docker container or without?

Also check if the murmur.ini file is configured similar to the one provided in this project: https://github.com/alfg/murmur-rest/blob/master/etc/murmur.ini

Rhodless commented 2 years ago

Hello, yes both python-zeroc-ice and zeroc-ice-compilers are installed. I am not using the Docker container, I'm just starting the script with the runserver.py file. Finally, I checked my murmur.ini and it was the exact same than the file you sent.

alfg commented 2 years ago

Got it. Does this happen on the Docker container too? Sounds like a connectivity issue with Ice? Hard to say. You can try using the Python repl or a minimal script to test the connection and create a server programmatically, just to confirm:

For example, running with settings.py in the same directory:

import os
import settings
import Ice
Ice.loadSlice('', ['-I' + Ice.getSliceDir(), os.path.join(settings.MURMUR_ROOT, settings.SLICE_FILE)])
import Murmur
ice = Ice.initialize()
proxy = ice.stringToProxy(settings.ICE_HOST.encode('ascii'))
meta = Murmur.MetaPrx.checkedCast(proxy)

server = meta.newServer()

And see if the server is created or an error is outputted.

Rhodless commented 2 years ago

Hello, so I tried the code and this is new error:

Murmur.InvalidSecretException: exception ::Murmur::InvalidSecretException
{
}
!! 06/15/22 13:45:11.852 error: communicator not destroyed during global destruction.

So I looked on google to find answers, and I found something. So you have to comment this line on the murmur-server.ini: icesecretwrite= Now its working fine. Thank you.