JIRA triggering BAMBOO build giving issues intermittently.

Devendar Gangapuram
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 24, 2023

Hi Team,

We have set up JIRA(8.20.12) and BAMBOO ( 8.0 version) integrated and triggering Bamboo build absolutely fine. But intermittently JIRA not triggering BAMBOO build if "BAMBOO" not logged in in Browser. 

I mean, we have successfully set up the integration between JIRA and BAMBOO, allowing us to trigger Bamboo builds from JIRA. However, we've noticed an intermittent issue where JIRA fails to trigger a BAMBOO build when the "BAMBOO" user is not logged in on the browser. This results in a user authentication 401 error, even though the user exists and has the necessary permissions.

Error message, we got is: aused by: java.io.IOException: Server returned HTTP response code: 401 for URL) error where user is already exists and has required permissions.

Please team, help on the issue to address more effectively and how to resolve this issue.

 

 

Note:  We are using JIRA(8.20.12) and BAMBOO ( 8.0 version) of server type instances. 

 

 

Thanks,

Dev G

 

1 answer

1 accepted

0 votes
Answer accepted
Mirek
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
October 25, 2023

Hi @Devendar Gangapuram 

Well 401 error mostly means a problem with authentication/authorization... so I think we should focus on that a little bit.

How did you set up JIRA and Bamboo integration?

  • Are you using Application link where both 2-legged (2LO) and 3-legged OAuth (3LO) authentication is used?
  • Do you have Trusted Applications and Basic Access authentication disabled?
  • Do you have a two way Application link (from Jira to Bamboo and opposite)?
  • Do you use any proxy on the network?
  • What the build is doing? Is there any additional authentication set up in the jobs? Is it failing only on specific build (job)?
Devendar Gangapuram
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 25, 2023

Thank you @Mirek  for the quick reply.

We are you using Application links created and it is a two way Application link (from Jira to Bamboo and opposite).

This is happening for any job randomly. 

Already, enabled "Allow basic authentication on API calls" on JIRA. And we don't use any proxy on the network.

 

our JIRA-App_link_Auth.PNGour JIRA-ApplInk-Page.PNG

Devendar Gangapuram
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 1, 2023

Please respond on this asap. Thank you.

Devendar Gangapuram
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 13, 2023

Hi team,

Jira triggering Bamboo build expects "active Bamboo login session" , otherwise it gives above 401 error.

A user authentication 401 error, even though the user exists and has the necessary permissions.

If I login to BAMBOO and then try to trigger, it is working fine. Unable to find the route cause, please help us to fix this issue asap.

 

 

Thank you,

Dev G

Devendar Gangapuram
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 13, 2023

Hi Team,

I have found that, changing this value in  <session-timeout>30</session-timeout> (... atlassian-bamboo\WEB-INF\web.xml) can fix this issue? 

and please let me know, how can we set this session timeout value to "never". 

 

Thank you,

Dev G

Devendar Gangapuram
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 22, 2023

Hi @Mirek ,

 

Please respond on this.

 

 

 

 

Thank you,

Dev G

Mirek
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
November 27, 2023

Hi @Devendar Gangapuram 

I am not completely sure if the problem is related to how long the session is configured...

I think would be good to check the logs (<bamboo-home>/logs/atlassian-bamboo.log and <bamboo-home>/logs/atlassian-bamboo-access.log) for specific clues, temporary switch the user that is triggering that or focus on Application Link configuration for a moment to make sure that everything is correctly set between Jira and Bamboo..

You might start by verifying the Troubleshooting guide https://confluence.atlassian.com/kb/application-links-troubleshooting-guide-718668765.html

Overall there might be many reasons why this is happening.. One of the things is to check HTTPS configuration or even server time on both instances.. 

Devendar Gangapuram
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 27, 2023

Sure @Mirek , I will check and update here. Thank you so much for the quick reply.

 

 

 

 

Thank you,

Dev G

Devendar Gangapuram
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 18, 2023

Hi @Mirek ,

Today again, we have found the same issue and in logs found only this error "XMLInputFactory cannot be created".

 

Error logs:-

Caused by: java.lang.RuntimeException: Provider for class javax.xml.stream.XMLInputFactory cannot be created
  at javax.xml.stream.FactoryFinder.findServiceProvider(FactoryFinder.java:367)
  ... 46 more
Caused by: java.util.ServiceConfigurationError: javax.xml.stream.XMLInputFactory: Provider com.ctc.wstx.stax.WstxInputFactory not found
  at java.util.ServiceLoader.fail(ServiceLoader.java:239)
  at java.util.ServiceLoader.access$300(ServiceLoader.java:185)
  at java.util.ServiceLoader$LazyIterator.next(ServiceLoader.java:404)
  at java.util.ServiceLoader$1.next(ServiceLoader.java:480)
  at javax.xml.stream.FactoryFinder$1.run(FactoryFinder.java:353)

XMLFcatory_Error_JIRA_Issues.PNG

 

This issue happening randomly, could you please let me know how to resolve this "XMLInputFactory cannot be created" issue?

 

 

 

 

Thank you,

Dev G

Devendar Gangapuram
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 20, 2023

@Mirek ,

 

Please respond on this. 

 

 

thank you,

Dev G

Mirek
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
December 30, 2023

Hi @Devendar Gangapuram 

From what I see those are Jira logs and not sure if this is related to Bamboo integration. Here is a potential cause of this problem

https://confluence.atlassian.com/jirakb/jira-fails-to-send-analytics-events-957133938.html

Like Devendar Gangapuram likes this
Devendar Gangapuram
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 4, 2024

Thank you @Mirek 

Suggest an answer

Log in or Sign up to answer