Re: No receiver registered

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance

From: Sylvain Ross (sross_at_free.fr)
Date: 08/12/04


Date: Thu, 12 Aug 2004 11:04:53 -0700

You were right, this was because I was trying to access the ghost slave
from the master. What is weird is that I was used to get a
SocketException when trying to access a ghost remote object, this time I
get a RemotingException ...

Anyway, to answer your question, both of my objects (slave and master)
are accessed remotly by some external clients.

I think I've been dumb on this case, I was convinced that my problem
when trying to Marshal my slave again. I have misread the exception.

Sorry guys.

Thx anyway

Sylvain
http://ross.fr/

Ken Kolda wrote:
> Based on the exception information, the error occurs when you call the
> IPowerstackCluster.Register() method. In this method you're passing your
> PowerstackServer object to the server process which, in turn, is calling
> back into the object when it attempts to access the ServerID property on the
> IPowerstackServer interface.
>
> When this second remoting call (from the cluster server back to your client
> process) is made, your client process is indicating that there's no object
> registered with the remoting framework for the identity passed by the
> cluster server. That's what the "no receiver registered" means. That said,
> I'm not sure why you're getting this error.
>
> One question for you though: is there a reason you call the
> RemotingServices.Marshal() method on the object? Is your PowerstackServer
> object accessed by other client apps via Activator.GetObject()?
>
> Also, is there any chance that when you call back for the ServerID property
> (within your PowerstackCluster.Register() method) that you're invoking this
> property on the remoted reference from the previous slave instance and not
> the one you just received in the method call parameters?
>
> Ken
>
>
>
> "Sylvain Ross" <sross@free.fr> wrote in message
> news:41196ca7$0$3169$626a14ce@news.free.fr...
>
>>Ken Kolda wrote:
>>
>>
>>>A few questions:
>>>
>>>1) Are your master and slave class in the same process or different
>>>processes?
>>>
>>
>>Nop they are each in a different process (2 differents exe run). I tried
>>even running this on 2 diff machines, and I got the same error.
>>
>>
>>
>>>2) When you say you close the slave and rerun it, do you mean that you
>
> stop
>
>>>the process with the slave in it and then restart that process?
>>>
>>
>>Yes, exactly.
>>
>>
>>
>>>3) What is the error you get when you call RemotingServices.Marshal()?
>>
>>The message is : "no receiver registered"
>>
>>Complete exception data is : The guilty line is the Marshal line.
>>
>>
>
> ============================================================================
> ===
>
>>Unhandled Exception: System.Runtime.Remoting.RemotingException: No
>>receiver regi
>>stered
>>
>>Server stack trace:
>> at
>>System.Runtime.Remoting.Channels.BinaryServerFormatterSink.ProcessMessage(
>>IServerChannelSinkStack sinkStack, IMessage requestMsg,
>>ITransportHeaders reques
>>tHeaders, Stream requestStream, IMessage& responseMsg,
>>ITransportHeaders& respon
>>seHeaders, Stream& responseStream)
>>
>>Exception rethrown at [0]:
>> at
>>System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage req
>>Msg, IMessage retMsg)
>> at
>>System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgDa
>>ta, Int32 type)
>> at PowerstackCommon.IPowerstackServer.get_ServerID()
>> at PowerstackCluster.PowerstackCluster.Register(IPowerstackServer s)
>>in C:\Ho
>>me\Prog\Powerstack\PowerstackCluster\clsPowerstackCluster.vb:line 68
>> at
>>System.Runtime.Remoting.Messaging.StackBuilderSink.PrivateProcessMessage(M
>>ethodBase mb, Object[] args, Object server, Int32 methodPtr, Boolean
>>fExecuteInC
>>ontext, Object[]& outArgs)
>> at
>>System.Runtime.Remoting.Messaging.StackBuilderSink.SyncProcessMessage(IMes
>>sage msg, Int32 methodPtr, Boolean fExecuteInContext)
>>
>>Exception rethrown at [1]:
>> at
>>System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage req
>>Msg, IMessage retMsg)
>> at
>>System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgDa
>>ta, Int32 type)
>> at PowerstackCommon.IPowerstackCluster.Register(IPowerstackServer s)
>> at PowerstackServer.PowerstackServer.RegisterToCluster() in
>>C:\Home\Prog\Powe
>>rstack\PowerstackServer\clsPowerstackServer.vb:line 120
>> at PowerstackServer.PowerstackServer.ClusterCheckerSub() in
>>C:\Home\Prog\Powe
>>rstack\PowerstackServer\clsPowerstackServer.vb:line 105
>>
>>
>
> ============================================================================
> ===
>
>>
>>
>>>Ken
>>>
>>>
>>>"Sylvain Ross" <sross@free.fr> wrote in message
>>>news:41195bba$0$3165$626a14ce@news.free.fr...
>>>
>>>
>>>>Hi,
>>>>I'm having a weird problem here.
>>>>
>>>>Here it is :
>>>>
>>>>I got a kind of master/slave system.
>>>>
>>>>My master class publish it self with the folowing :
>>>>
>>>>RemotingServices.Marshal(Me, "UplanPowerstackServer", Me.GetType())
>>>>
>>>>My slave class publish it self like this :
>>>>
>>>>RemotingServices.Marshal(Me, "UplanPowerstackServer", Me.GetType())
>>>>
>>>>(This is normal that both have the same 'UplanPowerstackServer' name,
>>>>but they don't use the same tcpChannel so this has nothing to do. One
>>>>listen on port 11111, the other one on port 22222.
>>>>
>>>>When I run the slave class, it tries to register to the master remote
>>>>class calling something like myMaster.registerSlave(Me).
>>>>
>>>>
>>>>This work perfectly on the first run. BUT, if I close the slave, and
>>>>rerun it again. It is not able to publish itself again with the
>>>>RemotingServices.Marshal() call.
>>>>
>>>>Note that both of my published object are published on the same
>
> computer.
>
>>>>I have some suspicions about the fact that my Master object keep a ref
>>>>to the remote slave object when the slave call the RegisterSlave(Me). I
>>>>guess that this is why I'm not able to "publish" me again. But i'm not
>>>>sure at all ...
>>>>
>>>>
>>>>Any idea about this ?
>>>>
>>>>
>>>>Thx in advance
>>>>
>>>>
>>>>Sylvain Ross ( http://ross.fr/ )
>>>
>>>
>>>
>
>


Quantcast