Upgrade 4.0.3 to 4.3.2 loses all content
Asked by Joni Nevalainen:

I've tried to upgrade our running confluence instance 4.0.3 to 4.3.2 two times. Both failed in the manner that confluence does start, then freezes during first startup. On next startup there is no content rendered - no CSS, no nothing.

Fortunately, the platform is virtualised so rollback saved the day.

Next upgrade window is set for tomorrow, 15.11.2012 at 15:00 GMT+2. If nothing special is done, I suspect the upgrade will fail as well. We use a mysql database with the confluence instance, running on RHEL6 (both the DB and confluence are installed on the same machine). The machine also has ipv4 and ipv6 addressess.


Answers:
author: C. Faysal
body: hmm

```
Caused by: org.apache.poi.openxml4j.exceptions.InvalidFormatException: Absolute URI forbidden: file:///C:/Documents%20and%20Settings/miika/My%20Documents/Tikkuukot.vsd/Drawing/~Physical%20DB%20Setup/User.55
```

i wonder where this is comming from.

could you backup your DB, confluence_HOME and confluence_INSTALL Directory and run a fresh install ?

perform a full backup from your 4.0.3

lets try to set up 4.3.2 completely new and then restore content from the confluence backup file

comments: author: C. Faysal
body: only content restore...i did yesterday.

i restored content from other version into latest eap release...just for testing

if you need help just let me know so we could connect somehow..maybe skype.


author: Joni Nevalainen
body: I thought restoring backups on different version of confluence was unsupported?  

Another idea - since regardless of installer or manual upgrade the content-upgrade seems to hang, I thought of disabling as many plugins as possible before trying to upgrade again.


author: Joni Nevalainen
body: That would be great. My skype name is newachu


author: Joni Nevalainen
body: Turned out there was a missing AJP proxy prefix, which caused the entire confluence to disappear after it overwrote the server.xml config file. Fixed after finding the missing prefix and re-adding it.

Mr C.Faysal was of great help and moral support in this matter!


author: C. Faysal
body: all content lost is something i don't believe.

i'd like to see the steps you took while performing the upgrade.

let me guess...

you downloaded the right binary for your system. (32/64 Bit chosen correctly)

after adding the x flag to it you ran ./atlassian-confluence-XX.bin

was this one offered to you?

"press 3 to upgrade an existing installation" ?

comments: author: Joni Nevalainen
body: Yep, tried the installer method first, which has the bad habit of launching the confluence process when the manual settings have not been yet migrated. I was hence instructed to do a manual upgrade, but the result ended up the same. No content rendered and java process not doing anything visibly useful (by top or iotop)  

In the previous installer upgrades, I chose 3 - upgrade existing


author: Joni Nevalainen
body: - Edited startup scripts:  
cd /opt/confluence/bin  
nano -w user.sh  

# Joni Nevalainen / SITI 2012-11-15 - Run confluence as dedicated user after manual install  
CONF_USER="confluence" ##  

nano -w setenv.sh  

JAVA_OPTS="-Xms2g -Xmx2g -XX:MaxPermSize=256m $JAVA_OPTS -Djava.awt.headless=true "  
export JAVA_OPTS  

# Joni Nevalainen / SITI 2012-11-15 - use distro provided Sun java  
JRE_HOME="/etc/alternatives/java_sdk/jre/"; export JRE_HOME  

nano -w /etc/init.d/confluence  

# Joni Nevalainen / SITI 2012-11-15 - Use manually installed and symlinked confluence  
cd "/opt/confluence/bin"  

- Took a virtual machine snapshot before starting confluence, in case upgrade goes haywire  

- Started confluence 4.3.2  
service confluence start  
/root/atlalokit.sh


author: Joni Nevalainen
body: less /root/konffit/classes/seraph-config.xml  
cd /opt/confluence/confluence/WEB-INF/classes  
cp seraph-config.xml seraph-config.xml.original  
nano -w seraph-config.xml  
\<init-param\>  
\<param-name\>login.url\</param-name\>  
\<param-value\>https://crowd.csc.fi/crowd/plugins/servlet/CSCLogin?redirectTo=${originalurl}\</param-value\>  
\</init-param\>  
\<init-param\>  
\<param-name\>link.login.url\</param-name\>  
\<param-value\>https://crowd.csc.fi/crowd/plugins/servlet/CSCLogin?redirectTo=${originalurl}\</param-value\>  
\</init-param\>  
\<init-param\>  
\<param-name\>logout.url\</param-name\>  
\<param-value\>https://crowd.csc.fi/crowd/plugins/servlet/CSCLogout\</param-value\>  
\</init-param\>  

\<!-- Default Confluence authenticator, which uses the configured user management for authentication. --\>  
\<!-- \<authenticator class="com.atlassian.confluence.user.ConfluenceAuthenticator"/\> --\>  

\<!-- Authenticator with support for Crowd single-sign on (SSO). --\>  
\<authenticator class="com.atlassian.confluence.user.ConfluenceCrowdSSOAuthenticator"/\>   

less /root/konffit/classes/crowd.properties  
cp crowd.properties crowd.properties.original  
nano -w crowd.properties  

application.name info.funet.fi  
application.password x  
application.login.url [https://crowd.csc.fi/crowd/plugins/servlet/ssocookie
crowd.server.url](https://crowd.csc.fi/crowd/plugins/servlet/ssocookie%3Cbr%3E%3Cbr%3Ecrowd.server.url) [https://crowd.csc.fi/crowd/services/
crowd.base.url](https://crowd.csc.fi/crowd/services/%3Cbr%3Ecrowd.base.url) [https://crowd.csc.fi/crowd/
-](https://crowd.csc.fi/crowd/%3Cbr%3E%3Cbr%3E-) Moved old certs back  
cd /etc/alternatives/java_sdk/jre/lib/security  
mv cacerts cacerts.original  
cp /root/konffit/cacerts/cacerts .  

- Edited confluence home directory  
cd /opt/confluence/confluence/WEB-INF/classes/  

confluence.home = /data/atlassian/application-data/confluence  


author: Joni Nevalainen
body: Here are the last errors in the log after manual upgrade:  

<br />

Caused by: org.apache.poi.openxml4j.exceptions.InvalidFormatException: Absolute URI forbidden: file:///C:/Documents%20and%20Settings/miika/My%20Documents/Tikkuukot.vsd/Drawing/\~Physical%20DB%20Setup/User.55  
at org.apache.poi.openxml4j.opc.PackagePartName.throwExceptionIfAbsoluteUri(PackagePartName.java:426)  
at org.apache.poi.openxml4j.opc.PackagePartName.throwExceptionIfInvalidPartUri(PackagePartName.java:175)  
at org.apache.poi.openxml4j.opc.PackagePartName.\<init\>(PackagePartName.java:83)  
at org.apache.poi.openxml4j.opc.PackagingURIHelper.createPartName(PackagingURIHelper.java:470)  
at org.apache.poi.POIXMLDocument.getTargetPart(POIXMLDocument.java:95)  
at org.apache.poi.POIXMLDocument.getTargetPart(POIXMLDocument.java:84)  
at com.atlassian.confluence.extra.officeconnector.index.powerpoint.ExtendedXSLFSlideShow.\<init\>(ExtendedXSLFSlideShow.java:102)  
at com.atlassian.confluence.extra.officeconnector.index.powerpoint.ExtendedXSLFPowerPointExtractor.\<init\>(ExtendedXSLFPowerPointExtractor.java:39)  
at com.atlassian.confluence.extra.officeconnector.index.powerpoint.PowerPointXMLTextExtractor.extractText(PowerPointXMLTextExtractor.java:26)  
... 18 more  
2012-11-15 17:55:55,574 ERROR \[Indexer: 1\] \[officeconnector.index.excel.ExcelXMLTextExtractor\] endDocument expected \[ 371 \] entries but read \[ 377 \]  
2012-11-15 18:20:52,569 ERROR \[TP-Processor9\] \[atlassian.confluence.servlet.ConfluenceServletDispatcher\] serviceAction There is no Action mapped for namespace /wiki/admin and action name license  
-- referer: <https://idp.csc.fi/idp/profile/SAML2/Redirect/SSO> \| url: /wiki/admin/license.action \| userName: [jnevala@csc.fi](mailto:jnevala@csc.fi)


author: Joni Nevalainen
body: And here's the erroneus part of the log right after upgrade, when confluence autostarts after the installer and directory permissions haven't been corrected and some certificates are missing:  


author: Joni Nevalainen
body: Tried the upgrade again, same result. The screenshot of what the site looks like:  
![Page not found after upgrade](http://staff.csc.fi/jnevala/confdebug/Screenshot-info.funet.fi-Page_Not_Found-Mozilla_Firefox.png)


author: Joni Nevalainen
body: Hi Alex.

Yes, I opened a support request at the same time as posting this thread :) Unfortunately I didn't copy the logs before rolling the machine back to a working state, but I've posted a list of commands to the support ticket that I used to perform the upgrade.  

I guess I'll post either logs or a progress report here later on today after I've gotten more data.


author: Joni Nevalainen
body: Hi Alex.

Yes, I opened a support request at the same time as posting this thread :) Unfortunately I didn't copy the logs before rolling the machine back to a working state, but I've posted a list of commands to the support ticket that I used to perform the upgrade.  

I guess I'll post either logs or a progress report here later on today after I've gotten more data.


author: Alejandro Conde Carrillo
body: Hi Joni.

Did you open a support request for it? Could you upload your logs? It is very dificult to say what happened without them


Tags: database

upgrade