Jump to content

marcovaldo

Members
  • Content Count

    13
  • Joined

  • Last visited

Community Reputation

0 Neutral
  1. marcovaldo

    License Questions -

    Many thanks for your Answer - I want to do it the proper way, therefore was asking.
  2. marcovaldo

    License Questions -

    Hello All, Hi Kiriakos Vlahos, Many thanks, Kiriakos, for creating the P4D and Pyscripter! (I am only just scratchig on the surface, but I am allready aware that this is a great tool and opportunity) Question (maybee anybody here has a hint) if I include P4D Code into my commercial application, how do the different licenses propagate through the call stack: Delphi code (commercial project) D4P Interface Code (MIT license) Python code (PSFL similar to BSD license ) 3rd party Library (GPL or Commercial license ) Question: Isolates the D4P and Python layer the Delphi App from the GPL constraints or propagates this up so that I need either putting my App into GPL too or purchase a commercial license of the 3rd party lib? Kind greetings, marcovaldo
  3. Hi, Thx for your suggestions! In the meantime I am looking more into Using ICS for the downcomms. Something event driven might be easier for implementation with complex protocols handling many different kinds of protocols (needing timeouts, single byte answers etc.) Unfortunately there will be lost of (partially yet undefined) downstream protocols... And if I use Indy for the MARS (Uplink side) only I can later on decide to convert to apache module (NO - i think this will not work; Apache Module will run in a Apache Request/Answer Thread and will not have means to keep connections with the IoT sensor nodes continously ) Greetings, Marcovaldo
  4. Always finding first answers _after_ posting something... (I can confirm I have searched around before posting...) On ICS in Service and Application Example (Thx François Piette!)
  5. Hi All, I am working on a MARS Server (runnable as Application AND as Service). MARS REST interface is used to communicate with Enterprise IoT Servers (eg. Upstream comms) The same Server also shall communicate using various TCP protocols to IoT Sensors (eg Downstream comms) ? What TCP library would you recommend to use for this ? - Indy is used by (the stand alone server of MARS). Its a blocking/synchronous library (the downcomms will have to be moved into threads) ? Might using this interfere with the MARS internals? - ICS - I was very happy using this over the years in kind of Bread and butter VCL apps. But not sure if they depend much on Windows Message Loop / Events and might be difficult to handle in a Windows Service/ Multithreading enviroment (I will have to implement much to keep the engine under the hood running) (I think there is a Multiping Example by Angus Robertson at least, which might help me) ? Is it better to go for Indy or even for the Synapse lightweight library - because a linear comms task in a thread is simpler structure than all that message pump ens Event stuff ? Many thanks in advance for any suggestion guiding my half-noob in a swampy area! Seasonal Greetings & a good 2022! marcovaldo
  6. Final Remark: This confusion has been triggered by my specific setup (maybee no one else uses this...) => if you run a Win32 Service on Win64, then the current folder IS SysWOW64, no matter where the executable is located.
  7. Hi, I did not want to trigger a dispute about this :-0 Only wanted to share my findings - might they (possibly) be helpful to others... Yes, I tried absolute file locations before (like C:\certs\localhost.pem etc). did not work here (or only worked with application, not with service. Thank you for contributing to Indy & kind Greetings, m.
  8. They were ignored in application folder (if started as service) In my case they _have_been_ all the time in application folder. But only used by server compiled as application. When service has been started, it was terminated after a few seconds (Event entry: Service failed at start....) I first thought it has to do with my special setup (Delphi in VM, Project files outside in shared folder), but it also failed if i copied service application, OpenSSL dlls, certs to a local folder inside VM, like C:\Test. Could this be a special case of Win10 running in a VMWare Player VM then?
  9. Hi All, Sorry for duplicating information! I repostet under new Topic for better visibility. May this save others the days I lost... CERTIFICATE LOCATIONS FOR WINDOWS SERVICE DIFFERENT TO WINDOWS APPLICATION! (at least on Win10/Pro as I have) : the cert files (supposed to be in bin/executable folder) MUST BE IN C:\Windows\SysWOW64\ folder also a cert.pem is queried from C:\usr\local\ssl\cert (i copied the root cert to this name, however not sure if necessary) so if sticking with Indy default names, the files are: C:\Windows\SysWOW64\localhost.pem root cert C:\Windows\SysWOW64\localhost.crt cert C:\Windows\SysWOW64\localhost.key key Selfsigned cert OK (created using XCA) For copying to this folder, of course Admin rights are necessary. If you are using a VMWare VM for Delphi 10.4.X, as I do, and the project files are in the shared VM drive outside the VM, you need 2-step copy: 1) project/bin to local desktop 2) local desktop to SysWOW64 All the above is for WIN32 Service target, as I did not tryout X64 yet. I am happy to be out of the swamp and back on the road (after fighting Windows and not Project) Kind Greetings, ckranich
  10. Hi All, Sysinternals ProcMon is your friend 🙂 Problem solved. CERTIFICATE LOCATIONS FOR WINDOWS SERVICE DIFFERENT TO WINDOWS APPLICATION! (at least on Win10/Pro as I have) : the cert files (supposed to be in bin/executable folder) MUST BE IN C:\Windows\SysWOW64\ folder also a cert.pem is queried from C:\usr\local\ssl\cert (i copied the root cert to this name, however not sure if necessary) so if sticking with Indy default names, the files are: C:\Windows\SysWOW64\localhost.pem root cert C:\Windows\SysWOW64\localhost.crt cert C:\Windows\SysWOW64\localhost.key key Selfsigned cert OK (created using XCA) For copying to this folder, of course Admin rights are necessary. If you are using a VMWare VM for Delphi 10.4.X, as I do, and the project files are in the shared VM drive outside the VM, you need 2-step copy: 1) project/bin to local desktop 2) local desktop to SysWOW64 All the above is for WIN32 Service target, as I did not tryout X64 yet. I am happy to be out of the swamp and back on the road (after fighting Windows and not Project) I will duplicate this to new Topic for better visibility. Might it be helpful for others! Kind Regards, ckranich
  11. At first supposed it might have todo with certificates somehow (or with user context versus local system context to access certificates) But - same certificates work if used from MARS Sercer compiled as VCL Application - no change if service is started using local user instead of local system - Datasnap REST server works OK running as Service using same (selfsigned) certificates and same OpenSSL dlls. => Indy seems to be able to use SSL from Service Application (DataSnap uses Indy too) => will have to dig deeper (traced until inherited call)
  12. Additional Info: First thought it might have todo with the Certificates (However when run Server as App they work OK) Recreated some fresh ones using XCA. no change. This has definitively to do with enabling SSL. As soon as a SSL Port is assigned by FServer.Engine.PortSSL := the Startup stalls in MARShttpServerIndy.Startup (never finished) SetupSSLIOHandler() exit OK SetupThreadPooling() exit OK with 100 Threads Any Ideas? I know that Andrea suggests a Reverse Proxy etc for SSL (and doing only Http on the Rest server), but in this project a standalone Service App has been requested by customer ... Kind Greetings, ckranich
  13. Hi Andrea, Hi All, I am struggling at the same theme - In Reference to the 1000th commit: This works very well when using ServerVCLApplication, but I ran into problems getting SSL AND SERVICE running: I have stated in Server.Service.ServiceCreate() or Server.Service.ServiceStart() : FServer.Engine.Port := 0; FServer.Engine.PortSSL := 8443; Service terminates few seconds after started with: "The xxxxxx service on Local Computer started and then stopped. Some services stop automatically if they are not in use by other service or programs The Windows Events say: Failed to load root certificate. Therefore I copied the 3 files from bin folder (where they were as default and work for the ServerApplication to an absolute path like C:\CERT\ and setup this by (I thought, maybee the Service is started in a different context): (also in Server.Service.ServiceCreate() , just before setting FServer.Engine.PortSSL) FServer.SSLIOHandler.SSLOptions.RootCertFile := 'C:\CERT\localhost.pem'; FServer.SSLIOHandler.SSLOptions.CertFile := 'C:\CERT\localhost.crt'; FServer.SSLIOHandler.SSLOptions.KeyFile := 'C:\CERT\localhost.key'; still not working... (I am a complete newbee with services unfortunately; Any suggestions very wellcome) Kind Regards, ckranich
×