#1 2014-02-04 05:33:57

foncci
Member
Registered: 2013-11-15
Posts: 53

Invalid fake IIxxxx.Method Interface call

Hi,

A simple service in my PC works OK(Win 7) but when I move it to a Windows 2003 server I get this exception Invalid fake IIxxxx.Method Interface call.
Is there any incompatibilities with Windows 2003 server?
It is the same executable so it must be something in the Server.
I'm running the program with Administrator Privileges.

Regards.,

Al

Last edited by foncci (2014-02-04 05:37:48)

Offline

#2 2014-02-04 12:43:30

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,659
Website

Re: Invalid fake IIxxxx.Method Interface call

I do not have WS 2003 at hand.
Ensure you have the latest service pack installed.

No problem with WS 2008, or Windows XP - the latest being of the same "generation" than WS 2003.

Are you using the latest 1.18 unstable version of mORMot source code?

Offline

#3 2014-02-04 15:07:32

foncci
Member
Registered: 2013-11-15
Posts: 53

Re: Invalid fake IIxxxx.Method Interface call

Yes, I'm using the latest source code. This is extremely weird. No antivirus, no firewall. I'm going to reinstall the server and see what happens.

Offline

#4 2014-02-05 05:23:53

foncci
Member
Registered: 2013-11-15
Posts: 53

Re: Invalid fake IIxxxx.Method Interface call

This exception is raise on TIMEOUT. ab, can you give some name to it?

Regards,

Offline

#5 2014-02-05 10:36:42

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,659
Website

Re: Invalid fake IIxxxx.Method Interface call

What is the exception?

Could you please enable logging and check the stack trace in the logs?

Ensure http.sys server (THttpApiServer class) is used.

Offline

#6 2014-02-06 04:02:15

foncci
Member
Registered: 2013-11-15
Posts: 53

Re: Invalid fake IIxxxx.Method Interface call

Client:

  fModel := TSQLModel.Create([], cServiceName);
  fClient := TSQLHttpClient.Create(aServer, aPort, fModel);
  fClient.Compression := [hcSynLZ, hcDeflate, hcSynShaAes];

  if not fClient.ServerTimeStampSynchronize then raise ESynConnError.Create('Servidor no disponible');
  // Si requiere Autenticación hay que autenticar antes de REGISTRAR el Servicio
  if not fClient.SetUser(aUser, aPass) then raise ESynConnError.Create('Error de autenticación');
  if not fClient.ServiceRegister([TypeInfo(IMyPrueba)], sicPerThread)
    then raise ESynConnError.Create('Servicio no disponible en el servidor');
  
  fClient.WinAPI.ReceiveTimeout := 1000

Server:

function TServicePrueba.Echo(s: RawUTF8): RawUTF8;
begin
  sleep(5000);
  Result := s;
end;

If I remove the sleep(5000) everything works fine.

By the way, how can I log to a TMemo instead of a file?

If you need it, I can send you all the source code.

Log File:

	windir=C:\Windows	__COMPAT_LAYER=RunAsAdmin
TSQLLog 1.18 2014-02-05T23:57:49

20140205 23574955  +    TSQLHttpServer(024BA1A0).006BD7A6 
20140205 23574957 trace TSQLRestServerFullMemory(02404410).BeginCurrentThread(THttpApiServer(02432180)) ThreadID=1616 ThreadCount=1
20140205 23574957 trace TSQLRestServerFullMemory(02404410).BeginCurrentThread(THttpApiServer(02432200)) ThreadID=5380 ThreadCount=2
20140205 23574958 trace TSQLRestServerFullMemory(02404410).BeginCurrentThread(THttpApiServer(02432280)) ThreadID=7116 ThreadCount=3
20140205 23574958 info  	TSQLHttpServer(024BA1A0) THttpApiServer(02432100) initialized at http://localhost/SERVICIO_PRUEBA:8888
20140205 23574959  -    00.071.735
20140205 23574959 trace TSQLRestServerFullMemory(02404410).BeginCurrentThread(THttpApiServer(02432300)) ThreadID=2836 ThreadCount=4
20140205 23580424  +    TSQLHttpClientWinHTTP(023D69F0).TimeStamp
20140205 23580424  +    	TSQLHttpClientWinHTTP(023D69F0).006C3E38 
20140205 23580428 trace TSQLRestServerFullMemory(02404410).BeginCurrentThread(THttpApiServer(02432100)) ThreadID=6708 ThreadCount=5
20140205 23580428  +    TSQLRestServerFullMemory(02404410).SERVICIO_PRUEBA/TimeStamp
20140205 23580428 call  	TSQLRestServerFullMemory(02404410) TimeStamp
20140205 23580428 srvr  	TSQLRestServerFullMemory(02404410) GET TimeStamp -> 200
20140205 23580428  -    00.000.015
20140205 23580428 clnt  		TSQLHttpClientWinHTTP(023D69F0) GET SERVICIO_PRUEBA/TimeStamp status=200 state=0
20140205 23580428  -    	00.064.119
20140205 23580428 ret   	135162068612
20140205 23580428  -    00.064.131
20140205 23580428  +    TSQLHttpClientWinHTTP(023D69F0).auth
20140205 23580428  +    	TSQLHttpClientWinHTTP(023D69F0).006C3E38 
20140205 23580428  +    TSQLRestServerFullMemory(02404410).SERVICIO_PRUEBA/auth?UserName=alfonso
20140205 23580428 call  	TSQLRestServerFullMemory(02404410) Auth
20140205 23580428 srvr  	TSQLRestServerFullMemory(02404410) GET auth -> 200
20140205 23580428  -    00.000.031
20140205 23580428 clnt  		TSQLHttpClientWinHTTP(023D69F0) GET SERVICIO_PRUEBA/auth?UserName=alfonso status=200 state=0
20140205 23580428  -    	00.007.065
20140205 23580428 ret   	{"result":"cb30e91817239109ffd0a5870046e128f04619da80c7624d921162fdfe514f76"}
20140205 23580428  -    00.007.078
20140205 23580428  +    TSQLHttpClientWinHTTP(023D69F0).auth
20140205 23580428  +    	TSQLHttpClientWinHTTP(023D69F0).006C3E38 
20140205 23580430  +    TSQLRestServerFullMemory(02404410).SERVICIO_PRUEBA/auth?UserName=alfonso&Password=225c12031c4c3726d7ef93b717733d7ce08a3b001369318a9179a57cef043496&ClientNonce=cb30e91817239109ffd0a5870046e128f04619da80c7624d921162fdfe514f76
20140205 23580430 call  	TSQLRestServerFullMemory(02404410) Auth
20140205 23580430 auth  	TAuthSession(02494080) New "Admin" session alfonso/3387704 created at 127.0.0.1/FF00000660000004 running Mozilla/4.0 (compatible; MSIE 5.5; Windows; Synopse mORMot 1.18 TWinHTTP)
20140205 23580430 srvr  	TSQLRestServerFullMemory(02404410) GET auth -> 200
20140205 23580430  -    00.000.070
20140205 23580430 clnt  		TSQLHttpClientWinHTTP(023D69F0) GET SERVICIO_PRUEBA/auth?UserName=alfonso&Password=225c12031c4c3726d7ef93b717733d7ce08a3b001369318a9179a57cef043496&ClientNonce=cb30e91817239109ffd0a5870046e128f04619da80c7624d921162fdfe514f76 status=200 state=0
20140205 23580430  -    	00.016.359
20140205 23580430 ret   	{"result":"3387704+048cf404d7913f4e4f2651c75d5b4134cf49990c0622d3f02d4234374915265c","logonname":"alfonso"}
20140205 23580430  -    00.016.371
20140205 23580430  +    TServiceFactoryClient(024DCB48).MyPrueba._contract_
20140205 23580430  +    	TSQLHttpClientWinHTTP(023D69F0).006C3E38 
20140205 23580430  +    TSQLRestServerFullMemory(02404410).SERVICIO_PRUEBA/MyPrueba._contract_
20140205 23580430 auth  	TSQLRestRoutingREST(02432480) alfonso/TAuthSession(02494080)
20140205 23580430 call  	TSQLRestServerFullMemory(02404410) MyPrueba._contract_
20140205 23580430 srvr  	TSQLRestServerFullMemory(02404410) POST MyPrueba._contract_ -> 200
20140205 23580430  -    00.000.037
20140205 23580430 clnt  		TSQLHttpClientWinHTTP(023D69F0) POST SERVICIO_PRUEBA/MyPrueba._contract_?session_signature=0033B138000033EA22664429 status=200 state=0
20140205 23580430  -    	00.004.870
20140205 23580430 ret   	{"result":{"contract":"5A3970602848AC42"}}
20140205 23580430  -    00.004.880
20140205 23580654  +    TServiceFactoryClient(024DCB48).MyPrueba.Echo
20140205 23580654  +    	TSQLHttpClientWinHTTP(023D69F0).006C3E38 
20140205 23580654  +    TSQLRestServerFullMemory(02404410).SERVICIO_PRUEBA/MyPrueba.Echo
20140205 23580654 auth  	TSQLRestRoutingREST(02432380) alfonso/TAuthSession(02494080)
20140205 23580654 call  	TSQLRestServerFullMemory(02404410) MyPrueba.Echo
20140205 23580654 call  	TServiceFactoryServer(023E4F00) Adding MyPrueba instance (id=2836)
20140205 23580725 EXC   		EOSError ("System Error.  Code: 12002.\r\n") at 0042AEC9  stack trace 00654542 00404B03 00404AC6 006B1A3B 76BF6CE9 75455AF9 006B18F7 006A9DF4 75452B8C 75456AAD 75447446 75454228 75456958 75448C0B 75447A53 772F5465 772F5172 75456A50 75447AEF 772F51B2 
20140205 23581632 srvr  	TSQLRestServerFullMemory(02404410) POST MyPrueba.Echo -> 200
20140205 23581632  -    09.644.156
20140205 23581632  -    	09.653.788
20140205 23581632  -    09.657.918
20140205 23581632 EXC   EInterfaceFactoryException ("Invalid fake IMyPrueba.Echo interface call: : ") at 006A9BC3  stack trace API 00651D88 00407F7C 777EB46B 777A0133 006A9BC3 006A9E04 006AA63E 
20140205 23583133  +    TSQLHttpClientWinHTTP(023D69F0).auth
20140205 23583133  +    	TSQLHttpClientWinHTTP(023D69F0).006C3E38 
20140205 23583133  +    TSQLRestServerFullMemory(02404410).SERVICIO_PRUEBA/auth?UserName=alfonso&Session=3387704
20140205 23583133 auth  	TSQLRestRoutingREST(02432380) alfonso/TAuthSession(02494080)
20140205 23583133 call  	TSQLRestServerFullMemory(02404410) Auth
20140205 23583133 auth  	TSQLRestServerFullMemory(02404410) Deleted session alfonso/3387704 from 127.0.0.1/FF00000660000004
20140205 23583133 srvr  	TSQLRestServerFullMemory(02404410) GET auth -> 200
20140205 23583133  -    00.000.030
20140205 23583133 clnt  		TSQLHttpClientWinHTTP(023D69F0) GET SERVICIO_PRUEBA/auth?UserName=alfonso&Session=3387704&session_signature=0033B13800003454F6D00CF6 status=200 state=0
20140205 23583133  -    	00.008.197
20140205 23583133  -    00.008.217
20140205 23583133 trace TSQLRestServerFullMemory(02404410).EndCurrentThread(THttpApiServer(02432180)) ThreadID=1616 ThreadCount=4
20140205 23583133 trace TSQLRestServerFullMemory(02404410).EndCurrentThread(THttpApiServer(02432300)) ThreadID=2836 ThreadCount=3
20140205 23583135 trace TSQLRestServerFullMemory(02404410).EndCurrentThread(THttpApiServer(02432200)) ThreadID=5380 ThreadCount=2
20140205 23583135 trace TSQLRestServerFullMemory(02404410).EndCurrentThread(THttpApiServer(02432280)) ThreadID=7116 ThreadCount=1
20140205 23583135 trace TSQLRestServerFullMemory(02404410).EndCurrentThread(THttpApiServer(02432100)) ThreadID=6708 ThreadCount=0
20140205 23583136 info  TSQLRestServerFullMemory(02404410) {   "ClientsCurrent": 0,   "ClientsMax": 1,   "Invalid": 0,   "Responses": 6,   "Modified": 0,   "IncomingBytes": 2639,   "OutcomingBytes": 599,   "OutcomingFiles": 0,   "ServiceCalls": 6,   "CurrentThreadCount": 0,   "ProcessTime": "9.64s"  }

Offline

#7 2014-02-06 06:02:44

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,659
Website

Re: Invalid fake IIxxxx.Method Interface call

You set 1 second timeout on the client for a process which takes 5 seconds.
Sounds like if it works as expected!

You can log into a console directly. It is better than a TMemo IMHO.
See e.g. TForm1.btnShowLogsClick in "\SQLite3\Samples\19 - AJAX ExtJS FishFacts\Unit2.pas"

And if you use the HTTP multi-threaded server, you should better enable thread information logging.

BTW please use BBCode - see http://synopse.info/forum/help.php#bbcode - to format the code and log in your posts.

Offline

#8 2014-02-06 23:45:29

foncci
Member
Registered: 2013-11-15
Posts: 53

Re: Invalid fake IIxxxx.Method Interface call

What I sent you was an example. Of course I don't have 1 second timeout in the client. In the real life I had 1 minute in the client and the process took around 2 minutes when I got the error the first time. If you have any doubt just use 10 second timeout and put a delay of 20 seconds. You should double check, it is not working as expected.

Offline

Board footer

Powered by FluxBB