error when connecting from mairlist management

Hi,

Currently i’m testing the demo of mAirlist Pro for our radiostation. Everything seem to work, except for the part where i want to get mAirlist Professional Management to work.

Main computer (ip : 192.168.1.39) has the following installed ;

mAirlist 4.0 pro studio
Postgresql 8.4

All works like a charm.

Management computer (ip : 192.168.1.5) has mAirlist 4.0 pro management installed.

On the main computer i have made a pg_hba.conf, and opened it in the pgAdmin management tool. It has the following lines defined ;

TYPE DATABASE USER CIDR-ADDRESS METHOD

@remove-line-for-nolocal@# “local” is for Unix domain socket connections only
@remove-line-for-nolocal@local all all @authmethod@

IPv4 local connections:

host all all 192.168.1.0/24 md5

IPv6 local connections:

host all all ::1/128 md5

The postgresql.conf is also opened, and has the following line ;

listen_addresses = ‘*’

I have restarted the postgresql db.

Now when i go into the configuration of mAirlist pro management, i set up a new db connection (networked),
fill in the following ;

Host name : 192.168.1.39
Database : mairlist
Protocol/DLL version: postgresql-7
User : mairlist
Password : my password

When i hit test login, it gives an error ;

SQL Error: FATAL: no pg_hba.conf entry for host “192.168.1.5”, user “mairlist”, daatabase “mairlist”, SSL off

I’m a bit puzzled right here, how can i get this to work?

Thanks
Raymond

Hm. That’s really strange.

My pg_hba.conf looks like this (local network is 192.168.178.*):

local   all         postgres                          ident

# TYPE  DATABASE    USER        CIDR-ADDRESS          METHOD

# "local" is for Unix domain socket connections only
local   all         all                               ident
# IPv4 local connections:
host    all         all         127.0.0.1/32          md5
host    all         all         192.168.178.0/24          md5
# IPv6 local connections:
host    all         all         ::1/128               md5

So quite the same.

I noticed that there is a setting “hba_file” in postgresql.conf that enables the pg_hba.conf file in the first place:

postgresql.conf:hba_file = '/etc/postgresql/8.4/main/pg_hba.conf'	# host-based authentication file

Perhaps that setting is missing on your machine for some reason, or pointing to a wrong location?

ah yes, that setting was indeed missing (or commented out). Now i’m having some trouble understanding how these values should be set. I have now defined the following in postgresql.conf ;

data_directory = 'data'		# use data in another directory
					# (change requires restart)
hba_file = 'data/pg_hba.conf'	# host-based authentication file
					# (change requires restart)

The setting how they were ;

#data_directory = 'ConfigDir'		# use data in another directory
					# (change requires restart)
#hba_file = 'ConfigDir/pg_hba.conf'	# host-based authentication file
					# (change requires restart)

Since i have placed the configfiles in the directory /data/, i assume i have to change it like i did, but it still gives the same error. (and yes, i did restart the server before testing).

The strange thing was (or maybe it’s pretty normal, i don’t know) that those 2 files didn’t exist in the first place. In the ‘share’ directory there was a pg_hba.conf.sample and a postgresql.conf.sample. What i did there was take the 2 files, put them in a new created directory ‘data’ (because it didn’t exist yet), and renamed them to pg_hba.conf and postgresql.conf. Maybe i have done something wrong there?

I’m not an expert when it comes to the Windows version of PostgreSQL, but I did a few installations, with the one-click installer from www.postgresql.org, and all had their pg_hba.conf and postgresql.conf file in the correct place right away. - What installation package did you use?

I don’t have access to any PostgreSQL installation on Windows in this very moment, so I cannot tell what the correct value would be.

I would try to enter the full absoule path (starting with C:…) there.

It’s been a while since i had the time to look into this again, but i’ve tried this, unfortunately it doesn’t work.

Maybe someone on this board who runs the server on a windows environment, and can tell me how he/she has it configged?

Thanks

Again, what installation package did you use?

I’m pretty sure that the default installer creates a proper postgresql.conf and pg_hba.conf during the installation. If the files aren’t there (until you created them), I believe something went wrong with the installation, or there is another set of config files hidden in a place where you didn’t look.

I just did a test installation with the one-click installer from here, version 9.1.1-1 Win x68-32, on Windows XP.

http://www.enterprisedb.com/products-services-training/pgdownload#windows

Using the default values:

  • Installation directory: C:\Program Files\PostgreSQL\9.1
  • Data directory: C:\Program Files\PostgreSQL\9.1\data

After the installation, the postgresql.conf and pg_hba.conf files were located in data directory, C:\Program Files\PostgreSQL\9.1\data

I think I have an idea what the problem is. What Windows version are you using?

Since Vista, C:\Program Files is write protected for non-admin users. However, there is still legacy software that uses its program folder to store data, just like PostgreSQL does with the default values (data directory inside program directory). Now when a non-admin user tries to create a file in that directory, Windows redirects the write access to a folder named “VirtualStore” which is hidden somewhere in the user’s profile folder.

mAirList had the same problem until some time ago. You can read about it on the website: http://www.mairlist.com/blog/2009/11/improved-vista-and-windows-7-compatibility/

So I would check if there is a VirtualStore folder in anyone’s user profile that contains the PostgreSQL data directory and the two config files. Not necessarily your own account, it could also be the account that the PosgreSQL service runs under.

If this is indeed the problem, I propose that you reinstall PostgreSQL, using a data folder outside Program Files this time.

Torben,

Very sorry for reading over that question :frowning: I used the one click installer from the same website, in this case 8.4.8.1. Don’t know a 100% sure if i installed it by using the ‘Install as administrator’ modus, so i backupped, deinstalled, and downloaded the 9.1.1.-1, it’s installing now on Windows 7 - 32

I’m going back to testing, thanks !

It’s not a matter of the user which installs the server, but rather the user that is is running the server.

When you re-install it (whichever version), make sure to put the data directory somewhere outside C:\Program Files, just to make sure that you don’t run into the VirtualStore issue.

Oh, and sorry for not reading the version number probably. I thought you were trying the v9.x server. Actually, mAirList has been developed under 8.x, but 9.x should run as well. Just give it a try.

I guess that was the reason i chose for 8.* in the first place, anyway, now i uninstalled 8.4, and installed 9.1.1-1, and all seems to be working. Despite of what you said, i did install the data directory in the program files folder in the first place, which also worked. It is there, the config files are in place, and now i’m able to connect from the management computer. So in short : problem solved, thank you very much !

Ok, so the server process (service) is probably running as Administrator, and has write access to the Program Files folder.

It was just a guess anway.

I have no idea what was wrong with the earlier installation. Perhaps somewhat broken. Good to know that v9.1 will work as well. Once I have the time, I will test it a bit more, and then eventually recommend it over the old v8.x versions.