Apache won't start with XData server application


Since I could not figure out how to attach files, I also send this question, with attachments, to info@tmssoftware.com

Using Oracle VM VirtualBox, On my desktop PC, I installed Ubuntu Server 16.04 and also PostgreSQL 12.

I also installed PostgreSQL client library for Ubuntu Server.

I configured the firewalling on Ubuntu server and using pgAdmin on my Windows laptop, I'm able to access the Postgres database in Ubuntu server on the desktop in VirtualBox.

Referring to the YouTube video:
Creating a REST Server on Apache Linux using Delphi and TMS XData - Part 5: TXData/Aurelius server

Following Part 4: TMS Sparkle with Apache, I created the Apache loadable module and after transferring it to Ubuntu and restarting Apache I do get the "Hello from Sparkle!" from Apache.

I then followed Part5: TXData/Aurelius server and created a loadable module with the same name as in Part4 and therefore I could use the same Apache config files as in Part4.

In Delphi, I created a new TMS Aurelius DBConnection and used the option to use a 3rd party component (Adapter Mode) with:
Adapter: FireDac
SQL dialect: PostgreSQL

I then, in Delphi, using the TAureliusConnection component do a successful "Generate entities from database ..."

After compiling for Linux 64 bit, I deployed the Apache loadable module to Ubuntu server and tried to restart Apache without success.

Apache gave the error message:
Job for apache2.service failed because the control process exited with error code. See "systemctl status apache2.service" and "journalctl -xe" for details.

I attached the error.log file and also my program code.


Nols Smit

You can attach files using the "upload" button while writing a text. See screenshot below. Note that not all extensions are allowed, but in worse case you can simply add all files to a zip file and then upload the zip.

According to the code you sent, you can try this:

  1. Comment the automatic creation of the data module in dpr:
  Application.WebModuleClass := WebModuleClass;
//  Application.CreateForm(TFireDacPostgreSQLConnection, FireDacPostgreSQLConnection);
  1. Manually create and destroy the data module in initialization and finalization sections of unit WebModule1:
  Server := TWebBrokerServer.Create;
  FireDacPostgreSQLConnection := TFireDacPostgreSQLConnection.Create(nil);


    'http://ubuntu/tms', TFireDacPostgreSQLConnection.CreateConnection

Thanks, bullseye !

1 Like

This topic was automatically closed 60 minutes after the last reply. New replies are no longer allowed.