Hello everyone,
For the past couple of days I've been trying to set up JIRA Software Server on my linux (fedora) server but I can't get it to run properly when I integrate it with Apache using mod_proxy. I managed to get the setup running but it gives me a 503 error when the setup is preparing the plugin system:
Screenshot (3).png
Checking the Apache error_log, I see this:
[Mon Feb 01 17:41:39.552295 2016] [proxy_http:error] [pid 15957] (20014)Internal error: [client 146.176.229.155:65029] AH01102: error reading status line from remote server localhost:8008, referer: http://my.website.com/secure/SetupFinishing!default.jspa [Mon Feb 01 17:41:39.596470 2016] [proxy:error] [pid 3416] (111)Connection refused: AH00957: HTTP: attempt to connect to 127.0.0.1:8008 (localhost) failed [Mon Feb 01 17:41:39.596560 2016] [proxy:error] [pid 3416] AH00959: ap_proxy_connect_backend disabling worker for (localhost) for 60s [Mon Feb 01 17:41:39.596575 2016] [proxy_http:error] [pid 3416] [client 146.176.229.155:65031] AH01114: HTTP: failed to make connection to backend: localhost, referer: http://jira.razvanilin.com/secure/SetupFinishing!default.jspa [Mon Feb 01 17:41:39.652557 2016] [proxy:error] [pid 3414] (111)Connection refused: AH00957: HTTP: attempt to connect to 127.0.0.1:8008 (localhost) failed [Mon Feb 01 17:41:39.652703 2016] [proxy:error] [pid 3414] AH00959: ap_proxy_connect_backend disabling worker for (localhost) for 60s [Mon Feb 01 17:41:39.652732 2016] [proxy_http:error] [pid 3414] [client 146.176.229.155:65032] AH01114: HTTP: failed to make connection to backend: localhost, referer: http://my.website.com/secure/SetupFinishing!default.jspa
I know that apache and mod_proxy are working fine because I have other virtual hosts set up, just not with tomcat.
My VirtualHost configuration is:
<VirtualHost *:80> ServerName my.website.com ProxyRequests off <Proxy *> Order deny,allow Allow from all </Proxy> <Location /> ProxyPass http://localhost:8008/ timeout=6000 Keepalive=On # I tried without these too ProxyPassReverse http://localhost:8008/ </Location> </VirtualHost>
And the Tomcat's connector in server.xml:
<Connector port="8008" maxThreads="150" minSpareThreads="25" connectionTimeout="20000" enableLookups="false" maxHttpHeaderSize="8192" protocol="HTTP/1.1" useBodyEncodingForURI="true" redirectPort="8443" acceptCount="100" disableUploadTimeout="true" proxyName="my.website.com" proxyPort="80" />
After the setup crashes, I have to start the JIRA service again, but when I go to the my.website.com, I get a 502 Proxy Error.
I run Apache 2.4 on Fedora 19 32bit
Can anyone point me in the right direction? Also let me know if you want more information about the issue
EDIT:
I checked the atlassian-jira.log and I found some helpful messages. When the setup tries to initialise the plugin system, I get this into the log (the final part of the log regarding the plugin system):
___ Starting the JIRA Plugin System _________________ 2016-02-02 13:59:52,275 AsynchronousJiraSetup INFO anonymous 839x12x1 1tt0n02 87.246.78.46,0:0:0:0:0:0:0:1 /secure/SetupFinishing!triggerSetup.jspa [c.a.plugin.manager.DefaultPluginManager] Plugin system earlyStartup begun 2016-02-02 13:59:52,478 AsynchronousJiraSetup INFO anonymous 839x12x1 1tt0n02 87.246.78.46,0:0:0:0:0:0:0:1 /secure/SetupFinishing!triggerSetup.jspa [c.a.j.application.install.PluginBundleInstaller] Installing application plugin file: /opt/atlassian/jira/atlassian-jira/WEB-INF/application-installation/jira-software-application/jira-bamboo-plugin-7.3.34-D20151001T024454.jar 2016-02-02 13:59:52,488 AsynchronousJiraSetup INFO anonymous 839x12x1 1tt0n02 87.246.78.46,0:0:0:0:0:0:0:1 /secure/SetupFinishing!triggerSetup.jspa [c.a.j.application.install.PluginBundleInstaller] Installing application plugin file: /opt/atlassian/jira/atlassian-jira/WEB-INF/application-installation/jira-software-application/jira-development-integration-plugin-3.3.15-D20151029T091531.jar 2016-02-02 13:59:52,502 AsynchronousJiraSetup INFO anonymous 839x12x1 1tt0n02 87.246.78.46,0:0:0:0:0:0:0:1 /secure/SetupFinishing!triggerSetup.jspa [c.a.j.application.install.PluginBundleInstaller] Installing application plugin file: /opt/atlassian/jira/atlassian-jira/WEB-INF/application-installation/jira-software-application/jira-dvcs-connector-plugin-3.3.16-D20151002T054424.jar 2016-02-02 13:59:52,544 AsynchronousJiraSetup INFO anonymous 839x12x1 1tt0n02 87.246.78.46,0:0:0:0:0:0:0:1 /secure/SetupFinishing!triggerSetup.jspa [c.a.j.application.install.PluginBundleInstaller] Installing application plugin file: /opt/atlassian/jira/atlassian-jira/WEB-INF/application-installation/jira-software-application/jira-fisheye-plugin-7.0.13-D20151002T052328.jar 2016-02-02 13:59:52,593 AsynchronousJiraSetup INFO anonymous 839x12x1 1tt0n02 87.246.78.46,0:0:0:0:0:0:0:1 /secure/SetupFinishing!triggerSetup.jspa [c.a.j.application.install.PluginBundleInstaller] Installing application plugin file: /opt/atlassian/jira/atlassian-jira/WEB-INF/application-installation/jira-software-application/jira-greenhopper-plugin-7.0.10.jar
Note that it stopped at jira-greenhopper plugin. Now if I start the JIRA service again and go to my.website.com, I get this in the log:
2016-02-02 14:08:45,237 localhost-startStop-1 ERROR [c.a.plugin.loaders.ScanningPluginLoader] Unable to deploy plugin 'null' from 'Unit: /var/atlassian/application-data/jira/plugins/installed-plugins/jira-greenhopper-plugin-7.0.10.jar (1454421592000)'. 2016-02-02 14:08:45,238 localhost-startStop-1 ERROR [c.a.plugin.loaders.ScanningPluginLoader] Because of the following exception: com.atlassian.plugin.PluginParseException: Cannot open JAR file: /var/atlassian/application-data/jira/plugins/installed-plugins/jira-greenhopper-plugin-7.0.10.jar at com.atlassian.plugin.JarPluginArtifact.open(JarPluginArtifact.java:275) at com.atlassian.plugin.JarPluginArtifact.getResourceAsStream(JarPluginArtifact.java:100) at com.atlassian.plugin.osgi.factory.OsgiPluginFactory.getDescriptorInputStream(OsgiPluginFactory.java:156) at com.atlassian.plugin.factories.AbstractPluginFactory.hasDescriptor(AbstractPluginFactory.java:64) at com.atlassian.plugin.osgi.factory.OsgiPluginFactory.canCreate(OsgiPluginFactory.java:143) at com.atlassian.jira.plugin.MasterPluginFactory.canCreate(MasterPluginFactory.java:50) at com.atlassian.plugin.loaders.ScanningPluginLoader.deployPluginFromUnit(ScanningPluginLoader.java:154) at com.atlassian.plugin.loaders.ScanningPluginLoader.loadAllPlugins(ScanningPluginLoader.java:91) at com.atlassian.plugin.loaders.PermissionCheckingPluginLoader.loadAllPlugins(PermissionCheckingPluginLoader.java:31) at com.atlassian.plugin.manager.DefaultPluginManager.earlyStartup(DefaultPluginManager.java:451) at com.atlassian.jira.plugin.JiraPluginManager.earlyStartup(JiraPluginManager.java:104) at com.atlassian.jira.plugin.JiraPluginManager.start(JiraPluginManager.java:94) at com.atlassian.jira.ComponentManager$PluginSystem.start(ComponentManager.java:591) at com.atlassian.jira.ComponentManager.quickStart(ComponentManager.java:180) at com.atlassian.jira.ComponentManager.start(ComponentManager.java:153) at com.atlassian.jira.upgrade.PluginSystemLauncher.start(PluginSystemLauncher.java:30) at com.atlassian.jira.startup.DefaultJiraLauncher.lambda$postDbLaunch$499(DefaultJiraLauncher.java:130) at com.atlassian.jira.startup.DefaultJiraLauncher$$Lambda$15/14480095.run(Unknown Source) at com.atlassian.jira.config.database.DatabaseConfigurationManagerImpl.doNowOrEnqueue(DatabaseConfigurationManagerImpl.java:298) at com.atlassian.jira.config.database.DatabaseConfigurationManagerImpl.doNowOrWhenDatabaseActivated(DatabaseConfigurationManagerImpl.java:194) at com.atlassian.jira.startup.DefaultJiraLauncher.postDbLaunch(DefaultJiraLauncher.java:121) at com.atlassian.jira.startup.DefaultJiraLauncher.lambda$start$497(DefaultJiraLauncher.java:90) at com.atlassian.jira.startup.DefaultJiraLauncher$$Lambda$1/163319.run(Unknown Source) at com.atlassian.jira.util.devspeed.JiraDevSpeedTimer.run(JiraDevSpeedTimer.java:31) at com.atlassian.jira.startup.DefaultJiraLauncher.start(DefaultJiraLauncher.java:88) at com.atlassian.jira.startup.LauncherContextListener.contextInitialized(LauncherContextListener.java:79) ... 5 filtered at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745) Caused by: java.util.zip.ZipException: error in opening zip file at java.util.zip.ZipFile.open(Native Method) at java.util.zip.ZipFile.<init>(ZipFile.java:220) at java.util.zip.ZipFile.<init>(ZipFile.java:150) at java.util.jar.JarFile.<init>(JarFile.java:166) at java.util.jar.JarFile.<init>(JarFile.java:130) ... 34 more 2016-02-02 14:08:51,786 localhost-startStop-1 ERROR [c.a.p.osgi.factory.OsgiPluginInstalledHelper] Cannot determine required plugins, cannot resolve bundle 'com.atlassian.jira.software-application'
Your proxy lines are nonsense - they should be saying "map X to Y", but yours say "map X to some command line switch" and "map X to nothing".
Assuming you want to run it on the root of the server, it should be just
ProxyPass / http:
//localhost:8008/
ProxyPassReverse / http:
//localhost:8008/
I thought that's what `<Location /></Location>` does... Anyway, for the sake of trying I modified the settings to the ones you suggested and I get the same errors in the apache logs. (Tried it on a new installation of jira)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Nope, the proxy lines have to be two part. The server can't possibly know what you want to proxy unless you tell it. The location is just where it appears in the tree, not an instruction on what to proxy.
The next question is what do you get if you go on to the server and try "wget http://localhost:8008/" (or curl, or whatever)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Ah, never thought about trying that. I do get a connection refused error when I do wget:
--2016-02-02 10:49:33-- http://localhost:8008/ Resolving localhost (localhost)... ::1, 127.0.0.1 Connecting to localhost (localhost)|::1|:8008... failed: Connection refused. Connecting to localhost (localhost)|127.0.0.1|:8008... failed: Connection refused.
The apache doesn't log any errors in this case. Do you have any ideas why this is happening?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yes. JIRA isn't running there! You'll need to have a look at the config to work out where it's actually listening.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Sorry I couldn't reply because I was limited by the system. Apparently I had another instance of tomcat running and it was conflicting with the one running JIRA. I stopped that and I get to the same point as in my original post. It crashes during the initialisation of the plugin system. I edited the question with the new logs
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Ok, now you have a damaged JIRA installation.
First, check that the files and directories are all correctly owned by the user who will be running the Tomcat container, and that the permissions are correct.
If they are, then your installation is corrupt - you might want to try simply removing the damaged add-on file (note that there may be more than one copy of it, you'll want to remove all of them), but a better option may be to re-install cleanly
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I tried reinstalling everything, but I still get the same error. I checked the permissions and the owner of the files is the user JIRA is creating during the setup
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I doubt you've had time to download a new copy and fully install it since my post - 4 minutes is too short.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Again, I couldn't reply because the system restricts me (quite annoying). Sorry, I should've mentioned that I did the reinstall the evening before I commented. I did it multiple times and I recorded the logs too. I tried doing a manual setup with a mysql database and I recorded the logs at multiple steps.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
It's the same problem. You have somehow ended up with a damaged download of at least one add-on.
Cannot get manifest resource from plugin artifact 'jira-greenhopper-plugin-7.0.11.jar': Cannot open JAR file: /var/atlassian/application-data/jira/plugins/installed-plugins/jira-greenhopper-plugin-7.0.11.jar
That file is broken, bjorked, deaded, snarfed, bollixed. You need to find out what is breaking it and fix that. Have you tried starting completely clean - a new download and make sure you compare the checksums?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Oh, also, stop using Maria, use a supported database.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I tried downloading the file multiple times and did a clean install dozens of times and it has the same behaviour (even if I use jira's internal data storage). I tried it on one of my machines that's running Elementary (ubuntu-based) distro and the installation worked perfectly. My take on this is that the Java installation might cause some issues, so I will try to reinstall that one. I will give you an update once I managed to do that.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hmm. Must be something in the environment then. Make sure you are using Oracle's Java when you reinstall
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Finally had some spare time to test this out... Unfortunately reinstalling Java made no difference whatsoever. I just realised that the JIRA installation has it's own JRE in the installation folder. I wonder if it has anything to do with my server memory. Does the server needs more than 512Mb of memory?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Ah. Given that JIRA defaults to asking for 768Mb as the max heap for a demo system (more for an active system with lots of users), then yes, you absolutely do need more memory.
You need to allow memory for the OS as well as JIRA. However, I'm not sure that this is causing the error you are getting.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.