Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Next challenges

Recent achievements


  • Give kudos
  • My kudos


  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Error when syncronizing with Jira User Directory

I am trying to synchronize bitbucket with my Jira User Directory. But it fails with the following exception. What can I do?




[org.apache.http.ConnectionClosedException: Premature end of chunk coded message body: closing chunk expected]
at com.atlassian.crowd.audit.NoOpAuditLogContext.withAuditLogSource(
at com.atlassian.scheduler.core.JobLauncher.runJob(
at com.atlassian.scheduler.core.JobLauncher.launchAndBuildResponse(
at com.atlassian.scheduler.core.JobLauncher.launch(
at com.atlassian.scheduler.caesium.impl.CaesiumSchedulerService.launchJob(
at com.atlassian.scheduler.caesium.impl.CaesiumSchedulerService.executeClusteredJob(
at com.atlassian.scheduler.caesium.impl.CaesiumSchedulerService.executeClusteredJobWithRecoveryGuard(
at com.atlassian.scheduler.caesium.impl.CaesiumSchedulerService.executeQueuedJob(
at com.atlassian.scheduler.caesium.impl.SchedulerQueueWorker.executeJob(
at com.atlassian.scheduler.caesium.impl.SchedulerQueueWorker.executeNextJob(
... 11 frames trimmed
Caused by: javax.xml.bind.UnmarshalException: null
at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(
at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal(
at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal(
... 24 common frames omitted
Caused by: org.apache.http.ConnectionClosedException: Premature end of chunk coded message body: closing chunk expected
at org.apache.xerces.impl.XMLEntityManager$ Source)
at Source)
at org.apache.xerces.impl.XMLEntityScanner.load(Unknown Source)
at org.apache.xerces.impl.XMLEntityScanner.scanQName(Unknown Source)
at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanAttribute(Unknown Source)
at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(
... 27 common frames omitted

1 answer

0 votes
Daniel Eads Atlassian Team Nov 12, 2019

Hey there!

We've seen syncs between the Jira User Directory and other applications fail sometimes when there are a large (10,000+) number of users and groups in the sync. After a certain size, the application server times out instead of completing the request successfully.

In your situation, there are a couple routes you could go to fix up the error:

  1. Reduce the number of users in Jira - even inactive users will come across during a user directory sync. It's possible that there are a large number of inactive users in your Jira directory that are no longer required. Cleaning up these accounts could get the sync to a low enough number to work again. As a bonus, this will have a slight performance-boosting effect on Jira as well.
  2. Connect Bitbucket directly to an upstream LDAP server - if there are only a few users you need to add to Bitbucket, this could speed up your syncs. A small LDAP filter based on a group membership could target the batch of users you need to bring into Bitbucket without getting the entire user directory in Jira. Worth considering if your Jira instance is large and your Bitbucket instance is much smaller.


Unfortunately none of these options work in our situation, Our JIRA is connected to the company LDAP  and Bitbucket uses Jira to manage users. So our company LDAP is big  but we need to use it anyway  to control access.  Our pool of bitbucket users is small is there any way to synchronize manually  once so I can bring the required users  to get started?  thanks

Daniel Eads Atlassian Team Nov 12, 2019

There's not currently controls in product to reduce the number of users and groups Jira will send during a directory configuration. Sounds like you're beyond what can be sent in a successful sync now, which means that you won't be able to sync to Jira without actually reducing the size of Jira's user directory by removing inactive users / unnecessary groups.

Since you do have relatively few Bitbucket users, is there any way for you to connect your Bitbucket Server to an LDAP server as Jira is currently connected to an LDAP server?

Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Bitbucket

Powering DevOps with Bitbucket Server & Data Center

Hi everyone, The Cloud team recently announced 12 new DevOps features that help developers ship better code, faster   ! While we’re all excited about the new improvements to Bitbucket ...

1,914 views 0 7
Read article

Community Events

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

Find an event

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

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you