bbenzinger Posted March 30, 2015 Share Posted March 30, 2015 Hello,I'm trying to attach an authenticator from the started() MetaCallback, but when I do I receive an InvalidCallbackException. I used the testauth.py script included in the Mumble repo as a starting point and modified it to add an authenticator when a new server is booted. When running the script it creates the ice connection, attaches meta callbacks, and then attaches server and authenticator callbacks to each booted server. This works and authentication works as expected. When I create a new virtual server (using meta.newServer()), the started() meta callback triggers and successfully attaches server callbacks to the new server but raises an exception after about 5 seconds when attaching the same authenticator callbacks.Here's a gist of my test script: https://gist.github.com/bbenzinger/8f2b583e29759589df9e#file-gistfile1-py-L17And here's the output I'm getting: Creating callbacks... Attaching callbacks to virtual server 1 running Mumble Attaching callbacks to virtual server 2 running Mumble From MetaCallbackI : Attaching callbacks to virtual server 3. ... Attaching server callbacks ... Attaching authenticator callbacks -! 03/29/15 13:27:02.456 warning: dispatch exception: Util.cpp:306: Ice::UnknownUserException: unknown user exception: Traceback (most recent call last): File "auth_test.py", line 17, in started server.setAuthenticator(authR) File "Murmur.ice", line 2719, in setAuthenticator InvalidCallbackException: exception ::Murmur::InvalidCallbackException { } identity: 1E292893-650F-45C9-B64E-2940374DD509 facet: operation: started remote host: 127.0.0.1 remote port: 57718 I'm unsure how to debug this and the exception doesn't seem to provide any additional information. I've tested using Mumble and Murmur server versions 1.2.7, 1.2.8, and 1.3.0 locally on my mac.Any help is greatly appreciated. Thanks! Quote Link to comment Share on other sites More sharing options...
bbenzinger Posted April 4, 2015 Author Share Posted April 4, 2015 I've managed to figure this out by building murmurd and returning the original exception message instead of InvalidCallbackException here https://github.com/mumble-voip/mumble/blob/master/src/murmur/MurmurIce.cpp#L898After running the test script again and calling meta.newServer(), I got the following exception: From MetaCallbackI : Attaching callbacks to virtual server 2. ... Attaching server callbacks ... Attaching authenticator callbacks -! 04/04/15 11:54:33.938 warning: dispatch exception: Util.cpp:419: Ice::UnknownLocalException: unknown local exception: ConnectionI.cpp:1663: Ice::ConnectTimeoutException: timeout while establishing a connection Researching this, I found this can happen when a server does not have a big enough thread pool and that setting the Ice.ThreadPool.Server.SizeMax will allow the pool to grow or shrink as needed. Setting this property did the trick: init_data = Ice.InitializationData() init_data.properties = Ice.createProperties([]) init_data.properties.setProperty("Ice.ImplicitContext", "Shared") init_data.properties.setProperty("Ice.Default.EncodingVersion", "1.0") init_data.properties.setProperty("Ice.ThreadPool.Server.SizeMax", "5") The authenticator now connects and works as expected.I've set this property to 5, though I'm unsure how to determine what size is appropriate for a server thread pool. If anyone has additional insight into this, please let me know. Thanks! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.