Archived

This forum has been archived. Please start a new discussion on GitHub.

Need advice in organizing chatroom

Hi,
Please help to organize one chat server for many clients on different machines. Samples provide config that works good in one machine, but when i try to connect to chatroom from different one, it says:
ilukhin@ilukhin-vm:~/workspace/Ice-3.4.1-demos/demo/Glacier2/chat$ ./client --Ice.Trace.Network=2
This demo accepts any user-id / password combination.
user id: rty
password: nkl
-- 02/03/11 18:06:15.756 ./client: Network: trying to establish ssl connection to 172.23.0.227:4064
-- 02/03/11 18:06:15.998 ./client: Network: ssl connection established
   local address = 172.23.0.238:48933
   remote address = 172.23.0.227:4064
permission denied:
internal server error
This demo accepts any user-id / password combination.
user id:
config.client modified to use default router running on remote:
Ice.Default.Router=DemoGlacier2/router:ssl -p 4064 -h 172.23.0.227

Chat sample is started on this remote (server+glacier2router), and local client is connected. All configs is taken from demos.zip provided with Ice-3.4.1 Windows distribution, config.glacier2 changed to use server's ip (172.23.0.227) instead of 127.0.0.1 (with loopback it's not working).
Glacier2.InstanceName=DemoGlacier2
Glacier2.Client.Endpoints=ssl -p 4064 -h 172.23.0.227
Glacier2.Server.Endpoints=tcp -h 172.23.0.227
Glacier2.SessionManager=ChatSessionManager:tcp -h 172.23.0.227 -p 10001
Glacier2.PermissionsVerifier=ChatSessionVerifier:tcp -h 172.23.0.227 -p 10001
Glacier2.SessionTimeout=30
Ice.Plugin.IceSSL=IceSSL:createIceSSL
IceSSL.DefaultDir=../../../certs
IceSSL.CertAuthFile=cacert.pem
IceSSL.CertFile=s_rsa1024_pub.pem
IceSSL.KeyFile=s_rsa1024_priv.pem

Client sample is working fine on server machine (locally) but fails from remote.
Please help with any advice how to make chat to connect and work remotely ( i need to demonstrate at least 3 clients to my boss )

UPD: ups, local client is not working too now. Same as remote, it fails to login :-(
I've run all three with --Ice.Trace.Network=2 option and here's logs
All run under same WinXP machine
client log:
This demo accepts any user-id / password combination.
user id: w345
password: sfgh
-- 02/03/11 18:27:27.093 client.exe: Network: trying to establish ssl connection
 to 172.23.0.227:4064
-- 02/03/11 18:27:27.265 client.exe: Network: ssl connection established
   local address = 172.23.0.227:15596
   remote address = 172.23.0.227:4064
permission denied:
internal server error
This demo accepts any user-id / password combination.
user id:
server log:
-- 02/03/11 18:27:16.218 server.exe: Network: attempting to bind to tcp socket 1
27.0.0.1:10001
-- 02/03/11 18:27:16.234 server.exe: Network: accepting tcp connections at 127.0
.0.1:10001
-- 02/03/11 18:27:16.250 server.exe: Network: published endpoints for object ada
pter `ChatServer':
   tcp -h 127.0.0.1 -p 10001

glacier2router log:

-- 02/03/11 18:27:11.937 C:/soft/Ice-3.4.1.junction/bin/glacier2router.exe: Netw
ork: attempting to bind to ssl socket 172.23.0.227:4064
-- 02/03/11 18:27:11.953 C:/soft/Ice-3.4.1.junction/bin/glacier2router.exe: Netw
ork: accepting ssl connections at 172.23.0.227:4064
-- 02/03/11 18:27:11.968 C:/soft/Ice-3.4.1.junction/bin/glacier2router.exe: Netw
ork: published endpoints for object adapter `Glacier2.Client':
   ssl -h 172.23.0.227 -p 4064
-- 02/03/11 18:27:11.968 C:/soft/Ice-3.4.1.junction/bin/glacier2router.exe: Netw
ork: attempting to bind to tcp socket 172.23.0.227:0
-- 02/03/11 18:27:11.984 C:/soft/Ice-3.4.1.junction/bin/glacier2router.exe: Netw
ork: accepting tcp connections at 172.23.0.227:15591
-- 02/03/11 18:27:11.984 C:/soft/Ice-3.4.1.junction/bin/glacier2router.exe: Netw
ork: published endpoints for object adapter `Glacier2.Server':
   tcp -h 172.23.0.227 -p 15591
-- 02/03/11 18:27:12.000 C:/soft/Ice-3.4.1.junction/bin/glacier2router.exe: Netw
ork: created adapter `Glacier2Internal.Verifiers' without endpoints
-- 02/03/11 18:27:12.000 C:/soft/Ice-3.4.1.junction/bin/glacier2router.exe: Netw
ork: published endpoints for object adapter `Glacier2Internal.Verifiers':

-- 02/03/11 18:27:12.000 C:/soft/Ice-3.4.1.junction/bin/glacier2router.exe: Netw
ork: trying to establish tcp connection to 172.23.0.227:10001
-- 02/03/11 18:27:13.000 C:/soft/Ice-3.4.1.junction/bin/glacier2router.exe: Netw
ork: failed to establish tcp connection
   local address = 0.0.0.0:15592
   remote address = <not connected>
   Network.cpp:1387: Ice::ConnectionRefusedException:
   connection refused: &#1059;&#1076;&#1072;&#1083;&#1077;&#1085;&#1085;&#1072;&#1103; &#1089;&#1080;&#1089;&#1090;&#1077;&#1084;&#1072; &#1086;&#1090;&#1082;&#1083;&#1086;&#1085;&#1080;&#1083;&#1072; &#1079;&#1072;&#1087;&#1088;&#1086;&#1089; &#1085;&#1072; &#1087;&#1086;&#1076;&#1082;&#1083;&#1102;&#1095;&#1077;&#1085;&#1080;&#1077; &#1082; &#1089;&#1077;&#1090;&#1080;.

-- 02/03/11 18:27:13.015 C:/soft/Ice-3.4.1.junction/bin/glacier2router.exe: Netw
ork: trying to establish tcp connection to 172.23.0.227:10001
-- 02/03/11 18:27:14.000 C:/soft/Ice-3.4.1.junction/bin/glacier2router.exe: Netw
ork: failed to establish tcp connection
   local address = 0.0.0.0:15593
   remote address = <not connected>
   Network.cpp:1387: Ice::ConnectionRefusedException:
   connection refused: &#1059;&#1076;&#1072;&#1083;&#1077;&#1085;&#1085;&#1072;&#1103; &#1089;&#1080;&#1089;&#1090;&#1077;&#1084;&#1072; &#1086;&#1090;&#1082;&#1083;&#1086;&#1085;&#1080;&#1083;&#1072; &#1079;&#1072;&#1087;&#1088;&#1086;&#1089; &#1085;&#1072; &#1087;&#1086;&#1076;&#1082;&#1083;&#1102;&#1095;&#1077;&#1085;&#1080;&#1077; &#1082; &#1089;&#1077;&#1090;&#1080;.

-! 02/03/11 18:27:14.015 C:/soft/Ice-3.4.1.junction/bin/glacier2router.exe: warn
ing: unable to contact permissions verifier `ChatSessionVerifier:tcp -h 172.23.0
.227 -p 10001'
   Network.cpp:1387: Ice::ConnectionRefusedException:
   connection refused: &#1059;&#1076;&#1072;&#1083;&#1077;&#1085;&#1085;&#1072;&#1103; &#1089;&#1080;&#1089;&#1090;&#1077;&#1084;&#1072; &#1086;&#1090;&#1082;&#1083;&#1086;&#1085;&#1080;&#1083;&#1072; &#1079;&#1072;&#1087;&#1088;&#1086;&#1089; &#1085;&#1072; &#1087;&#1086;&#1076;&#1082;&#1083;&#1102;&#1095;&#1077;&#1085;&#1080;&#1077; &#1082; &#1089;&#1077;&#1090;&#1080;.

-- 02/03/11 18:27:14.031 C:/soft/Ice-3.4.1.junction/bin/glacier2router.exe: Netw
ork: trying to establish tcp connection to 172.23.0.227:10001
-- 02/03/11 18:27:15.015 C:/soft/Ice-3.4.1.junction/bin/glacier2router.exe: Netw
ork: failed to establish tcp connection
   local address = 0.0.0.0:15594
   remote address = <not connected>
   Network.cpp:1387: Ice::ConnectionRefusedException:
   connection refused: &#1059;&#1076;&#1072;&#1083;&#1077;&#1085;&#1085;&#1072;&#1103; &#1089;&#1080;&#1089;&#1090;&#1077;&#1084;&#1072; &#1086;&#1090;&#1082;&#1083;&#1086;&#1085;&#1080;&#1083;&#1072; &#1079;&#1072;&#1087;&#1088;&#1086;&#1089; &#1085;&#1072; &#1087;&#1086;&#1076;&#1082;&#1083;&#1102;&#1095;&#1077;&#1085;&#1080;&#1077; &#1082; &#1089;&#1077;&#1090;&#1080;.

-- 02/03/11 18:27:15.031 C:/soft/Ice-3.4.1.junction/bin/glacier2router.exe: Netw
ork: trying to establish tcp connection to 172.23.0.227:10001
-- 02/03/11 18:27:16.015 C:/soft/Ice-3.4.1.junction/bin/glacier2router.exe: Netw
ork: failed to establish tcp connection
   local address = 0.0.0.0:15595
   remote address = <not connected>
   Network.cpp:1387: Ice::ConnectionRefusedException:
   connection refused: &#1059;&#1076;&#1072;&#1083;&#1077;&#1085;&#1085;&#1072;&#1103; &#1089;&#1080;&#1089;&#1090;&#1077;&#1084;&#1072; &#1086;&#1090;&#1082;&#1083;&#1086;&#1085;&#1080;&#1083;&#1072; &#1079;&#1072;&#1087;&#1088;&#1086;&#1089; &#1085;&#1072; &#1087;&#1086;&#1076;&#1082;&#1083;&#1102;&#1095;&#1077;&#1085;&#1080;&#1077; &#1082; &#1089;&#1077;&#1090;&#1080;.

-! 02/03/11 18:27:16.031 C:/soft/Ice-3.4.1.junction/bin/glacier2router.exe: warn
ing: unable to contact session manager `ChatSessionManager:tcp -h 172.23.0.227 -
p 10001'
   Network.cpp:1387: Ice::ConnectionRefusedException:
   connection refused: &#1059;&#1076;&#1072;&#1083;&#1077;&#1085;&#1085;&#1072;&#1103; &#1089;&#1080;&#1089;&#1090;&#1077;&#1084;&#1072; &#1086;&#1090;&#1082;&#1083;&#1086;&#1085;&#1080;&#1083;&#1072; &#1079;&#1072;&#1087;&#1088;&#1086;&#1089; &#1085;&#1072; &#1087;&#1086;&#1076;&#1082;&#1083;&#1102;&#1095;&#1077;&#1085;&#1080;&#1077; &#1082; &#1089;&#1077;&#1090;&#1080;.

-- 02/03/11 18:27:27.093 C:/soft/Ice-3.4.1.junction/bin/glacier2router.exe: Netw
ork: attempting to accept ssl connection
   local address = 172.23.0.227:4064
   remote address = 172.23.0.227:15596
-- 02/03/11 18:27:27.265 C:/soft/Ice-3.4.1.junction/bin/glacier2router.exe: Netw
ork: accepted ssl connection
   local address = 172.23.0.227:4064
   remote address = 172.23.0.227:15596
-- 02/03/11 18:27:27.281 C:/soft/Ice-3.4.1.junction/bin/glacier2router.exe: Netw
ork: trying to establish tcp connection to 172.23.0.227:10001
-- 02/03/11 18:27:28.281 C:/soft/Ice-3.4.1.junction/bin/glacier2router.exe: Netw
ork: failed to establish tcp connection
   local address = 0.0.0.0:15597
   remote address = <not connected>
   Network.cpp:1387: Ice::ConnectionRefusedException:
   connection refused: &#1059;&#1076;&#1072;&#1083;&#1077;&#1085;&#1085;&#1072;&#1103; &#1089;&#1080;&#1089;&#1090;&#1077;&#1084;&#1072; &#1086;&#1090;&#1082;&#1083;&#1086;&#1085;&#1080;&#1083;&#1072; &#1079;&#1072;&#1087;&#1088;&#1086;&#1089; &#1085;&#1072; &#1087;&#1086;&#1076;&#1082;&#1083;&#1102;&#1095;&#1077;&#1085;&#1080;&#1077; &#1082; &#1089;&#1077;&#1090;&#1080;.

-- 02/03/11 18:27:28.296 C:/soft/Ice-3.4.1.junction/bin/glacier2router.exe: Netw
ork: trying to establish tcp connection to 172.23.0.227:10001
-- 02/03/11 18:27:29.296 C:/soft/Ice-3.4.1.junction/bin/glacier2router.exe: Netw
ork: failed to establish tcp connection
   local address = 0.0.0.0:15598
   remote address = <not connected>
   Network.cpp:1387: Ice::ConnectionRefusedException:
   connection refused: &#1059;&#1076;&#1072;&#1083;&#1077;&#1085;&#1085;&#1072;&#1103; &#1089;&#1080;&#1089;&#1090;&#1077;&#1084;&#1072; &#1086;&#1090;&#1082;&#1083;&#1086;&#1085;&#1080;&#1083;&#1072; &#1079;&#1072;&#1087;&#1088;&#1086;&#1089; &#1085;&#1072; &#1087;&#1086;&#1076;&#1082;&#1083;&#1102;&#1095;&#1077;&#1085;&#1080;&#1077; &#1082; &#1089;&#1077;&#1090;&#1080;.

-- 02/03/11 18:28:29.937 C:/soft/Ice-3.4.1.junction/bin/glacier2router.exe: Netw
ork: closing ssl connection
   local address = 172.23.0.227:4064
   remote address = 172.23.0.227:15596
Note that this "Удаленная система отклонила запрос на подключение к сети." always means "Remote system denied network connection request"

Comments

  • xdm
    xdm La Coruña, Spain
    Glacier2.Server.Endpoints=tcp -h 172.23.0.227
    Glacier2.SessionManager=ChatSessionManager:tcp -h 172.23.0.227 -p 10001
    Glacier2.PermissionsVerifier=ChatSessionVerifier:tcp -h 172.23.0.227 -p 10001
    

    As your chat server listen on 127.0.0.1 that are wrong endpoints, all that should use 127.0.0.1, you only need to use the public ip in Glacier2.Client.Endpoints.
  • Thanks, that much better! :D Maybe, it's the reason to change samples' configs to reflect typical chatserver configuration needs? Current config works only on local system...