RTC Forums
November 24, 2024, 03:24:17 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
 
   Home   Help Login Register  
Pages: [1]
  Print  
Author Topic: #13 : Resolved protocol is unknown  (Read 9219 times)
HelgeLange
RTC Expired
*
Posts: 100


« on: May 12, 2015, 01:18:00 PM »

Hi Danijel,

since yesterday evening I have this error "Project XXXXX raised exception class ERtcConnection with message '#13 : Resolved protocol is unknown'."
The Server gets his function executed without any error, the client, when the result comes in, raises this exception before entering the result event handler...

Any ideas ?
Thanks in advance,
Helge
Logged
D.Tkalcec (RTC)
Administrator
*****
Posts: 1881


« Reply #1 on: May 12, 2015, 07:27:39 PM »

1. Is this error happening on a HTTPS connection (SSL/TLS encrypted)?

2. How is the TRtcHttpClient component configured (all property values)?

Best Regards,
Danijel Tkalcec
Logged
HelgeLange
RTC Expired
*
Posts: 100


« Reply #2 on: May 12, 2015, 09:47:06 PM »

it's a normal connection, nothing fancy

Quote
  object HttpClient: TRtcHttpClient
    ServerAddr = '192.168.3.102'
    ServerPort = '1002'
    OnConnectError = HttpClientConnectError
    AutoConnect = True
    Left = 40
    Top = 32
  end

as I said, the function enters without problem in the server software and executes well, without problems

When it returns to the tablet there it causes this exception
Logged
D.Tkalcec (RTC)
Administrator
*****
Posts: 1881


« Reply #3 on: May 12, 2015, 10:20:21 PM »

What do you mean by "Tablet"? Which Delphi version is used to compile the Client and which Platform is being targeted?

PS. Could you please try to work with me on this by giving me some details, or do I have to pull everything out of you by force? Tongue

Best Regards,
Danijel Tkalcec
Logged
HelgeLange
RTC Expired
*
Posts: 100


« Reply #4 on: May 12, 2015, 10:36:59 PM »

I use atm Delhi XE7, the server in 32bit, the client in android. Strange thing is, that I have 2 ClientModules in 2 different DataModules calling the same server, but different ServerModules. One works, the other one doesn't
I almost think it might have something to do with context within the android.
Logged
D.Tkalcec (RTC)
Administrator
*****
Posts: 1881


« Reply #5 on: May 12, 2015, 11:02:55 PM »

I'm not sure what you mean by "context", but if both of your ClientModule/SeverModule pairs are configured identically (except for the ModuleFileName - which obiously has to be different, for two ServerModules to be used on the same Server) I'm not sure what could be causing that error with one ClientModule/ServerModule pair if everythng works fine with the other.

If there is no significant difference between the components and their usage, but you can't figure out why this is happening, then I will have to ask you to try and reproduce the problem by creating a new simple Client and Server Project set, which (if you can reproduce the problem this way) you could send me for testing (with source code).

Or ... you can keep posting more details about your project and maybe we bump into something simple, like - for example - the "rtcFMX.GUI" which has to be used somewhere in your Project for the components to work correctly on Android.

Thanks.

Best Regards,
Danijel Tkalcec
Logged
HelgeLange
RTC Expired
*
Posts: 100


« Reply #6 on: May 12, 2015, 11:11:00 PM »

Strange thing is that it worked until yesterday and the settings haven't changed I checked with my SVN.
I try to build the file from scratch to see what's happened. I'll keep you posted
Logged
HelgeLange
RTC Expired
*
Posts: 100


« Reply #7 on: May 27, 2015, 01:23:43 PM »

Now I have the error again, but it seems like the http server has a problem to start listen on a android phone. But i need the second connection for call back purposes, as I can't use delayed calls and I also would need it for tablet-to-tablet communication

Any ideas ? is it supposed to work ?
Logged
HelgeLange
RTC Expired
*
Posts: 100


« Reply #8 on: May 27, 2015, 10:37:22 PM »

I just created an empty project with nothing inside than a TRtcHttpServer, A servermodule and a functiongroup, everything set up and connected, in windows it works, on android (4.4.2) on my galaxy note 10.1 it doesn't, it comes in the event OnListenError with the above mentioned error.

Just tried with a TRtcTcpServer and has the same error OnListenError
Logged
D.Tkalcec (RTC)
Administrator
*****
Posts: 1881


« Reply #9 on: May 28, 2015, 08:06:13 AM »

That is something entirely different. In your last post, you wrote that your Server was running on Windows and your Client was on Android. But now, you are trying to run the Server on Android. Why would you want to run a Server on a mobile Device? Anyway ... if you really NEED to run a Server on a mobile device, you will need to fiddle with privileges for your mobile App, because anything you do on Android requires a permission and the error message is most likely a "Permission Denied" error from the API.

Best Regards,
Danijel Tkalcec
Logged
HelgeLange
RTC Expired
*
Posts: 100


« Reply #10 on: May 28, 2015, 08:11:55 AM »

The reason for running a HttpServer in Android is the callback. Sometimes the server has to inform the client about stuff...
But I'll go and check the permission stuff to see, if there is something fr running a server on a phone or tablet Smiley

Edit: Just checked, it uses only the INTERNET permission, I do have that.

Edit2: problem solved, any port under 1024 needs root access, since I tried to listen on 1011, I got the error, I set it to 8020 and worked without problems. One thing more for the knowledge base, right ?

Thanks again, Danijel
Logged
D.Tkalcec (RTC)
Administrator
*****
Posts: 1881


« Reply #11 on: May 28, 2015, 08:30:32 AM »

Yes, ports below 1024 require a special permission on all platforms except Windows.

PS. I strongly advise against running a Server on a mobile device to have the abbility for a Client to receive notifications from the Server. That is going to bite you in the rear, sooner or later. I would recommend using the TRtcGateway component on the Server (Windows) and TRtcHttpGateClient on all other devices, or using RTC Delayed Calls with polling for callbacks.

Best Regards,
Danijel Tkalcec
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines Valid XHTML 1.0! Valid CSS!
Page created in 0.027 seconds with 16 queries.