Problems with Xdata / Sparkle /Aurelious Server

Hi Wagner.

I am trying to get the REST server running on my PC available to the devices on the network. First I am trying to get it working on my PC.

  • Windows Firewall is not running
  • I shutdown Apache, just in case
  • I stopped Malware Bytes, just in case
  • I have tried different ports, but no luck.

On my machine, localhost works fine such as http://+2001 (as input on the server and Webclient.).

It works fine on the browser if I use localhost:2001

However, it does not work on the browser if I use my PCs Ipaddress. http://192.168.1.224:2001


Next

  • I changed the server and Webclient to use http://192.168.1.224:2001
  • I added the entry http://192.168.1.224:2001 to TMSHttpConfig
  • Webclient works fine.
  • However http://192.168.1.224:2001 still does not work on the browser.
  • netstat shows no entry for 192.168.1.224:2001
  • netstat does show an entry for 127.0.0.1:2001
  • If I configure Apache to use it, then netstat does show the 192.168.1.224:2001

Until netstat shows the port listening at my PC's ipaddress, it is not going to be accessible on the network.

I must be missing something simple. Why is httpd not binding to my PC's ipaddress?

Have you tried to add http://+:2001 to TMSHttpConfig?

And also use http://+:2001 in BaseUrl property of TXDataServer component?

Yes I did.

I also tried other ports, just in case. Finally I tried my http://192.168.1.224:2001.

NO matter what I try, it works fine on localhost. But not with my PCs ipaddress (even on a browser on my PC). And netstat only sees it binding with localhost.

Now I see it's not clear to me what you are trying to access from another computer. You XData server or your Web Core app?

I want to access the XData server.

Can you please send screenshots that show:

  1. Your BaseURL configuration
  2. Your TMSHttpConfig configuration
  3. The ways you successfully access the XData server
  4. The ways that accessing the XData server fails, and error messages.
  • I dont use Windows Firewall, all features are off
  • I use Malwarebytes - its has been terminated
  • I do have Apache running bound to ports 43 and 80 only.

TxDataServer.BaseUrl = http://+:2001/rg
Netstat has 127.0.0.1:2001 Listening, but no entry for 192...
TXDataWebConnection.URL = http://localhost:2001/rg works
Browser.URL = http://localhost:2001/rg ** works**
Browser.URL = http://192.168.1.224:2001/rg does not work
192.168.1.224 refused to connect
Browser.URL = http://192.168.1.224/rg does not work
The requested URL was not found on this server


In Http.Sys Config

  • Removed http://+2001 entry
  • And added 192.168.1.224:2001/rg
  • And added 192.168.1.224:8000

TxDataServer.BaseUrl = http:192.168.1.224:2001/rg
Netstat has 127.0.0.1:2001 Listening, but no entry for 192...
TXDataWebConnection.URL = http://localhost:2001/rg works
TXDataWebConnection.URL = http://192.168.1.224:2001/rg does not work
Browser.URL = http://localhost:2001/rg ** works**
Browser.URL = http://192.168.1.224:2001/rg does not work
192.168.1.224 refused to connect
Browser.URL = http://192.168.1.224/rg does not work
The requested URL was not found on this server

Same errors for Browsers on other machines on the network.

Can you please send a screenshot?
Can you please open the browser developer tools before trying to access the server, then try to connect, and then check in the network tab the result of the failed request? If possible, please send a screenshot.

In http.sys config, reserve the URL http://+:2001/rg. Please send a screenshot of the reserved URLs.

In your TXDataServer, are you setting some properties from code or everything is defined in object inspector?

Its the standard template/wizard. I have only changed the database stuff to use mysql test database. Everything is in object inspector.

localhost works, but using my ipaddress on the same machine does not work. Neither does trying to access from my mobile.





Sorry to ask you this, but are you sure your computer IP is 192.168.1.224?

Are you able to access any other local server in that machine using this IP?

Why are there so many registrations using http://*:<port>? This is not common? Was it you who registered all of them? Is there any other registration there using port 2001?

Yes, its 192.168.1.224. Its always been that. I use fixed IP addresses for everything on my network, including my phone.

  • I just ran ipconfig and that confirms it
  • I just tried http://192.168.1.224 from my laptop and can access my apache home page
  • The Unify router would warn me and disallow multiple machines on the same ipaddress.
  • Also http://rg2 (my machine name) resolves to accessing the home page from my laptop

I haven't made any registrations , except the ones for the REST server at 2001 and again at 2222 just to make sure there was no port conflict. Before a week ago, I wouldn't have known how to. :-)

Why there are sooo many registration in different ports? That is not normal at all. If you didn't do it, some weird software is doing it.

Again, are there any other registered URLs in that huge list that uses port 2001?

If you have not registered them and you know there are no other software using it or conflicting with it, remove all of that registrations and keep just the one you are going to use.

No, there arent an others using 2001. And I had confirmed that another port 2222 did not work either.

One of the options of netstat will give me the files using it.

I will make a copy and remove the unwanted ones.

HI Wagner, I tracked down those ports. The majority are in use by (or owned by) valid processes (such as MS, PCAnywhere, MySql, Apache, Synology Backup, jawa wrc). I am afraid that if I remove the port allocations, something might break.

So, I am installing everything on my laptop. So, it might take over a day to do that.

I have installed on my laptop. Everything works as it should. There are indeed very few port reservations. Something is munted on my desktop.

Qs: Now my desktop gives an error about the licence being on multiple machines. I am not going to be using both at the same time. Terminating Delphi did not fix it. How do I stop this error?

Maybe firewall or antivirus..?

I had turned them (firewall and malware bytes) off for testing. I think that for some reason it does not join localhost to the ipaddress. I have had a similar issue many years ago that I think I had fixed by placing entries in the hosts file.. But Windows upgrades seems to have cleaned it out.

If I wanted to deploy the Windows REST server on AWS.

  1. What other files do I need?
  2. Am I allowed to deploy http.sys
  1. No other files are needed, just your executable. You only need to reserve the URL just like you did in your local machine.
  2. It's available by default in all modern Windows systems.

I have it working on Windows Server on AWS. Thanks.

Since the windows firewall had bound the port to the exe, will it start the exe automatically? Or do I need to make it a service?

I know, I have to remove the VCL bits.
Is there a template or demo to make it a service?