Unable to run Jira Software and BitBucket at the same time

Hi,

I've just installed JIRA Software and Bitbucket into a personnal server but I can't use both together. First, I start JIRA Software. After a few minutes (2 or 3) I can use it. But when I start Bitbucket to integrate it into Jira, the jira's deamon seems to crash: there is no response in my web browser. I've tried several times, using the /etc/init.d script or the start-jira.sh and start-bitbucket.sh script to restart everything.

Is there any ideas ? How I can investigate ?

 

My configuration :

Personal server - 2 cpus - 2Go - lot of free space

Debian 8 - freshly installed (only for jira)

Two users : "jira" for JIRA software and "atlbitbucket" for Bitbucket

Database : postgresql, on the same computer

 

Thank you

M.D.

3 answers

1 accepted

Hi,

sorry for the delay but I was in holidays ! smile

After some investigations (thanks Raffaele), it seems it was an "out of memory" problem, as Nic said.

To resume:

1) I tried to install JIRA and Bitbucket onto a Virtual Personnel Server with 1 cpu and 1 Go: I wasn't able to install something correctly

2) I tried to install JIRA and Bitbucket onto a Virtual Personnel Server with 2 cpu and 2 Go: I was able to install JIRA or Bitbucket but not together

3) I tried to install JIRA and Bitbucket onto a Virtual Personnel Server with 3 cpu and 4 Go: everything seems to work fine...

My configuration JIRA 7.1.9, Bitbucket 4.7.1 ans PostgreSQL 9.4

Needed RAM: about 3 Go

 

Thanks a lot

bye bye

1 votes

Were they both installed totally separately, different directories and different databases?

Could you check the resources on the machine?  Is the CPU being thrashed when both are run, and have you got enough memory to accomodate both JVMs (plus a good chunk left over for the operating system)?

What do the JIRA log files say at the time it hangs/crashes?  atlassian-jira.log in logs under the home directory, and catalina.out in the installation log directory.

Thanks Nic,

 

Yes, I have made two separate installations:

1) JIRA is installed in "/usr/local/share/atlassian/jira" and data in "/var/atlassian/application-data/jira", both with the user "jira" as owner

2) Bitbucket is installed in "/usr/local/share/atlassian/bitbucket" and data in "/var/atlassian/application-data/bitbucket", both with the user "atlbitbucket" as owner

 

The two programs use the same localhost database engine (postgresql) but with two separate databases and users.

And resources are not very extensive but seem to be enough.

 

My steps :

$ /etc/init.d/jira restart
Stopping jira
jira stopped successfully
Starting jira

Now I can use JIRA from my web browser

So I start Bitbucket :

$ /etc/init.d/atlbitbucket restart
 
[ ... ]
 
Existing PID file found during start.
Removing/clearing stale PID file.
 
Tomcat started.
 
Success! [... ]

And now, I can use Bitbucket but my connection with JIRA is broken: my web browser returns an "unreachable page" whereas Bitbucket works fine. And it is the same behaviour if I try to restart JIRA: Bitbucket will stop.

I didn't see anything special in the "catalina.out"  or "atlassian-jira.log"... I'm not an expert, but I didn't see any ERROR flags. And if I made a "ps aux", any JIRA processes have disappeared.

 

Thank you

How much memory have you got on the machine, and how much allocated to each service? 

What are the urls you are using to get to the two systems ?

What do the JIRA log files say at the time it hangs/crashes?

 

Available memory on my server: 2Go

And how I can see how much allocated to each service ?

 

From atlassian-jira.log:

 

---------------------------------------------------------------------------------
Heap memory : Used: 329 MiB. Committed: 693 MiB. Max: 739 MiB
Non-heap memory : Used: 225 MiB. Committed: 245 MiB. Max: 1264 MiB
---------------------------------------------------------------------------------
TOTAL : Used: 554 MiB. Committed: 938 MiB. Max: 2003 MiB
---------------------------------------------------------------------------------

 

and at the end, I have the following line:

2016-07-10 12:55:24,639 http-nio-6280-exec-13 WARN "[my_user_name]" 775x138x2 41bhd2 86.206.44.139 /rest/api/1.0/menus/find_link [c.a.j.i.search.util.SearchPropertiesManager] Invalid filter ID in user preferences:

 

I didn't see any errors in the log files

 

My URLS are :

 

Thank you

 

Ah, ok, the memory stuff from the logs can be helpful, but in this case, they look ok.  It would be worth checking the "setenv.sh" files for both system, which will have a "maximum heap size" somewhere in them - either an explicit mention or a value for -Xmx somewhere.

I'd like to see a bit more of the end of the atlassian-jira.log, but I don't think it's going to tell us much.

The next one to look at is the catalina.out for JIRA - again the last 20 or so lines, whatever they are.

From my setenv.sh of jira:

JVM_MINIMUM_MEMORY="384m"
JVM_MAXIMUM_MEMORY="768m"
 
[...]
 
AVA_OPTS="-Xms${JVM_MINIMUM_MEMORY} -Xmx${JVM_MAXIMUM_MEMORY} [...]"

 

From my setenv.sh of bitbucket:

JVM_MINIMUM_MEMORY="512m"
JVM_MAXIMUM_MEMORY="768m"

 

And the last lines of my catalina.out:

___ Modifications ___________________________
    
         Modified Files                                : jira-application.properties
         Removed Files                                 : None
    
2016-07-10 12:53:31,280 JIRA-Bootstrap INFO      [c.a.j.index.ha.DefaultIndexRecoveryManager] Latest index date: {2016-07-08 15:28:23}, Latest DB date: {2016-07-08 15:28:23}
2016-07-10 12:53:32,103 JIRA-Bootstrap INFO      [c.a.jira.startup.DefaultInstantUpgradeManager] Late startup launchers took 19s
2016-07-10 12:53:32,112 JIRA-Bootstrap INFO      [c.a.jira.startup.LauncherContextListener] Memory Usage:
    ---------------------------------------------------------------------------------
      Heap memory     :  Used:  329 MiB.  Committed:  693 MiB.  Max:  739 MiB
      Non-heap memory :  Used:  225 MiB.  Committed:  245 MiB.  Max: 1264 MiB
    ---------------------------------------------------------------------------------
      TOTAL           :  Used:  554 MiB.  Committed:  938 MiB.  Max: 2003 MiB
    ---------------------------------------------------------------------------------
2016-07-10 12:53:32,120 JIRA Warmer Thread:thread-1 INFO      [c.a.jira.i18n.I18nWarmer] Init i18n cache
2016-07-10 12:53:37,558 JIRA Warmer Thread:thread-1 INFO      [c.a.jira.i18n.I18nWarmer] Initialised i18n cache in 5439
2016-07-10 12:53:57,873 StreamsCompletionService::thread-1 DEBUG [my_username] 773x128x5 41bhd2 86.206.44.139 /plugins/servlet/streams [c.a.activeobjects.osgi.ActiveObjectsServiceFactory] getService bundle [com.atlassian.streams.thirdparty-plugin]
10-Jul-2016 12:53:58.867 WARNING [http-nio-6280-exec-5] com.sun.jersey.spi.container.servlet.WebComponent.filterFormParameters A servlet request, to the URI http://[my_ip]:6280/rest/activity-stream/1.0/preferences?_=1468148037019, contains form parameters in the request body but the request body has been consumed by the servlet or a servlet filter accessing the request parameters. Only resource methods using @FormParam will work as expected. Resource methods consuming the request body by other means will not work as expected.
2016-07-10 12:54:17,522 Caesium-1-3 DEBUG      [c.a.activeobjects.osgi.ActiveObjectsServiceFactory] getService bundle [com.atlassian.support.healthcheck.support-healthcheck-plugin]
2016-07-10 12:55:24,639 http-nio-6280-exec-13 WARN [my_username] 775x138x2 41bhd2 86.206.44.139 /rest/api/1.0/menus/find_link [c.a.j.i.search.util.SearchPropertiesManager] Invalid filter ID in user preferences: 
10-Jul-2016 12:56:22.197 WARNING [http-nio-6280-exec-19] com.sun.jersey.spi.container.servlet.WebComponent.filterFormParameters A servlet request, to the URI http://my_ip]:6280/rest/activity-stream/1.0/preferences?_=1468148181802, contains form parameters in the request body but the request body has been consumed by the servlet or a servlet filter accessing the request parameters. Only resource methods using @FormParam will work as expected. Resource methods consuming the request body by other means will not work as expected.
10-Jul-2016 12:57:16.977 WARNING [http-nio-6280-exec-13] com.sun.jersey.spi.container.servlet.WebComponent.filterFormParameters A servlet request, to the URI http://my_ip]:6280/rest/activity-stream/1.0/preferences?_=1468148236706, contains form parameters in the request body but the request body has been consumed by the servlet or a servlet filter accessing the request parameters. Only resource methods using @FormParam will work as expected. Resource methods consuming the request body by other means will not work as expected.

 

Thanks

So, it's not crashing itself, so it must be some form of kill.

You've got a 2Gb memory space, but I'm not sure that's enough - JIRA and Bitbucket are set to consume 1.5Gb between them, leaving .5Gb for the operating system, postgresql and anything else you're running on there.  I suspect there's an out-of-memory error buried in your logs (with the OS deciding to kill JIRA when it happens to recoup memory space)

hummm... ok. I will try to install it into another computer, with much more memory and I will keep informed you.

Thank you for your time...

very strange behaviour...can you try to start jira and bitbucket via start-jira.sh and start-bitbucket.sh instead of the service?
I normally have jira, bitbucket and bamboo on the same VM.

If you don't need Elasticsearch, you could run start-webapp.sh instead of start-bitbucket.sh and you can free memory.

Suggest an answer

Log in or Join to answer
Community showcase
Sarah Schuster
Posted Jan 29, 2018 in Jira

What are common themes you've seen across successful & failed Jira Software implementations?

Hey everyone! My name is Sarah Schuster, and I'm a Customer Success Manager in Atlassian specializing in Jira Software Cloud. Over the next few weeks I will be posting discussion topics (8 total) to ...

2,777 views 11 18
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot