Potential Issue with Servoy Runtime Builder?

Hi and good day,

I am currently running a round of tests for our first Servoy application. This particular test is for a Servoy Runtime version running on Windows.

One user has reported that they are getting a “cannot connect to database” error when they attempt to start the software. Upon review of the users log (attached), but the problem appears to be with the last few lines of the ph_hba.conf file, which read…

LOG: invalid IP address “::1”: Unknown host
CONTEXT: line 82 of configuration file “C:/WA4Beta/database/pg_hba.conf”
FATAL: could not load pg_hba.conf

Line 82 is the last line in the file, and it reads (actually, here are the last few lines, with line 82 being the last…

TYPE DATABASE USER CIDR-ADDRESS METHOD

IPv4 local connections:

host all all 127.0.0.1/32 trust

IPv6 local connections:

host all all ::1/128 trust

I had the tester comment out the last line, and then she is able to proceed, although the software loads slowly, which may be related or not.

Now, I’m relatively sure that this tester hasn’t done anything to her system relating to IPv6. And the ph_hba.conf file is included by the Servoy Runtime Builder.

So, is this a problem in the Runtime Builder? I don’t know. But that’s why I thought I’d bring it up here before I reported a possible problem.

As always, any guidance you might have would be greatly appreciated.

Ron

teresa_postgres_log.txt (236 KB)

Ron,

The runtime builder creates a postgres db based on the os of the machine the build runs on.
For example, if you want to create a windows runner, you need to build on windows.
It seems that postgres also creates a conf file based on the networking settings of the build-machine.

Can you compare the setting for the build and the test machines?

Rob

Hi Rob,

The Runtime Builder was run on a Windows 7 PC. The tester is using a laptop running Windows XP.

I understand that we need to run our builds separately for things like Windows and Mac, but this potentially throws another wrinkle into it if the problem is in a particular member of the Windows family. Once we put this into a real installer, I can probably add some logic looking to see what version of Windows I’m on, and the perhaps have a couple of different versions of the pg_hba file. I was thinking I might post this in one of the postgres forums as well to see if they have any thoughts. Ideally, the best solution would be for the Builder to create a runtime version that is more generic than what we’re seeing, but I’m not at all sure how we’d accomplish that.

If it’d be helpful to have some of the log files or the contents of the configuration files, please let me know and I’d be happy to provide them.

Have a good day.

Ron

May I also ask where the pg_hba file comes from? Is it automatically generated by Postgres? Is it something that Servoy has created?

I was looking that the doc in the file, and was wondering if we could accomplish the same thing as using the loopback address in those host lines by using “samehost” instead? I wonder if that might survive on windows xp better, or if the problem actually resides somewhere else.

Thanks.

Ron

One more thing. I matched the pg_hba file that came along with the Runtime to the pg_hba file that’s in the database folder in Developer, and they are the same.

Ron

Sorry, as I figure out new things, I’m posting them. I suppose I should wait, but I didn’t want to lose this thought.

Ok, so further research showed me that “::1/128” is the IPv6 format for the loopback address, the same as 127.0.0.1 is for IPv4. So, the fact that this works on some machines and not others seems to mean that the config file is actually checking to see if these addresses exist, and IPv6 apparently doesn’t exist on the PC exhibiting the problem. So, we either leave off the IPv6 information in all cases, or have conditional logic that will select a pg_hba file based on some indication that there is an IPv6 stack on the PC where it’s being installed. So, more questions…

  1. Is it safe to leave off the IPv6 information?
  2. How could one determine if the IPv6 stack is installed, from an installer?
  3. Or is there another way to set up a pg_hba file that will work regardless of which IP address stack is being used?

Thanks again.

Ron

Hi Ron,

It seems that PostgreSQL errors when there is no IPv6 support.
You could of course work with 2 different config files depending on the support of IPv6 but I think the easiest way is to use a hostname instead.
From PostgreSQL 9.1 and up you can use hostnames in pg_hba.conf so I suggest you use ‘localhost’ (without the quotes) instead of the IPv6 address.
For more info on the pg_hba.conf go to http://www.postgresql.org/docs/9.1/stat … -conf.html

Hope this helps.

Hi Robert,

Thanks again for the guidance. I’ll run some tests on this and post a response back after I’ve done that, in the hopes that some other lonely runtime user will benefit from it. :-)

Ron