PDA

View Full Version : NR Feedback "Existing Client"



danward79
February 22nd, 2006, 08:37 AM
Hi,

I have a problem were on the local machine, I develope my system on, Girder does not release the Client.

So when I restart NR I do not get any feedback from G4. Sometimes I can get by this by restarting NR or Doing a script reset, sometimes even exiting both does not help!.

I just exited NR, Exited G4, restarted G4 and started NR, and still no feedback. Girder logger says Existing client!

Any ideas?

Rob H
February 22nd, 2006, 09:07 AM
I think I know what might be causing this - in NetRemote.lua find the local function Register()

There should be a few lines of code like this :-


if (Clients[ipaddr]) then
client = Clients[ipaddr]
clientMutex:unlock()

if client.threadObj and not client.threadObj:isthreadrunning() then
client:Start()
end

Try adding the following lines after the assignment to client:-


client.connection = connection
client.Port = port

danward79
February 22nd, 2006, 10:04 AM
So is this correct?


--[[

Functions for maintain list of clients

--]]


local function Register(connection, ipaddr, port)
if (ipaddr and ipaddr ~= '') then
NRFPrint('Registering NR client')
local client
clientMutex:lock()
if (Clients[ipaddr]) then
client = Clients[ipaddr]
clientMutex:unlock()

if client.threadObj and not client.threadObj:isthreadrunning() then
client:Start()
end

client.connection = connection
client.Port = port

else
client= NRClient:New(connection)

client.IP = ipaddr
client.Host = comserv.GetNameInfo (ipaddr)

Clients[ipaddr] = client;

clientMutex:unlock()

client:Start()
end
NRFPrint("Connected")
client:SyncState()
else
NRFPrint ("Cannot register Client, invalid IP address",1)
end
end

Rob H
February 22nd, 2006, 10:06 AM
I'd move those two lines up a bit - just before the


clientMutex:unlock()

danward79
February 22nd, 2006, 10:16 AM
Cool, I will let you know how it goes.

Rob H
February 22nd, 2006, 11:46 PM
Did it work?

danward79
February 23rd, 2006, 07:23 AM
So far so good, althou I have done limited testing

danward79
February 25th, 2006, 11:03 AM
Rob,

I have just seen this again with version 0.21 of NRF.

It occurred after a script reset.

To recreate, I did the following.

1. Script Reset G4.
2. Exit NR
3. Restart NR after reset complete.
4. It does not work, Logger msg, says Existing Client

or as I just did it.

1. Exit NR
2. Script Reset G4
3. Restart NR
4. Not working.

Sorry about the 1,2,3,4. Just wanted to make sure I did it clearly.

:)

Rob H
February 25th, 2006, 11:59 AM
What's not working in the 2nd case?

danward79
February 25th, 2006, 12:21 PM
That is two ways of recreating it, same problem for both

danward79
February 25th, 2006, 01:31 PM
Just to confirm the message is still existing client

Rob H
February 25th, 2006, 01:41 PM
Now, that's what worries me - the word 'existing' just doesn't appear in version 0.21

danward79
February 25th, 2006, 11:02 PM
I'll do a screen shot later.

danward79
February 26th, 2006, 12:27 AM
Ah I see what you mean now.

I think this may be an error relating to the com server, then?

Rob H
February 26th, 2006, 12:34 AM
I'm confused - is NR talking to Girder successfully?

danward79
February 26th, 2006, 01:12 AM
no not at all

Rob H
February 26th, 2006, 01:15 AM
Does it work if you exit both NR and Girder - then start Girder, wait for it to initialise then start NR?

What versions of each?

danward79
February 26th, 2006, 01:20 AM
Yeah works if I exit both completely and restart.

I am on G4.0.03b NRF 0.21 and NR 1.5.60

Rob H
February 26th, 2006, 01:22 AM
Can you try just exiting from NR - leave it until G4 notices that it's gone and then restart NR.

danward79
February 26th, 2006, 01:29 AM
How long should it take to notice?

Rob H
February 26th, 2006, 09:45 AM
It appears as though the problem only occurs when Wifi is involved. I can't find the power adaptor for my old WAP so I've ordered a new one. I'll take a look at this when I receive it.

danward79
February 26th, 2006, 09:52 AM
Thanks

danward79
March 4th, 2006, 01:38 AM
Hi,

Rob and I have been thru this from top to tail and we think this could be an issue for Ben or Ron to resolve.

The issue seems to be with connecting actually to one client which is a G4 client on my development machine. NR does not have a problem connecting to G3 on the same machine or G4 on my HTPC.

This is the same for both my PPC and NR run on the Local machine. Both connect to G3 on my dev machine and G4 on my htpc, but not G4 on my dev machine.

I have attached the logs for my ppc and dev machine

[3972] 10:12:54.613] NetRemote] INIT: CCF Loaded
[3972] 10:12:54.613] NetRemote] Creating instance -1018
[3972] 10:12:54.613] NetRemote] Creating instance -1014
[3972] 10:12:54.613] NetRemote] Creating default instance -999
[3972] 10:12:54.613] NetRemote] Creating default instance -3014
[3972] 10:12:54.629] NetRemote] Creating instance -4
[3972] 10:12:54.629] NetRemote] Creating instance -2
[3972] 10:12:54.660] PluginSocket [WebServer:-2]] Starting server listen thread
[3972] 10:12:54.660] WebServer] Web server started on 15000
[3972] 10:12:54.660] PluginSocket [WebServer:-2]] Entered server listen thread
[3972] 10:12:54.707] NetRemote] Creating instance -10
[3972] 10:12:54.723] PluginSocket [MediaBridge:-10]] TCP/IP Socket connected (attempting handshake)
[3972] 10:12:54.723] NetRemote] Creating instance -2010
[3972] 10:12:54.723] NetRemote] Creating instance -3
[3972] UUIRTOpen: ThreadID = 00000648
[3972] Creating New Global Set!
[3972] 10:12:54.738] Infrared] Couldn't load IR library, IR is disabled
[3972] 10:12:54.738] Infrared] Initializing socket
[3972] 10:12:54.738] NetRemote] Creating instance -1
[3972] 10:12:54.754] NetRemote] Creating instance -2101
[3972] 10:12:54.754] NetRemote] Creating instance -2201
[3972] 10:12:54.770] PluginSocket [Girder:-2101]] TCP/IP Socket connected (attempting handshake)
[3972] 10:12:54.770] PluginSocket [Girder:-2201]] TCP/IP Socket connected (attempting handshake)
[3972] 10:12:54.785] Girder] Girder 3 connected, starting listener
[3972] 10:12:54.785] PluginSocket [Girder:-2101]] Handshake successful - socket connected
[3972] 10:12:54.801] PluginSocket [GirderFeedback:-2201]] Starting server listen thread
[3972] 10:12:54.801] PluginSocket [Girder:-2101]] Socket connected
[3972] 10:12:54.801] Girder] Listener started on 30000
[3972] 10:12:54.801] PluginSocket [GirderFeedback:-2201]] Entered server listen thread
[3972] 10:12:54.801] PluginSocket [Girder:-2201]] Handshake successful - socket connected
[3972] 10:12:54.817] PluginSocket [GirderFeedback:-2201]] Accepting client connection
[3972] 10:12:54.817] PluginSocket [Girder:-2201]] Socket connected
[3972] 10:12:54.817] Girder] FEEDBACK: Received connection


The client in question is -1 above and -1001 for the ppc log.

As you can see in both cases they are not making a connection, and nothing in shown in the g4 log either.

If I type table.print(comserv.GetClientTable()) I get the following from the g4 client in question which shows no nr clients.

{
[1] = {
["Type"] = "GIRDER",
["Hostname"] = "stacker",
["Recent"] = true,
["Port"] = 20005,
["Address"] = "192.168.0.7",
},
[2] = {
["Type"] = "GIRDER",
["Hostname"] = "htpc",
["Recent"] = true,
["Port"] = 20005,
["Address"] = "192.168.0.4",
},
[3] = {
["Type"] = "MediaBridge",
["Hostname"] = "htpc",
["Recent"] = true,
["Port"] = 20003,
["Address"] = "192.168.0.4",
},
[4] = {
["Type"] = "GIRDER",
["Hostname"] = "wendy",
["Recent"] = false,
["Port"] = 20005,
["Address"] = "192.168.0.5",
},
}

If I type table.print(comserv.GetConnections()) I get nothing either

{
}


Any ideas?

Only way I seem to be able to reconnect is to exit g4 completely and start again, which is not good. Even an F11 does not work.

danward79
March 4th, 2006, 01:50 AM
This is debug views log for exiting g4 and restarting


[2768] TQuitCore.Commence (1)
[2768] TQuitCore.Commence (2)
[2768] Corequit Start
[2768] Corequit: 1a
[2768] Unload Plugin (1)C:\Program Files\Promixis\Girder\plugins\cm111217.dll
[2768] Unload Plugin (2)C:\Program Files\Promixis\Girder\plugins\cm111217.dll
[2768] Unload Plugin (3)C:\Program Files\Promixis\Girder\plugins\cm111217.dll
[2768] Unload Plugin (1)C:\Program Files\Promixis\Girder\plugins\ComSvr.dll
[2768] Unload Plugin (2)C:\Program Files\Promixis\Girder\plugins\ComSvr.dll
[2768] Unload Plugin (3)C:\Program Files\Promixis\Girder\plugins\ComSvr.dll
[2768] Unload Plugin (1)C:\Program Files\Promixis\Girder\plugins\gip2.dll
[2768] Unload Plugin (2)C:\Program Files\Promixis\Girder\plugins\gip2.dll
[2768] Unload Plugin (3)C:\Program Files\Promixis\Girder\plugins\gip2.dll
[2768] Unload Plugin (1)C:\Program Files\Promixis\Girder\plugins\httpd.dll
[2768] Unload Plugin (2)C:\Program Files\Promixis\Girder\plugins\httpd.dll
[2768] Unload Plugin (3)C:\Program Files\Promixis\Girder\plugins\httpd.dll
[2768] Unload Plugin (1)C:\Program Files\Promixis\Girder\plugins\MiscUtils.dll
[2768] Unload Plugin (2)C:\Program Files\Promixis\Girder\plugins\MiscUtils.dll
[2768] Unload Plugin (3)C:\Program Files\Promixis\Girder\plugins\MiscUtils.dll
[2768] Unload Plugin (1)C:\Program Files\Promixis\Girder\plugins\onewire.dll
[2768] Unload Plugin (2)C:\Program Files\Promixis\Girder\plugins\onewire.dll
[2768] Unload Plugin (3)C:\Program Files\Promixis\Girder\plugins\onewire.dll
[2768] Unload Plugin (1)C:\Program Files\Promixis\Girder\plugins\Scheduler.dll
[2768] Unload Plugin (2)C:\Program Files\Promixis\Girder\plugins\Scheduler.dll
[2768] Unload Plugin (3)C:\Program Files\Promixis\Girder\plugins\Scheduler.dll
[2768] Unload Plugin (1)C:\Program Files\Promixis\Girder\plugins\Sendmessage.dll
[2768] Unload Plugin (2)C:\Program Files\Promixis\Girder\plugins\Sendmessage.dll
[2768] Unload Plugin (3)C:\Program Files\Promixis\Girder\plugins\Sendmessage.dll
[2768] Unload Plugin (1)C:\Program Files\Promixis\Girder\plugins\serial.dll
[2768] Unload Plugin (2)C:\Program Files\Promixis\Girder\plugins\serial.dll
[2768] Unload Plugin (3)C:\Program Files\Promixis\Girder\plugins\serial.dll
[2768] Unload Plugin (1)C:\Program Files\Promixis\Girder\plugins\taskcreate.dll
[2768] Unload Plugin (2)C:\Program Files\Promixis\Girder\plugins\taskcreate.dll
[2768] Unload Plugin (3)C:\Program Files\Promixis\Girder\plugins\taskcreate.dll
[2768] Unload Plugin (1)C:\Program Files\Promixis\Girder\plugins\treescript.dll
[2768] Unload Plugin (2)C:\Program Files\Promixis\Girder\plugins\treescript.dll
[2768] Unload Plugin (3)C:\Program Files\Promixis\Girder\plugins\treescript.dll
[2768] Unload Plugin (1)C:\Program Files\Promixis\Girder\plugins\WinCon.dll
[2768] Unload Plugin (2)C:\Program Files\Promixis\Girder\plugins\WinCon.dll
[2768] Unload Plugin (3)C:\Program Files\Promixis\Girder\plugins\WinCon.dll
[2768] Q_EXIT received!
[2768] CoreThread 2
[2768] EndThread: l_CoreThread/girder.dll 2340
[2768] Corequit: 1
[2768] TSafeEventLogger.Destroy 1
[2768] TSafeEventLogger.Destroy 2
[2768] Corequit: Done.
[2768] Core Done
[600] %s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s %s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s
[600] %s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s %s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s
[600] winhanlding
[600] %s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s %s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s
[600] %s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s %s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s
[600] Auxlib loaded at 2119696384
[600] tree init okay
[600] T: 1000 = NQ Thread
[600] Girder Core Begin
[600] LCD
[600] Audio Mixer (Sound)
[600] Generic X10 Remotes
[600] Girder Events
[600] Keyboard
[600] TaskSwitch
[600] TaskCreate
[600] Device Notify driver
[600] Communication Server
[600] Scheduler
[600] Generic Serial
[600] Tree Script
[600] Generic Internet Plugin (GIP)
[600] One-Wire Plugin
[600] Web Server Plugin
[600] Firefly x2
[600] X10-CM1X
[600] T: 3940 = UI Thread
[600] T: 3604 = CoreThread
[600] CreateThread: l_CoreThread/girder.dll 3604
[600] CoreThread 1
[600] Loading C:\Program Files\Promixis\Girder\comserverlib.dll at Base Address 0x7E920000
[600] Loading C:\Program Files\Promixis\Girder\comserverlib.dll at Base Address 0x7E920000
[600] Loading C:\Program Files\Promixis\Girder\plugins\ComSvr.dll at Base Address 0x7E880000
[600] Loading C:\Program Files\Promixis\Girder\plugins\gip2.dll at Base Address 0x7E8E0000
[600] Loading C:\Program Files\Promixis\Girder\plugins\httpd.dll at Base Address 0x7E750000
[600] Loading C:\Program Files\Promixis\Girder\plugins\Scheduler.dll at Base Address 0x7E430000
[600] Loading C:\Program Files\Promixis\Girder\plugins\Sendmessage.dll at Base Address 0x7E460000
[600] Loading C:\Program Files\Promixis\Girder\plugins\serial.dll at Base Address 0x7E470000
[600] Loading C:\Program Files\Promixis\Girder\plugins\taskcreate.dll at Base Address 0x7E4C0000
[600] Loading C:\Program Files\Promixis\Girder\plugins\treescript.dll at Base Address 0x7E500000
[600] Loading C:\Program Files\Promixis\Girder\plugins\WinCon.dll at Base Address 0x7E530000
--GetMcast: 700a8c0 8a25a2a8
[3972] 10:39:49.348] PluginSocket [Girder:-1]] TCP/IP Socket connected (attempting handshake)
[3972] 10:39:49.363] PluginSocket [Girder:-1]] Handshake successful - socket connected
[3972] Got Girder.-1.LinkActive
[3972] 10:39:49.363] PluginSocket [Girder:-1]] Socket connected
[3972]
[3972] 10:39:49.363] NetRemote] Finished monitoring variable ?ö????????
[600] LUA Endtime: 01/01/1601 00:00 (1)
[600] LUA Endtime: 01/01/1601 00:00 (1)
[600] LUA Endtime: 01/01/1601 00:00 (1)
[600] LUA Endtime: 01/01/1601 00:00 (1)
[600] LUA Endtime: 01/01/1601 00:00 (1)
[600] LUA Endtime: 01/01/1601 00:00 (1)
[600] LUA Endtime: 01/01/1601 00:00 (1)
[600] LUA Endtime: 01/01/1601 00:00 (1)
[600] LUA Endtime: 01/01/1601 00:00 (1)
[600] LUA Endtime: 01/01/1601 00:00 (1)
[600] LUA Endtime: 01/01/1601 00:00 (1)
[600] LUA Endtime: 01/01/1601 00:00 (1)
[600] LUA Endtime: 01/01/1601 00:00 (1)
[600] LUA Endtime: 01/01/1601 00:00 (1)
[600] LUA Endtime: 01/01/1601 00:00 (1)
[600] LUA Endtime: 01/01/1601 00:00 (1)
[600] LUA Endtime: 01/01/1601 00:00 (1)
[600] LUA Endtime: 01/01/1601 00:00 (1)
[600] LUA Endtime: 01/01/1601 00:00 (1)
[600] LUA Endtime: 01/01/1601 00:00 (1)
[600] LUA Endtime: 01/01/1601 00:00 (1)
[600] LUA Endtime: 01/01/1601 00:00 (1)
[600] LUA Endtime: 01/01/1601 00:00 (1)
[600] LUA Endtime: 01/01/1601 00:00 (1)
[600] LUA Endtime: 01/01/1601 00:00 (1)
[600] LUA Endtime: 01/01/1601 00:00 (1)
[600] LUA Endtime: 01/01/1601 00:00 (1)
[600] LUA Endtime: 01/01/1601 00:00 (1)
[600] LUA Endtime: 01/01/1601 00:00 (1)
[600] LUA Endtime: 01/01/1601 00:00 (1)
[600] LUA Endtime: 01/01/1601 00:00 (1)
[600] LUA Endtime: 01/01/1601 00:00 (1)
[600] LUA Endtime: 01/01/1601 00:00 (1)
[600] LUA Endtime: 01/01/1601 00:00 (1)
[600] LUA Endtime: 01/01/1601 00:00 (1)
[600] LUA Endtime: 01/01/1601 00:00 (1)
[600] LUA Endtime: 01/01/1601 00:00 (1)
[600] LUA Endtime: 01/01/1601 00:00 (1)
[600] LUA Endtime: 01/01/1601 00:00 (1)

danward79
March 6th, 2006, 01:12 PM
Does anyone know when the Man comes back?

Rob H
March 6th, 2006, 10:54 PM
I think it's this weekend coming.

Ben S
March 11th, 2006, 05:00 AM
I'm here - My first instinct says we need to examine G4, as if restarting NetRemote doesn't correct it, it seems to be something internal to G4. We should probably have Ron take a look.

Rob - do you agree that this is probably the case?

Rob H
March 11th, 2006, 05:30 AM
I'm not 100% sure - it would be good to check this with a purely Win32 wireless connection, but I don't have one here to try it with.

Welcome back.

danward79
March 11th, 2006, 05:53 AM
Welcome Back Ben.

I think it is probably a good idea to get Ron to pipe in too

danward79
March 12th, 2006, 08:09 AM
Ben,

Will you be asking Ron to look at this or should I give him a shout?

Promixis
March 12th, 2006, 09:01 AM
Ben,

Will you be asking Ron to look at this or should I give him a shout?

call him -> better you then me :lol:

Ben S
March 12th, 2006, 04:09 PM
I've asked Ron to chime in.

Ron
March 12th, 2006, 04:38 PM
Subscribing.. tomorrow this is at the top of my list.

danward79
March 18th, 2006, 08:51 AM
Hi Guy's

Did you manage to get anywhere with this?