| Summary: | dev-db/postgresql-8.1.5 ignores listen_address | ||
|---|---|---|---|
| Product: | Gentoo Linux | Reporter: | Juan <juan> |
| Component: | [OLD] Server | Assignee: | PgSQL Bugs <pgsql-bugs> |
| Status: | RESOLVED FIXED | ||
| Severity: | normal | CC: | esigra |
| Priority: | High | ||
| Version: | unspecified | ||
| Hardware: | All | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Package list: | Runtime testing required: | --- | |
|
Description
Juan
2006-12-10 11:53:35 UTC
I've just committed new init.d/conf.d files for the versions 8.0 and 8.1 with a revision bump. Could you please update and check again? It is possible to override the settings in postgresql.conf with commandline arguments. If you for example have "-i" as argument for the postmaster, this overrides listen_adresses with listen_adresses="*". This revision brought some errors: I allowed etc-update to override /etc/conf.d/postgresql which I then customized afterwards. I added the following: PGOPTS="-i -h 127.0.0.1 -p 5432" nmap still shows postgre listening on both interfaces (lo and eth0) Additionally, the postgre init script is gives me this error on restart: shadow dracco # /etc/init.d/postgresql restart * Caching service dependencies ... [ ok ] * Stopping PostgreSQL ... /sbin/start-stop-daemon: invalid schedule item (must be [-]<signal-name>, -<signal-number>, <timeout> or `forever' Try `/sbin/start-stop-daemon --help' for more information. I have to zap postgresql before I can start it. I could have sworn the restart command was 'restart' and not reload. My bad. So omit my entry regarding this revisions init script. More info: ps shows postgre running with on -i as the arg with the args I added. shadow dracco # ps -ef |grep postgre postgres 5456 1 0 Dec12 ? 00:00:00 /usr/bin/postmaster -D /var/lib/postgresql/data -i grr. I really with there was a preview function with bugzilla so I don't have to commit a new post to correct my grammar errors... To grammatically correctly my last entry: More info: ps shows postgre running with -i as the only arg and without the args I added in /etc/conf.d/postgresql Copy-paste from 'man postmaster' about the switch '-i': Allows remote clients to connect via TCP/IP (Internet domain) connections. Without this option, only local connections are accepted. This option is equivalent to setting listen_addresses to * in postgresql.conf or via -h. This option is deprecated since it does not allow access to the full functionality of listen_addresses. It's usually better to set listen_addresses directly. **************************** About the other thing. This is rather strange since I get here: postgres 9410 1 3 19:42 ? 00:00:00 /usr/bin/postmaster -D /var/lib/postgresql/data --silent-mode=true -i -h 127.0.0.1 -N 512 -B 1024 with PGOPTS="-i -h 127.0.0.1 -N 512 -B 1024" Well, it's becoming stranger. Short of rebooting this server (i don't really want that), I have changed PGOPTS again to: PGOPTS="-N 1024 -B 2048" But ps still reports with incorrect command line options passed: shadow dracco # /etc/init.d/postgresql reload * Reloading PostgreSQL configuration ... No process in pidfile `/var/lib/postgresql/data/postmaster.pid' found running; none killed. [ ok ] shadow dracco # ps -ef |grep postmaster postgres 5456 1 0 Dec12 ? 00:00:00 /usr/bin/postmaster -D /var/lib/postgresql/data -i root 28006 27657 0 10:49 pts/0 00:00:00 grep --colour=auto postmaster Need more info? Just let me know. It's a pretty normal PgSQL installation but this issue has always been. It's only recently that I've been required to run SQL on lo interfaces for security reasons bringing me to file a bug report. Here is an error you probably should know about: shadow init.d # /etc/init.d/postgresql stop * Caching service dependencies ... [ ok ] * Stopping PostgreSQL ... /sbin/start-stop-daemon: invalid schedule item (must be [-]<signal-name>, -<signal-number>, <timeout> or `forever' Try `/sbin/start-stop-daemon --help' for more information. So I do have to 'zap' it before starting the service (since 'reload' wasn't working, I tried this). I figured out the 'stop' issue. etc-update didn't force me to update /etc/conf.d/postgresql so a couple of new variables were missing. I found these new vars from a file from a new PgSQL install. Adding the vars cured the error regarding the my previous post. issue 100% solved. I 'stopped' and 'zapped' (respectively) postgresql, checked one of my webapps that uses this DB to find that it was still able to pull information from the DB. So I figured it was still in memory but top and ps didn't show it. Did a 'killall postmaster', restarted pgsql and everything is running as it should. About the -i option.... I apologize but I assumed this was required based on the output of 'postmaster --help'. I did notice that on the new/fresh install, the -i option is gone. Probably a good thing. =) Hmm, ok. So I'm resolving this bug as fixed with the latest revision bump. Cheers :-) |