unable to establish connection
i have developed an application using j2ee technologies and postgresql-7.2.1 is the database,
now when i run the jboss-3.2.6 application server owned bythe root and i run it in the root login
the database server is started by an user account who is the owner of the pgsql directory
Both the terminals i.e. of jboss and pgsql, displays a message that the server is started successfully,
but for viewing the application when i open the browser and type the url, i get to see the GUI nicely, but cannot use the system because the application is not connected to database
whereas if i access the same url (linux server ) from any other windows machine i see my application running properly.
can anyone tell me what might be the problem
waiting eagerly for your reply
thanks in advance
PostgreSQL 7.2.1 is a rather old version but anyway:
When you initiateed postgreSQL for the 1st time you are supposed to do this as postgres user; this is for security reasons and most packaged flavours of linux have everything pre-setup.
Log as postgres User
[root@DataTaskmanager root]# su postgres
Initialize the Database System
-bash-2.05b$ initdb –D /var/lib/pgsql/data
Activate Listening on the TCPIP port by editing
Locate your postgresql.conf
changing the line:
#tcpip_socket=false to tcpip_socket=true
Alter the file /var/lib/pgsql/data/pg_hba.conf in order to accept requests from the machine(s) you would like to allow access to.
# TYPE DATABASE IP_ADDRESS MASK AUTH_TYPE AUTH_ARGUMENT
local all ident sameuser
host all 10.0.0.4 255.255.255.0 password
host all 10.0.0.9 255.255.255.0 password
add the postgreSQL daemon to your services and start it.
Then you have to get into the database (psql [databasename]) you would like to access and create a database user with the necesary privileges.
The database user you create here is the user (name and password) you will use to access the database with through ODBC.
For PostgreSQL 8.x.x users!
In version 8 the configuration of your pg_hba.conf is slightly different.
There are examples within the file.
The changes to postgresql.conf are no longer required in version 8.x.x
|All times are GMT -5. The time now is 09:09 AM.|