InvalidCallbackException w/ setAuthenticator in MetaCallback

Ice/DBus, Web-Interfaces, Management tools

InvalidCallbackException w/ setAuthenticator in MetaCallback

Postby bbenzinger » Mon Mar 30, 2015 9:19 pm

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-L17

And here's the output I'm getting:

Code: Select all
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!
bbenzinger
 
Posts: 2
Joined: Sun Mar 29, 2015 8:09 pm

Re: InvalidCallbackException w/ setAuthenticator in MetaCall

Postby bbenzinger » Sat Apr 04, 2015 4:36 pm

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#L898

After running the test script again and calling meta.newServer(), I got the following exception:

Code: Select all
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:

Code: Select all
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!
bbenzinger
 
Posts: 2
Joined: Sun Mar 29, 2015 8:09 pm


Return to Scripting

Who is online

Users browsing this forum: No registered users and 1 guest

cron