Hi! Stuart,
(1) Postgresql 8.2.1-1 was installed on the DB server, dspace.student.main.ntu.edu.sg.
(2) JDK 1.6.0 and Tomact 6.0 was installed on the Client dspaceweb1.student.main.ntu.edu.sg
(3) Dspace 1.4.1 was extracted to the client dspaceweb1.
a. The postgresql-8.2-504.jdbc2.jar file was copied from the DB server to the client’s “lib” folder
b. In the client, DSpace config file is modified as db.url = jdbc:postgresql://dspace.student.main.ntu.edu.sg:5432/dspace
c. The JDBC Driver (db.driver = org.postgresql.Driver) and Database username and password (db.username = dspace, db.password = dspace) was not modified.
While giving ant fresh_install from the client dspaceweb1 (Dspace source), database connectivity error from the server is given and build is unsuccessful. I pinged from the client to the server which is fine.
Please suggest where I have gone wrong. The error list is given below.
Thanks,
Jayan
Database connectivity error:-
Buildfile: build.xml
compile:
install_code:
build_wars:
init_configs:
setup_database:
[java] 2007-03-26 16:35:24,862 INFO org.dspace.storage.rdbms.InitializeDatabase @ Initializing Database
[java] 2007-03-26 16:35:24,878 INFO org.dspace.core.ConfigurationManager @ DSpace logging installed using log4j.properties
[java] 2007-03-26 16:35:27,018 FATAL org.dspace.storage.rdbms.InitializeDatabase @ Caught exception:
[java] org.postgresql.util.PSQLException: Connection refused. Check that the hostname and port are correct and that the postmaster is accepting TCP/IP connections.
[java] Exception: java.net.ConnectException: Connection refused: connect
[java] Stack Trace:
[java] java.net.ConnectException: Connection refused: connect
[java] at java.net.PlainSocketImpl.socketConnect(Native Method)
[java] at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
[java] at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
[java] at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
[java] at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
[java] at java.net.Socket.connect(Socket.java:519)
[java] at java.net.Socket.connect(Socket.java:469)
[java] at java.net.Socket.<init>(Socket.java:366)
[java] at java.net.Socket.<init>(Socket.java:179)
[java] at org.postgresql.core.PGStream.<init>(PGStream.java:59)
[java] at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:77)
[java] at org.postgresql.core.ConnectionFactory.openConnection(ConnectionFactory.java:66)
[java] at org.postgresql.jdbc2.AbstractJdbc2Connection.<init>(AbstractJdbc2Connection.java:125)
[java] at org.postgresql.jdbc2.Jdbc2Connection.<init>(Jdbc2Connection.java:24)
[java] at org.postgresql.Driver.makeConnection(Driver.java:382)
[java] at org.postgresql.Driver.connect(Driver.java:260)
[java] at java.sql.DriverManager.getConnection(DriverManager.java:582)
[java] at java.sql.DriverManager.getConnection(DriverManager.java:185)
[java] at org.apache.commons.dbcp.DriverManagerConnectionFactory.createConnection(DriverManagerConnectionFactory.java:48)
[java] at org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:290)
[java] at org.apache.commons.pool.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:840)
[java] at org.apache.commons.dbcp.PoolingDriver.connect(PoolingDriver.java:175)
[java] at java.sql.DriverManager.getConnection(DriverManager.java:582)
[java] at java.sql.DriverManager.getConnection(DriverManager.java:207)
[java] at org.dspace.storage.rdbms.DatabaseManager.getConnection(DatabaseManager.java:717)
[java] at org.dspace.storage.rdbms.DatabaseManager.loadSql(DatabaseManager.java:1062)
[java] at org.dspace.storage.rdbms.InitializeDatabase.main(InitializeDatabase.java:71)
[java] End of Stack Trace
[java]
[java] at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:122)
[java] at org.postgresql.core.ConnectionFactory.openConnection(ConnectionFactory.java:66)
[java] at org.postgresql.jdbc2.AbstractJdbc2Connection.<init>(AbstractJdbc2Connection.java:125)
[java] at org.postgresql.jdbc2.Jdbc2Connection.<init>(Jdbc2Connection.java:24)
[java] at org.postgresql.Driver.makeConnection(Driver.java:382)
[java] at org.postgresql.Driver.connect(Driver.java:260)
[java] at java.sql.DriverManager.getConnection(DriverManager.java:582)
[java] at java.sql.DriverManager.getConnection(DriverManager.java:185)
[java] at org.apache.commons.dbcp.DriverManagerConnectionFactory.createConnection(DriverManagerConnectionFactory.java:48)
[java] at org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:290)
[java] at org.apache.commons.pool.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:840)
[java] at org.apache.commons.dbcp.PoolingDriver.connect(PoolingDriver.java:175)
[java] at java.sql.DriverManager.getConnection(DriverManager.java:582)
[java] at java.sql.DriverManager.getConnection(DriverManager.java:207)
[java] at org.dspace.storage.rdbms.DatabaseManager.getConnection(DatabaseManager.java:717)
[java] at org.dspace.storage.rdbms.DatabaseManager.loadSql(DatabaseManager.java:1062)
[java] at org.dspace.storage.rdbms.InitializeDatabase.main(InitializeDatabase.java:71)
Ping from Cleint to server
Pinging 155.69.24.192 with 32 bytes of data:
Reply from 155.69.24.192: bytes=32 time<1ms TTL=128
Reply from 155.69.24.192: bytes=32 time<1ms TTL=128
Reply from 155.69.24.192: bytes=32 time<1ms TTL=128
Reply from 155.69.24.192: bytes=32 time<1ms TTL=128
Ping statistics for 155.69.24.192:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 0ms, Maximum = 0ms, Average = 0ms
From: Stuart Lewis
[sdl] [mailto:s...@aber.ac.uk]
Sent: Monday, March 12, 2007 8:50
PM
To: Jayan
Chirayath Kurian
Subject: RE: Hi!
Hi Jayan,
So you're installing the database on one server, and tomcat/DSpace on the other?
If that is the case, all you should need to do is edit the following line appropriately (in dspace.cfg):
db.url = jdbc:postgresql://localhost:5432/dspace
to something like:
db.url = jdbc:postgresql://dspacedatabase.ntu.edu.sg:5432/dspace
Thanks,
Stuart
From: Jayan Chirayath Kurian [mailto:Ja...@ntu.edu.sg]
Sent: 12 March 2007 09:47
To: Stuart Lewis [sdl]
Subject: Hi!
Hi! Stuart,
Hope u had a nice break.
Here we are planning to install DSpace in a two-tier fashion. One server holds the entire collection items (publications/articles) and another one holds the DSpace application software. This was suggested since there are huge collections to be imported into DSpace and to maintain the access speed. If I need to implement in a two-tier fashion how shall I proceed with the installation of POSTGRESQL and DSpace 1.4.1. The database connectivity parameter needs to be configured in this case. Could you please suggest how to proceed.
Thanks,
Jayan
Hi! Stuart,
(1) Initially Telnet from client to server was not working. So Server TELNET service was enabled through services.msc. Telnet dspace.student.main.ntu.edu.sg was getting connected from the client.
(2) While giving telnet dspace.student.main.ntu.edu.sg:5432 from the client, the connection was getting refused. The message displayed was "Could not open connection to the host, on port 23: connection failed"
(3) In the server, pg_hba was modified to include a single line that gives the IP address of client.
# TYPE DATABASE USER CIDR-ADDRESS METHOD
# IPv4 local connections:
host all all 127.0.0.1/32 md5
# IPv6 local connections:
#host all all ::1/128 md5
host all all 155.69.24.194/32 md5
(4) Postgresql service was stopped, reloaded configuration and service started again from start menu-postgreSQL options.
I think telnet is getting connected but not to the specified port.
Do I need to change “md5” to “trust” or the port No. While installing postgresql the default port no taken by the system was 5432.
Could you please suggest
Thanks,
Jayan
"Jayan Chirayath Kurian"
<Ja...@ntu.edu.sg>
Sent by: dspace-te...@lists.sourceforge.net 27/03/2007 02:18 PM |
|
Issuing telnet
dspace.student.main.ntu.edu.sg 5432 gives "Could
not open connection to the host, on port
5432: connection failed". Any other config files need to be
changed in postgresql ?
Thanks,
Jayan
"Jayan Chirayath Kurian"
<Ja...@ntu.edu.sg>
27/03/2007 02:33 PM |
|
Michael Judd <m.j...@griffith.edu.au>
Sent by: dspace-te...@lists.sourceforge.net 27/03/2007 02:52 PM |
|
https://lists.sourceforge.net/lists/listinfo/dspace-tech -------------------------------------------------------------------------
Hi,
(1) By enabling Telnet service on the DB server, through
services.msc, client was able to get connected to the DB server.
(2) While giving telnet dspace.student.main.ntu.edu.sg 5432 from the client, the connection was
getting refused. The message displayed was "Could not open connection to
the host, on port 5432: connection failed"
(3) In the server, pg_hba was modified to include a single line that gives the
IP address/subnet of client.
host all
all 155.69.24.194 255.255.255.0 trust
(4) In the server, postgresql.cfg file was modified to include
tcpip_socket=true
listen_addresses = '*'
(5) netstat on DB server gives
Active Connections
Proto Local Address Foreign Address State
TCP dspace:ms-wbt-server 155.69.104.75:4333 ESTABLISHED
TCP dspace:4920 DSPACEDEV1:netbios-ssn TIME_WAIT
TCP dspace:4921 DSPACEDEV1:netbios-ssn TIME_WAIT
TCP dspace:4922 DSPACEDEV1:netbios-ssn TIME_WAIT
TCP dspace:4923 DSPACEDEV1:netbios-ssn TIME_WAIT
TCP dspace:4924 DSPACEDEV1:netbios-ssn TIME_WAIT
(6) netstat on client gives
Active Connections
Proto Local Address Foreign Address State
TCP dspaceweb1:3256 72.5.124.55:http CLOSE_WAIT
TCP dspaceweb1:3257 a203-117-134-209.deploy.akamaitechnologies.com:http CLOSE_WAIT
TCP dspaceweb1:ms-wbt-server 155.69.104.75:3666 ESTABLISHED
The telnet client connection to server is getting refused. Please suggest.