LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 09-10-2005, 05:24 AM   #1
neerajchaudhari
Member
 
Registered: Jun 2005
Location: Pune
Distribution: mandrake
Posts: 30

Rep: Reputation: 15
unable to establish connection


hello everyone,
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
 
Old 09-14-2005, 10:19 PM   #2
pddm
Member
 
Registered: Sep 2005
Distribution: Mint 19.2
Posts: 112

Rep: Reputation: 15
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
iE /var/lib/pgsql/data/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.
 
Old 09-14-2005, 10:22 PM   #3
pddm
Member
 
Registered: Sep 2005
Distribution: Mint 19.2
Posts: 112

Rep: Reputation: 15
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
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Unable to establish internet connection using Linksys WRT54G Router on Mandrake 10 djynen Linux - Networking 3 11-25-2006 10:01 AM
Still can't establish a pppoe connection Andriy Slackware 17 12-06-2005 07:01 AM
Please help me establish an internect connection AlexBell Linux - Hardware 1 05-23-2005 12:11 PM
cannot establish dial up connection Mr_C Linux - Networking 5 06-03-2004 10:32 PM
Unable to establish a connection to my ISP? phobos Linux - Networking 2 10-22-2002 11:59 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 11:29 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration