What you need to do is:
Install opennms into its directory.
Open $opennms_home/etc/opennms-datasources and alter the first user/password
pair.
They need to be the same as the second (at least in my situation) pair. Save
the file.
Run the install -dis and it will work.
My OS is opensuse 11.3 64
Op 28 okt. 2010 om 22:28 heeft Daniel Geske <daniel.ge...@horngroup.com> het
volgende geschreven:
> Hi OpenNMS devs,
>
> I have an installation problem each time I upgrade OpenNMS and need to run
> $OPENNMS_HOME/bin/install -dis
> The -d switch (perform database actions) is causing the installer to go into
> org.opennms.netmgt.dao.db.InstallerDb.databaseSetUser(InstallerDb.java:2072).
>
> For some reason the parameter values are not placed into the prepared
> statement in lines 2078 to 2082.
> The SQL ALTER statement in the PreparedStatement is used to assert the
> OpenNMS tables are owned by the configured Postgres user.
> This problem is 100% reproducible on a RHEL 5 machine, but I don't have the
> problem on a CentOS 5 machine. Both machines run the same RPM version of
> PostgreSQL and OpenNMS. The PostgreSQL JDBC driver comes with OpenNMS, so
> that's the same, too.
>
> The RHEL installation was upgraded through many versions and the problem
> first appeared when upgrading to the 1.8 branch, while the CentOS
> installation was a fresh install beginning with 1.8.x.
>
> In InstallerDb.java, when I change the PreparedStatement into a Statement and
> concatenate the String values (table name objName and user name m_user) into
> the SQL statement, the statement executes fine. The problem is I need to
> rebuild my own DAO package each time an updated version of OpenNMS is
> available. I'd like to get to the bottom of this.
>
> Somebody earlier suggested truncating the database as a fix, but looking at
> the code that causes the error, this seems unlikely. While I have extensive
> experience with other RDBMSes, I don't know enough about PostgreSQL to know
> where to start looking for hints in the db or server configuration for the
> cause of this issue.
>
> Any pointers from you guys are greatly appreciated.
>
> Thanks.
> Regards,
>
> Daniel
>
> On Tue, Jun 22, 2010 at 17:10, Daniel Geske <dge...@horngroup.com> wrote:
> I don't want to drop the tables, because I need to keep the historic data.
> Any other ideas?
>
> Daniel
>
>
> On Fri, Jun 18, 2010 at 08:58, Liang, Guohua <guohua.li...@nrcan-rncan.gc.ca>
> wrote:
> I had the same problem. But I went through it by empting the database, i.e.,
> drop all the tables and sequences. I was able to initialize the database and
> start opennms 1.8.0.
> Guohua
>
> From: Daniel Geske [mailto:dge...@horngroup.com]
> Sent: June 17, 2010 16:39
>
> To: opennms-inst...@lists.sourceforge.net
> Subject: [opennms-install] Fwd: OpenNMS 1.8.0-2 Installation Fails
> inInstallerDb.databaseSetUser
>
> Hi all,
>
> We're running OpenNMS on RHEL 5.3 using the RPMs.
> A few days ago yum upgraded to the latest 1.8.0-2 release over night.
>
> When I run the installer ($OPENNMS_HOME/bin/install -l /usr/local/lib -dis)
> to complete the upgrade, everything goes well until this line:
> [...]
> * using 'opennms' as the PostgreSQL database name for OpenNMS
> - checking if database "opennms" is unicode... ALREADY UNICODE
> - Checking for old import files in /opt/opennms/etc... DONE
> Exception in thread "main" org.postgresql.util.PSQLException: ERROR: syntax
> error at or near "$1"
> Position: 13
> at
> org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2062)
> at
> org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1795)
> at
> org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:257)
> at
> org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:479)
> at
> org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:367)
> at
> org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:360)
> at
> org.opennms.netmgt.dao.db.InstallerDb.databaseSetUser(InstallerDb.java:1940)
> at org.opennms.install.Installer.install(Installer.java:278)
> at org.opennms.install.Installer.main(Installer.java:859)
>
> This is reproducible. It seems the error is caused in
> org.opennms.netmgt.dao.db.InstallerDb.databaseSetUser.
>
> From what I saw in other installer logs on the web, the next step after
> "Checking for old import files" is "Migrating/creating database". I therefore
> suppose that this is what's failing. I cannot find a log file to get any more
> details on this problem in the installation process.
>
> Short of getting the source code and starting to debug this, do you have any
> ideas what I can try to get the installer to go through and finish?
>
> Regards,
>
> Daniel
>
>
>
> --
> Daniel Geske
> Technology Director
> Horn Group -- Digital Communications for Technology Companies
> www.horngroup.com
> (O) 646.202.9762
> daniel.ge...@horngroup.com
>
> Awards - www.horngroup.com/company-awards
> Brass Tacks Blog - horngroup.blogs.com
> Twitter - twitter.com/horngroup
>
>
>
> --
> Daniel Geske
> Technology Director
> Horn Group Interactive Design
> http://www.horngroup.com
> 646 202 9762
> daniel.ge...@horngroup.com
>
> ------------------------------------------------------------------------------
> Nokia and AT&T present the 2010 Calling All Innovators-North America contest
> Create new apps & games for the Nokia N8 for consumers in U.S. and Canada
> $10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing
> Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store
> http://p.sf.net/sfu/nokia-dev2dev
> _______________________________________________
> Please read the OpenNMS Mailing List FAQ:
> http://www.opennms.org/index.php/Mailing_List_FAQ
>
> opennms-devel mailing list
>
> To *unsubscribe* or change your subscription options, see the bottom of this
> page:
> https://lists.sourceforge.net/lists/listinfo/opennms-devel
------------------------------------------------------------------------------
Nokia and AT&T present the 2010 Calling All Innovators-North America contest
Create new apps & games for the Nokia N8 for consumers in U.S. and Canada
$10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing
Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store
http://p.sf.net/sfu/nokia-dev2dev
_______________________________________________
Please read the OpenNMS Mailing List FAQ:
http://www.opennms.org/index.php/Mailing_List_FAQ
opennms-devel mailing list
To *unsubscribe* or change your subscription options, see the bottom of this
page:
https://lists.sourceforge.net/lists/listinfo/opennms-devel