You are not logged in.
Pages: 1
Hi,
I tested for educational purposes, if Raspberry Pi 3 is capable of building server code. Actually compilation was successful. It was run-time I get following error:
pi@raspberrypi:~/mORMot/SQLite3/Samples/14 - Interface based services $ sudo ./Project14ServerHttp
20170619 17092057 + mORMot.TSQLRestServerFullMemory(76B43020).Shutdown CurrentRequestCount=0 File=
20170619 17092058 - 00.005.173
20170619 17092058 info mORMot.TSQLRestStorageInMemory(76B2B110) TSQLRestStorageInMemory.Destroy
20170619 17092058 info mORMot.TSQLRestStorageInMemory(76B2B200) TSQLRestStorageInMemory.Destroy
20170619 17092058 info mORMot.TSQLRestServerFullMemory(76B43020) TSQLRestServerFullMemory.Destroy
An unhandled exception occurred at $001CEBE4:
EServiceException: TInterfaceFactory.GUID2TypeInfo({9A60C8ED-CEB2-4E09-87D4-4A16F496E5FE}): Interface not registered - use TInterfaceFactory.RegisterInterfaces()
$001CEBE4 TINTERFACEFACTORY__GUID2TYPEINFO, line 53490 of /home/pi/mORMot/SQLite3/mORMot.pas
$001CEB94 TINTERFACEFACTORY__GUID2TYPEINFO, line 53484 of /home/pi/mORMot/SQLite3/mORMot.pas
$00193908 TSQLRESTSERVER__SERVICEDEFINE, line 40995 of /home/pi/mORMot/SQLite3/mORMot.pas
$00010FCC main, line 52 of Project14ServerHttp.dpr
Probably it won't be a good server Raspberry Pi anyway. It was nice to test it though.
Raspberry Pi client connecting to Windows Delphi 10.2 build server, I get error:
TInterfaceFactory.GUID2TypeInfo({some guid number}): Interface not registered - use TInterfaceFactory.RegisterInterfaces().
I am not aware if platform is supported or not. It seems to have problems at the moment. mORMot was a nightly build downloaded today.
Regards,
Ertan
Offline
You will need FPC trunk for working interfaces !
Raspberry (arm-linux) is fully supported.
Last edited by AOG (2017-06-19 18:33:13)
Offline
I have another project built on this same Raspberry Pi. I better do not change fpc version at the moment.
This was fpc 3.0.2 built from sources (Mon, 06 Feb 2017). Svn tag: release_3_0_2, svn revision 35401 Definetely not "trunk" though.
Thanks for the feedback. I will try again later, once I can upgrade to fpc trunk.
Offline
After updating to fpc/trunk I am able to compile and run OK the test server (sample 14).
On the other hand, I have a problem using mORMot with its own communication encryption.
Related server code:
// launch the HTTP server
aHTTPServer := TSQLHttpServer.Create(PORT_NAME, [aServer], '+', useHttpSocket, 32, secSynShaAes);
Related client code:
Client := TSQLHttpClient.Create('192.168.1.101', PORT_NAME, Model);
TSQLHttpClientWinHTTP(Client).Compression := [hcSynShaAes]; // removing this line and everything works
Above code raises following exception for both 32bit & 64bit client EXE:
errorCode: 406
errorText: sicShared execution failed (probably due to bad input parameters) for TestMe.TestString
Raspberry mORMot version: 1.18.3688
Windows mORMot version: 1.18.3599
Sample Windows Delphi 10.2 Tokyo project: mormot-windows-string-test.zip
Sample Raspberry Pi Lazarus project: mormot-pi-string-test.bz2
I am not aware that if there is no support for encryption between different systems. If so, I believe I need to use https with a certificate.
Thanks & regards,
Ertan
Last edited by ertank (2017-06-28 21:36:40)
Offline
Offline
Just to clarify,
Windows is a Delphi 10.2 Tokyo application,
Raspberry Pi is a FPC-Lazarus application
My mistake not indicating this the first time.
Offline
As per suggestion I changed to using WebSockets. Used the guide and 3rd party examples (https://synopse.info/files/html/Synopse … l#TITL_150)
Server relevant code:
aHTTPServer := TSQLHttpServer.Create(PORT_NAME, [aServer], '+', useBidirSocket);
aHTTPServer.WebSocketsEnable(aServer, '2141D32ADAD54D9A9DB56000CC9A4A70');
Client relevant code:
Client := TSQLHttpClientWebsockets.Create('192.168.1.101', PORT_NAME, Model);
TSQLHttpClientWebsockets(Client).WebSocketsUpgrade('2141D32ADAD54D9A9DB56000CC9A4A70');
Client (Delphi application on windows) can get results fine. But, I read below line on server (FPC-Lazarus application on Raspberry Pi):
20170629 12380908 + mORMotHttpServer.TSQLHttpServer(76B21B60).Create useBidirSocket (secNone) on port 8888
My understanding; above line tells me that there is no encryption set. I am a newbie to mORMot so most likely I am doing something wrong here.
Any help is appreciated.
Thanks & regards,
Ertan
Offline
Once you setup a password ('2141D32ADAD54D9A9DB56000CC9A4A70') you have encryption and compression on over the WebSocket upgrade.
secNone is about HTTPS - here we don't use HTTPS encryption, but encryption at WebSockets level.
Offline
Thank you for making that clear.
Offline
Pages: 1