Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: More cleanup of common errors

...

  • Database errors occur when you run ant fresh_install: There are two common errors that occur.
    • If your error looks like this-- :
      Code Block
      [java] 2004-03-25 15:17:07,730 INFO
      	    org.dspace.storage.rdbms.InitializeDatabase @ Initializing Database
      [java] 2004-03-25 15:17:08,816 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]     at
      	    org.postgresql.jdbc1.AbstractJdbc1Connection.openConnection(AbstractJd
      bc1Connection.java:204)
      [java]     at org.postgresql.Driver.connect(Driver.java:139)
      Wiki Markup
       it usually means you haven't yet added the relevant configuration parameter to your PostgreSQL configuration (see above), or perhaps you haven't restarted PostgreSQL after making the change. Also, make sure that the _db.username_ and _db.password_ properties are correctly set in _\[dspace-source\]/config/dspace.cfg_. An easy way to check that your DB is working OK over TCP/IP is to try this on the command line: 
      Code Block
      psql -U dspace -W -h localhost
      Enter the dspace database password, and you should be dropped into the psql tool with a dspace=> prompt.
    • Another common error looks like this:
      Code Block
      [java] 2004-03-25 16:37:16,757 INFO
      	    org.dspace.storage.rdbms.InitializeDatabase @ Initializing Database
      [java] 2004-03-25 16:37:17,139 WARN
      	    org.dspace.storage.rdbms.DatabaseManager @ Exception initializing DB
      	    pool
      [java] java.lang.ClassNotFoundException: org.postgresql.Driver
      [java]     at java.net.URLClassLoader$1.run(URLClassLoader.java:198)
      [java]     at java.security.AccessController.doPrivileged(Native
      	   Method)
      [java]     at
      	   java.net.URLClassLoader.findClass(URLClassLoader.java:186)
      Wiki Markup
       This means that the PostgreSQL JDBC driver is not present in _\[dspace-source\]/lib_. See above.
  • Tomcat doesn't shut down: If you're trying to tweak Tomcat's configuration but nothing seems to make a difference to the error you're seeing, you might find that Tomcat hasn't been shutting down properly, perhaps because it's waiting for a stale connection to close gracefully which won't happen.
    • To see if this is the case, try running: ps -ef | grep java and look for Tomcat's Java processes. If they stay around after running Tomcat's shutdown.sh script, trying running kill on them (or kill -9 if necessary), then starting Tomcat again.
  • Database connections don't work, or accessing DSpace takes forever: If you find that when you try to access a DSpace Web page and your browser sits there connecting, or if the database connections fail, you might find that a 'zombie' database connection is hanging around preventing normal operation.
    • To see if this is the case, try running: ps -ef | grep postgres
    • You might see some processes like this:
      Code Block
      dspace 16325  1997  0  Feb 14  ?         0:00 postgres: dspace dspace
      	    127.0.0.1 idle in transaction
      This is normal--. DSpace maintains a 'pool' of open database connections, which are re-used to avoid the overhead of constantly opening and closing connections. If they're 'idle' it's OK; they're waiting to be used.
    • However sometimes, if something went wrong, they might be stuck in the middle of a query, which seems to prevent other connections from operating, e.g.:
      Code Block
      dspace 16325  1997  0  Feb 14  ?         0:00 postgres: dspace dspace
      	    127.0.0.1 SELECT
      This means the connection is in the middle of a SELECT operation, and if you're not using DSpace right that instant, it's probably a 'zombie' connection. If this is the case, try running kill on the process, and stopping and restarting Tomcat.