Archived
This forum has been archived. Please start a new discussion on GitHub.
Connection through Glacier not working
in Help Center
Hello dear Community and Developers,
Im working on a Mumble administrative Interface, as Mumble uses Ice I need to set up a Connection between the Web-Server and the Root Mumble runs at.
To do this Im using php.
I have made a glacier2 setup on the root, and it runs fine as far as i can judge (Thanks to all the Forum posts here
).
Ice is running on my Web-Server as a php Module. Both Servers run Ice 3.4.1 on Debian Lenny. Murmur is listening for Ice on Port 9098 @ Localhost (127.0.0.1:9098)
Here are my Configs:
Glacier2 Config (Root)
Ice Config (Web)
The experimental php Code that is used to establish the connection (not very successful though):
This is what i got on the Root Servers Console
So what I know is that the connection is closed all the time. BUT i dont know why. I searched all your forums and MAN-Pages but didnt find a clue. Tried also turning IPTABLES of for a little test.
Needless to say that am new to Ice. Maybe Im just missing some stuff. I hope sombody is able to help with this.
Thanks
DLow
edit forgot to post the error itself
Here it is
Im working on a Mumble administrative Interface, as Mumble uses Ice I need to set up a Connection between the Web-Server and the Root Mumble runs at.
To do this Im using php.
I have made a glacier2 setup on the root, and it runs fine as far as i can judge (Thanks to all the Forum posts here
Ice is running on my Web-Server as a php Module. Both Servers run Ice 3.4.1 on Debian Lenny. Murmur is listening for Ice on Port 9098 @ Localhost (127.0.0.1:9098)
Here are my Configs:
Glacier2 Config (Root)
Glacier2.Client.Endpoints=tcp -h *.*.*.* -p 4063 Glacier2.SessionTimeout=60 Glacier2.CryptPasswords=/etc/glacier2/passwords Ice.Trace.Network=2 Ice.Warn.Connections=1
Ice Config (Web)
Ice.Default.Router=Glacier2/router:tcp -h *.*.*.* -p 4063
The experimental php Code that is used to establish the connection (not very successful though):
try{
$router1 = $ICE->stringToProxy($ICE->propertyToProxy("Ice.Default.Router"));
}
catch (Ice_LocalException $ex){
echo "<pre>1";
print_r($ex);
echo "</pre>";
}
try{
$router2 = $router1->ice_uncheckedCast("::Glacier2::Router");
}
catch (Ice_LocalException $ex){
echo "<pre>2";
print_r($ex);
echo "</pre>";
}
try{
$session = $router2->createSession("test", "test");
}
catch (Ice_LocalException $ex){
echo "<pre>3";
print_r($ex);
echo "</pre>";
}
try{
$meta = Murmur_MetaPrxHelper::checkedCast($ICE->stringToProxy('Meta:tcp -h 127.0.0.1 -p 9098'));
}
catch (Ice_LocalException $ex){
echo "<pre>4";
print_r($ex);
echo "</pre>";
}
This is what i got on the Root Servers Console
-- 09/02/10 01:32:44.958 /opt/Ice-3.4.1/bin/glacier2router: Network: accepted tcp connection local address = *.*.*.*:4063 remote address = *.*.*.*:45445 -- 09/02/10 01:32:44.965 /opt/Ice-3.4.1/bin/glacier2router: Network: closing tcp connection local address = *.*.*.*:4063 remote address = *.*.*.*:45445
So what I know is that the connection is closed all the time. BUT i dont know why. I searched all your forums and MAN-Pages but didnt find a clue. Tried also turning IPTABLES of for a little test.
Needless to say that am new to Ice. Maybe Im just missing some stuff. I hope sombody is able to help with this.
Thanks
DLow
edit forgot to post the error itself
Here it is
3Ice_ConnectionLostException Object
(
[error] => 0
[message:protected] =>
[string:private] =>
[code:protected] => 0
[file:protected] => /var/customers/webs/cthun/kservicephp/mumble/mumblevieweralt/mumbleviewer.php
[line:protected] => 281
[trace:private] => Array
(
[0] => Array
(
[file] => /var/customers/webs/cthun/kservicephp/mumble/mumblevieweralt/mumbleviewer.php
[line] => 281
[function] => createSession
[class] => Ice_ObjectPrx
[type] => ->
[args] => Array
(
[0] => test
[1] => test
)
)
)
)
4Ice_ConnectionLostException Object
(
[error] => 0
[message:protected] =>
[string:private] =>
[code:protected] => 0
[file:protected] => /var/customers/webs/cthun/kservicephp/mumble/mumblevieweralt/Murmur.php
[line:protected] => 1111
[trace:private] => Array
(
[0] => Array
(
[file] => /var/customers/webs/cthun/kservicephp/mumble/mumblevieweralt/Murmur.php
[line] => 1111
[function] => ice_checkedCast
[class] => Ice_ObjectPrx
[type] => ->
[args] => Array
(
[0] => ::Murmur::Meta
[1] =>
[2] =>
)
)
[1] => Array
(
[file] => /var/customers/webs/cthun/kservicephp/mumble/mumblevieweralt/mumbleviewer.php
[line] => 290
[function] => checkedCast
[class] => Murmur_MetaPrxHelper
[type] => ::
[args] => Array
(
[0] => Ice_ObjectPrx Object
(
)
)
)
)
)
0
Comments
-
Hi,
Welcome to the forum.
As explained in the manual, the Ice extension by default automatically destroys any communicators that are created during a PHP request. Consequently, any connections that were established by a communicator are also closed when the request completes. This makes it difficult to use Glacier2 from a PHP application since Glacier2 sessions rely on persistent connections.
There is a facility in the Ice 3.4 extension that lets you prevent a communicator from being automatically destroyed. For this to be useful, however, you must ensure that all of the PHP requests for a session are serviced by the same Web server process, which may not be convenient or even feasible.
Regards,
Mark0 -
I forgot to mention that the example in demo/Glacier2/hello shows how to use Glacier2 from PHP. Take a look at the README file in this directory for more information.
Mark0 -
I will study this, thanks
DLow0