rblog

Norwegian date format for JIRA

Navigate to Administration -> General Configuration -> Advanced


jira.date.picker.java.format	        dd.MM.yy		
jira.date.picker.javascript.format	%d.%m.%y		
jira.date.time.picker.java.format	dd.MM.yy h:mm a		
jira.date.time.picker.javascript.format	%d.%m.%y %l:%M %p

Firewall verification using a script

Needed to verify a lot of ports that should be opened making it possible to connect to three hosts. Had to do some surfing, and as always by the help of Google I managed to create a bash-script solving the issue for me.


#!/bin/bash
 
###### Set variables ########
# IP of WAS-server 4,5,6
PREIP=10.10.31.
POSTIP="4;5;6"
# Use Notepad++ and see http://ccapeng.blogspot.no/2008/06/notepad-replace-pattern-with-line-break.html to create the below listings
CSIV2_SSL="10113;10036;10046;10056;10066;10076;10086;10096"
ORB_LISTENER="10014;10024;10034;10044;10054;10064;10074"
BOOTSTRAP="10111;10032;10042;10052;10062;10072;10082"
 
###### DO THE MAGIC ######
echo "Testing from `hostname`"
echo "***********************"
# Use of IFS, see http://stackoverflow.com/questions/918886/split-string-based-on-delimiter-in-bash
OIFS=$IFS
IFS=';' read -ra IPARR <<< "$POSTIP"
for ip  in "${IPARR[@]}";
do
    MACHINE=$PREIP$ip
    echo ""
    echo "¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤"
    echo "Testing connectivity against ip $MACHINE"
    echo "¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤"
    echo ""
    echo "Checking CSIV2_SSL_SERVERAUTH_LISTENER_ADDRESS"
    IFS=';' read -ra CSIV2ARR <<< "$CSIV2_SSL"
    for port in "${CSIV2ARR[@]}";
    do
        # Ignore errors, instead print below
        exec 3>/dev/tcp/${MACHINE}/$port 2>/dev/null
        if [ $? -eq 1 ]
        then
            #Only report errors, ret.value = 1 (success = 0)
                echo "Telnet connections not possible on port $port"
        fi
    done
    
    #...as above, for the rest of the ports needed to be checked, 
    #...copy the above statements and change the source variable.
    #...a bit dirty, but hey, solving a one time issue...who cares :-)

done
# Set IFS back to old value
IFS=$OIFS

Handy SQL

Created this SQL-statement used for one of our JIRA-instances. Needed to get rid of a lot of open sub-tasks where the parent task had been cancelled. The statement also shows usage of inner join and self-join.

 U PDATE jiraissue ji1, jiraissue ji2
INNER JOIN issuelink il
SET ji1.resolution = 9, ji1.issuestatus = 6
WHERE ji1.resolution  IS NULL
AND ji1.id = il.destination
AND ji1.issuestatus = 1
AND il.source = ji2.id
AND ji2.resolution = 9;

48 hours of downtime

My blog has been unavailable for more than 48 hours due to the host server having had some DNS-issues. A call to my hosting company http://www.onnet.no/ and voila, fixed in a few minutes.

Install IBM Universial Test Client on WAS

With Rational Application Developer installed you will find the needed file at
<RAD_INSTALLATION_FOLDER\plugins\com.ibm.ws.ast.st.utc_*
where the star indicates the version of UTC. There you will then find the IBMUTC.ear file which you then can install on your instance of WebSphere Application Server (or Tomcat or whatever application server).

Application will then be available at http://yourhost:yourport/UTC/

Access denied for user ‘USERNAME’@’LOCALHOST’ (using password: YES)

I have struggled with an issue on our test server running our Jira test instance. Problem was that I could not get it to connect to the database. Jira 5.0 has a script, config.sh, in the bin-folder which pops up an application allowing you to apply settings and then verify them, one of the settings being the information needed to connect to the database. So, I created the database for Jira, added the user and granted the needed access. No problem connecting using command line

mysql -u USERNAME -p DATABASENAME


but when trying “Test connection” using the Jira configuration tool it reported

Access denied for user 'USERNAME'@'LOCALHOST' (using password: YES)


Could not figure out why, until I connected as root and issued the following SQL-statement

SELECT user, password,host F R O M  mysql.user;

Note: I have some restrictions for my blog, so you need to edit F R O M

It showed that the encrypted password was not similar for my user for the two hosts which was defined, localhost and 127.0.0.1. I had recently updated for localhost and by the above error I thought that was sufficient, but now I also issued

SET PASSWORD FOR 'USERNAME'@'127.0.0.1' EQUALSIGN OLD_PASSWORD('PASSWORD');
SET PASSWORD FOR 'USERNAME'@'127.0.0.1' EQUALSIGN OLD_PASSWORD('PASSWORD');

Note: I have some restrictions for my blog, so you need to edit EQUALSIGN

ensuring equal passwords for both hosts, and voila, problem solved.