Page 1 of 1
Moving whole repository to a higher version
PostPosted:Wed Mar 06, 2019 10:09 pm
by MKochS
Good evening all,
I am still running an aged 6.3.1 installation on a Debian machine. Rather than upgrading the installation, I want to move the whole repository to a new machine I have recently acquired, preferably to the most recent release (nothing has been installed on the new machine yet). Is this possible at all, or would I have to walk through all the minor upgrades?
TIA
Matthias
Re: Moving whole repository to a higher version
PostPosted:Fri Mar 08, 2019 7:21 pm
by jllort
The process is the same as backup and restore into other computer.
Consider the next steps:
1- dump database and restore in target server
2- move tomcat folder ( same location ) -> consider the grants at OS level should be the same in the target
3- install JAVA, libreoffice, imagemagick ( the same packages you installed into source server )
I suggest read with care the manual installation process and the backup process, that should help you understanding what you have installed and how to move it.
Installation:
https://docs.openkm.com/kcenter/view/ok ... ation.html ( choose your OS version )
Backup:
https://docs.openkm.com/kcenter/view/ok ... store.html
https://docs.openkm.com/kcenter/view/ok ... -tool.html
https://docs.openkm.com/kcenter/view/ok ... ackup.html
Re: Moving whole repository to a higher version
PostPosted:Tue Apr 30, 2019 10:37 am
by MKochS
This means it is generally possible to simply move the whole installation with it's directory between machines, provided the path names, database settings and file/directory access rights remain the same.
Re: Moving whole repository to a higher version
PostPosted:Wed May 01, 2019 4:53 pm
by jllort
Yes, it is as you suggested in the last post. If you preserve database and destination tomcat and repository locations are the same it is quite easy to move the data to the new server location. Remember at the end you can execute repository checker from administration tools to verify everything has been done in the right way.
Re: Moving whole repository to a higher version
PostPosted:Wed May 08, 2019 12:05 pm
by MKochS
Very cool. The target machine is Devuan 2.0 Ascii.
Re: Moving whole repository to a higher version
PostPosted:Thu Jun 06, 2019 3:27 pm
by MKochS
The installation has now been moved from an ancient Debian machine to Devuan Ascii. After that, it has been upgraded to 6.3.2. So far, everything looks good. Just the Administration Dashboard still shows "Version: 6.3.0 (build: 8156)".
Re: Moving whole repository to a higher version
PostPosted:Fri Jun 07, 2019 6:31 pm
by jllort
Please share an screenshot.
Are you sure about you have replaced the war files and deleted the work/catalina/localhost folder ( ensure you have removed the folder might be it is shown a cached jsp )
Re: Moving whole repository to a higher version
PostPosted:Fri Jun 07, 2019 10:38 pm
by MKochS
I have deleted work/Catalina and webapps/OpenKM, which have been replaced in restart. What I'm getting now is
Code: Select all2019-06-08 00:34:01,084 [main] INFO org.apache.coyote.ajp.AjpProtocol- Initializing ProtocolHandler ["ajp-bio-127.0.0.1-8009"]
2019-06-08 00:34:01,095 [main] INFO org.apache.catalina.startup.Catalina- Initialization processed in 2182 ms
2019-06-08 00:34:01,232 [main] INFO org.apache.catalina.core.StandardService- Starting service Catalina
2019-06-08 00:34:01,233 [main] INFO org.apache.catalina.core.StandardEngine- Starting Servlet Engine: Apache Tomcat/7.0.53
2019-06-08 00:34:01,299 [localhost-startStop-1] INFO org.apache.catalina.startup.HostConfig- Deploying web application archive /opt/openkm-6.3.0-community/tomcat/webapps/OpenKM.war
2019-06-08 00:34:01,956 [localhost-startStop-1] INFO org.apache.catalina.loader.WebappClassLoader- validateJarFile(/opt/openkm/tomcat/webapps/OpenKM/WEB-INF/lib/servlet-api-2.5-20081211.jar) - jar not loaded. See Servlet Spec 3.0, section 10.7.2. Offending class: javax/servlet/Servlet.class
2019-06-08 00:34:01,957 [localhost-startStop-1] INFO org.apache.catalina.loader.WebappClassLoader- validateJarFile(/opt/openkm/tomcat/webapps/OpenKM/WEB-INF/lib/servlet-api-6.0.36.jar) - jar not loaded. See Servlet Spec 3.0, section 10.7.2. Offending class: javax/servlet/Servlet.class
and the webpage showing
Code: Select allHTTP Status 404 - /OpenKM
type Status report
message /OpenKM
description The requested resource is not available.
Apache Tomcat/7.0.53
Note that in /opt, the directory is still named openkm-6.3.0-community, but the war file is version 6.3.3. In /opt, openkm is a symlink to openkm-6.3.0-community.
EDIT:
I have removed the directory webapps/OpenKM that had been created new on startup, and have moved in the most recent webapps/OpenKM from my backups, and after that started again. OpenKM comes up again and runs fine, but shows "6.3.0" on the Administration tab again.
Re: Moving whole repository to a higher version
PostPosted:Sun Jun 09, 2019 9:11 am
by jllort
Into the webapps should be OpenKM.war file what when starting is exploding the OpenKM folder.
Re: Moving whole repository to a higher version
PostPosted:Sun Jun 09, 2019 11:21 am
by MKochS
jllort wrote: ↑Sun Jun 09, 2019 9:11 am
Into the webapps should be OpenKM.war file what when starting is exploding the OpenKM folder.
It is doing precisely that. When I'm starting OpenKM after having the webapps/OpenKM folder removed, it is created again. Just the application can apparently not work with it, for some reason. The older OpenKM folder from my backups worked, though.
Re: Moving whole repository to a higher version
PostPosted:Sun Jun 09, 2019 2:32 pm
by MKochS
Getting this while migrating from 6.3.6 to 6.3.7:
Code: Select all2019-06-09 16:28:06,453 [localhost-startStop-1] INFO com.openkm.util.FormUtils$LocalResolver- resolveEntity(publicId=-//OpenKM//DTD Property Groups 2.0//EN, systemId=http://www.openkm.com/dtd/property-groups-2.0.dtd) => /opt/openkm/tomcat/webapps/OpenKM/WEB-INF/classes/dtd/property-groups-2.0.dtd
2019-06-09 16:28:06,543 [localhost-startStop-1] INFO com.openkm.servlet.RepositoryStartupServlet- *** Initialize language detection engine... ***
2019-06-09 16:28:11,278 [localhost-startStop-1] WARN org.hibernate.util.JDBCExceptionReporter- SQL Error: 0, SQLState: null
2019-06-09 16:28:11,278 [localhost-startStop-1] ERROR org.hibernate.util.JDBCExceptionReporter- Cannot create PoolableConnectionFactory (Could not create connection to database server. Attempted reconnect 3 times. Giving up.)
2019-06-09 16:28:11,279 [localhost-startStop-1] ERROR com.openkm.core.Config- ** Error reading configuration table **
2019-06-09 16:28:11,281 [localhost-startStop-1] INFO com.openkm.servlet.RepositoryStartupServlet- *** Repository initializing... ***
2019-06-09 16:28:15,322 [localhost-startStop-1] WARN org.hibernate.util.JDBCExceptionReporter- SQL Error: 0, SQLState: null
2019-06-09 16:28:15,323 [localhost-startStop-1] ERROR org.hibernate.util.JDBCExceptionReporter- Cannot create PoolableConnectionFactory (Could not create connection to database server. Attempted reconnect 3 times. Giving up.)
2019-06-09 16:28:15,324 [localhost-startStop-1] ERROR org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/OpenKM]- Servlet /OpenKM threw load() exception
java.net.ConnectException: Verbindungsaufbau abgelehnt
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:339)
at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:200)
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:182)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
at java.net.Socket.connect(Socket.java:579)
at java.net.Socket.connect(Socket.java:528)
at java.net.Socket.<init>(Socket.java:425)
at java.net.Socket.<init>(Socket.java:241)
at com.mysql.jdbc.StandardSocketFactory.connect(StandardSocketFactory.java:256)
at com.mysql.jdbc.MysqlIO.<init>(MysqlIO.java:293)
at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2334)
at com.mysql.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:787)
at com.mysql.jdbc.JDBC4Connection.<init>(JDBC4Connection.java:49)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
at com.mysql.jdbc.Util.handleNewInstance(Util.java:409)
at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:357)
at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:285)
at org.apache.tomcat.dbcp.dbcp.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:38)
at org.apache.tomcat.dbcp.dbcp.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:582)
at org.apache.tomcat.dbcp.dbcp.BasicDataSource.validateConnectionFactory(BasicDataSource.java:1556)
at org.apache.tomcat.dbcp.dbcp.BasicDataSource.createPoolableConnectionFactory(BasicDataSource.java:1545)
at org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1388)
at org.apache.tomcat.dbcp.dbcp.BasicDataSource.getConnection(BasicDataSource.java:1044)
at org.hibernate.connection.DatasourceConnectionProvider.getConnection(DatasourceConnectionProvider.java:92)
at org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.java:446)
at org.hibernate.jdbc.ConnectionManager.getConnection(ConnectionManager.java:167)
at org.hibernate.jdbc.AbstractBatcher.prepareQueryStatement(AbstractBatcher.java:161)
at org.hibernate.loader.Loader.prepareQueryStatement(Loader.java:1700)
at org.hibernate.loader.Loader.doQuery(Loader.java:801)
at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:274)
at org.hibernate.loader.Loader.doList(Loader.java:2542)
at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2276)
at org.hibernate.loader.Loader.list(Loader.java:2271)
at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:459)
at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:365)
at org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:196)
at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1268)
at org.hibernate.impl.QueryImpl.list(QueryImpl.java:102)
at org.hibernate.impl.AbstractQueryImpl.uniqueResult(AbstractQueryImpl.java:890)
at com.openkm.dao.NodeBaseDAO.calculateUuidFromPath(NodeBaseDAO.java:259)
at com.openkm.dao.NodeBaseDAO.calculateUuidFromPath(NodeBaseDAO.java:232)
at com.openkm.dao.NodeBaseDAO.getUuidFromPath(NodeBaseDAO.java:122)
at com.openkm.module.db.DbRepositoryModule.create(DbRepositoryModule.java:112)
at com.openkm.module.db.DbRepositoryModule.initialize(DbRepositoryModule.java:85)
at com.openkm.servlet.RepositoryStartupServlet.start(RepositoryStartupServlet.java:175)
at com.openkm.servlet.RepositoryStartupServlet.init(RepositoryStartupServlet.java:127)
at javax.servlet.GenericServlet.init(GenericServlet.java:158)
at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1284)
at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1197)
at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1087)
at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:5210)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5493)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:632)
at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:1073)
at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1857)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
2019-06-09 16:28:15,394 [localhost-startStop-1] WARN org.apache.chemistry.opencmis.server.impl.atompub.CmisAtomPubServlet- CMIS version is not defined! Setting it to CMIS 1.0.
2019-06-09 16:28:15,462 [localhost-startStop-1] INFO org.apache.catalina.startup.HostConfig- Deploying web application directory /opt/openkm-6.3.0-community/tomcat/webapps/ROOT
2019-06-09 16:28:17,366 [main] INFO org.apache.coyote.http11.Http11Protocol- Starting ProtocolHandler ["http-bio-127.0.0.1-8080"]
2019-06-09 16:28:17,402 [main] INFO org.apache.coyote.ajp.AjpProtocol- Starting ProtocolHandler ["ajp-bio-127.0.0.1-8009"]
2019-06-09 16:28:17,406 [main] INFO org.apache.catalina.startup.Catalina- Server startup in 136734 ms
Re: Moving whole repository to a higher version
PostPosted:Sun Jun 09, 2019 2:56 pm
by MKochS
Seems to be fixed after reboot.