Just a heads up: On March 24, 2025, starting at 4:30pm CDT / 19:30 UTC, the site will be undergoing scheduled maintenance for a few hours. During this time, the site might be unavailable for a short while. Thanks for your patience.

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

Script functions do not initialize properly for Script Runner addon

Damon Morda
Contributor
January 13, 2015

We recently began encountering an issue where the Script Functions do not initialize properly.

error_message.png

As a result, none of our filters that rely on the script functions work. To resolve the issue, we click the "scan" link on Script Functions configuration page and everything begins working again.

The only error we've seen in the logs is:

2014-12-02 09:36:47,979 Thread-41 WARN onresolve.scriptrunner.runner.ScriptRunnerImpl Script bundle://156.0:0/com/onresolve/jira/groovy/jql/plugins/AddedAfterSprintStart.groovy failed to load/compile
2014-12-02 09:36:48,161 Thread-41 WARN onresolve.scriptrunner.runner.ScriptRunnerImpl Script bundle://156.0:0/com/onresolve/jira/groovy/jql/plugins/AddedAfterSprintStartProxy.groovy failed to load/compile

I've restarted JIRA multiple times and it seems as though each time I have to click the "scan" link to get the functions to return.

Has anyone encountered this issue before or have suggestions for resolving/troubleshooting.

 

3 answers

0 votes
Damon Morda April 7, 2015


Hi Jenifer,

For what it's worth, here's the code we've put into a cron job that fires periodically to workaround the issue until it's permanently fixed.

 

#!/bin/bash

# This script logins into a JIRA server and simulates the click of a button
# to populate JQL functions due to a bug in Script Runner.
# https://jamieechlin.atlassian.net/browse/GRV-578

USERNAME=XXXXXX
PASSWORD=XXXXXX
JIRA_URL=http://localhost:8080/jira
COOKIES=/var/lib/jira/scripts/cookies.txt
HEADER="X-Atlassian-Token: no-check"

echo Logging in...
curl -s -c "$COOKIES" -H "$HEADER" -d "os_username=$USERNAME" -d "os_password=$PASSWORD" -d "os_cookie=true" $JIRA_URL/login.jsp --output login.html

echo Authenticating as administrator...
curl -si -c "$COOKIES" -b "$COOKIES" -H "$HEADER" -d "webSudoPassword=$PASSWORD" -d "os_cookie=true" -d "webSudoIsPost=false" -d "authenticate=Confirm" $JIRA_URL/secure/admin/WebSudoAuthenticate.jspa --output auth.html

echo Simulating clicking the scan link
curl -si -c "$COOKIES" -b "$COOKIES" -H "$HEADER" $JIRA_URL/rest/scriptrunner-jira/latest/jqlfunctions/scan --output scan.html

echo Cleaning up...
rm $COOKIES
rm login.html
rm auth.html
rm scan.html
0 votes
Damon Morda
Contributor
January 13, 2015

Hi Jamie,

As it turns out, I created one a while back, but it might have slipped through the cracks.

https://jamieechlin.atlassian.net/browse/GRV-578

JamieA
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 13, 2015

Sorry mate, I am going through emails out of order... I'll get to that one ;-)

JamieA
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 13, 2015

But would have been good to reference the ticket in the question!

Jenifer Kuntz
Contributor
April 7, 2015

Hi Jamie, We just had the same thing happen in one of our instances, they came back with the scan. I can not view the issue referenced, can you let me know if there was a resolution. Thanks!

JamieA
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.
April 7, 2015

Jennifer - what version of the plugin are you using, and is it possible to update to the latest?

Jenifer Kuntz
Contributor
April 8, 2015

We are on 3.0.10. I will upgrade and hopefully that will fix it.

Jenifer Kuntz
Contributor
April 9, 2015

Jamie - do you always have to shut down JIRA and remove previous versions before upgrading? I thought we had done it through the mange add-ons page before with-out shutting down and removing prior versions but I see in the documentation that you should do that when upgrading. Thanks

0 votes
JamieA
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 13, 2015

I've not seen that. Can I suggest you create an issue at https://jamieechlin.atlassian.net/browse/GRV, and most importantly, attach the atlassian-jira.log from startup. That is, shutdown, remove the log, start up, do your fix, then give me the log.

If you can reproduce on a non-production instance all the better.

Edit: the warnings you see are expected if you don't have JIRA Agile installed.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events