Artifactory 3.5.3-0升级至5.6 PRO失败求助:目录结构异常
Artifactory 3.5.3→5.6 PRO Upgrade Fix for Custom Apache-Tomcat Directory on Windows Server
Hi there, I’ve dealt with this exact scenario before—custom Tomcat directory names throwing off Artifactory’s upgrade logic on Windows. The core issue is that default upgrade scripts expect a tomcat folder under Artifactory_Home, but your setup uses apache-tomcat. Here’s a step-by-step fix tailored to your environment:
Prerequisites First: Backup Everything
Before touching anything, make sure you have full backups of:
Artifactory_Home\data(Derby database and repository content)Artifactory_Home\etc(configuration files)Artifactory_Home\logs(for troubleshooting if things go wrong)Artifactory_Home\apache-tomcat\webapps\artifactory(the deployed web app)- Stop the Artifactory Windows service completely before proceeding.
Step 1: Upgrade from 3.5.3 to 3.9 PRO
- Download the Artifactory 3.9 PRO Windows ZIP package (avoid the installer, since it will try to create a new
tomcatfolder). - Extract the ZIP to a temporary folder. You’ll see a default
tomcatdirectory inside. - Copy the contents of the temporary
tomcat\webappsfolder over your existingArtifactory_Home\apache-tomcat\webapps—this replaces the old 3.5.3artifactoryWAR with the 3.9 version. - Preserve your custom Tomcat configs: Don’t overwrite
apache-tomcat\conf\server.xml,apache-tomcat\conf\tomcat-users.xml, or any custom SSL/port settings you’ve configured. - Update the Artifactory startup script (
Artifactory_Home\bin\artifactory.bat) to explicitly point to your custom Tomcat path:- Open the file in a text editor, find the line where
CATALINA_HOMEis set, and change it to:set CATALINA_HOME=%ARTIFACTORY_HOME%\apache-tomcat
- Open the file in a text editor, find the line where
- Start the Artifactory service. Check
Artifactory_Home\logs\artifactory.logfor any errors—look for the lineArtifactory successfully startedto confirm the upgrade worked. Test the UI and basic repository operations before moving on.
Step 2: Upgrade from 3.9 to 4.x (Latest Stable 4.x Release)
- Download the latest 4.x PRO Windows ZIP (e.g., 4.17.3, the final 4.x release).
- Stop the Artifactory service again, and re-backup your current Artifactory_Home just in case.
- Extract the 4.x ZIP to a temp folder. Copy the
tomcat\webapps\artifactory.warfrom the temp folder to yourapache-tomcat\webappsdirectory—delete the existingartifactoryfolder first (Tomcat will auto-deploy the new WAR). - Copy all JAR files from the temp
tomcat\libfolder to yourapache-tomcat\libfolder (overwrite duplicates—4.x updates Tomcat dependencies). - Check your
Artifactory_Home\etc\artifactory.system.propertiesfile: Ensure theartifactory.data.dirpoints to your existingdatafolder (it should by default, but double-check). - Start the service, monitor the log closely. 4.x will run database migration scripts for Derby—wait until you see the startup success message. Verify all repositories and configurations are intact.
Step 3: Upgrade from 4.x to 5.6 PRO
- Download the Artifactory 5.6 PRO Windows ZIP.
- Stop the service and backup once more (this is the final jump, so extra caution helps).
- First, confirm your
apache-tomcatversion: 5.6 requires Tomcat 8.0.x. If your current apache-tomcat is 7.x, you’ll need to upgrade Tomcat:- Download Tomcat 8.0.x for Windows, extract it to a temp folder.
- Copy your custom
conffiles (server.xml, tomcat-users.xml, etc.) from the old apache-tomcat to the new Tomcat 8 folder. - Rename the new Tomcat folder to
apache-tomcatand replace your old one in Artifactory_Home.
- Extract the 5.6 ZIP to a temp folder. Copy the
tomcat\webapps\artifactory.warto yourapache-tomcat\webapps(delete the existingartifactoryfolder first). - Copy the
tomcat\conf\context.xmlfrom the temp 5.6 folder to yourapache-tomcat\conf, but merge your existing Derby database configuration into it (don’t overwrite entirely—keep your custom data source settings). - Update the
artifactory.batscript again if needed to ensureCATALINA_HOMEpoints to your apache-tomcat folder. - Start the service. 5.6 will run additional migration steps for the Derby database. Monitor the log until startup completes, then test all functionality (UI, repository uploads/downloads, user permissions).
Critical Troubleshooting Tips
- If the service fails to start, check the
apache-tomcat\logs\localhost.logfor Tomcat-specific errors (e.g., missing JARs, port conflicts). - If Artifactory complains about missing Tomcat paths, double-check the
CATALINA_HOMEvariable inartifactory.bat—this is the most common fix for custom directory names. - Never skip version jumps: Stick strictly to 3.5.3 → 3.9 → 4.x → 5.6, as each version handles incremental database and configuration migrations.
内容的提问来源于stack exchange,提问作者Frogger
相关产品推荐
相关产品推荐

