Thursday, April 17, 2014

Renewing JIRA's the SSL Certificate on Windows

Basically this is JAVA specific stuff.

Environment:


  • Windows Server 2008 R2
  • JIRA Standalone (6.2) (Installed in C:\JIRA)
  • JDK 1.7 (Installed to C:\JDK)
AFAIK this method applies to all JIRA and JAVA/JDK editions.


Step 1: Identifying the JKS (Java KeyStore) file location


This is the file where the certificates used by Tomcat are stored. The JKS file is linked with JIRA in the server.xml file that is located under the JIRA INSTALL DIRECTORY\conf\server.xml (In this example C:\JIRA\conf\server.xml). Open in notepad and search for JKS to find the section we're insterested in. 

SSLEnabled="true" acceptCount="100" clientAuth="false" connectionTimeout="20000" disableUploadTimeout="true" enableLookups="false" keyAlias="tomcat" keystoreFile="C:\JIRA\cert\jira.jks" keystorePass="somepass" keystoreType="JKS" maxHttpHeaderSize="8192" maxSpareThreads="75" maxThreads="150" minSpareThreads="25" port="443" protocol="org.apache.coyote.http11.Http11Protocol" scheme="https" secure="true" sslProtocol="TLS" useBodyEncodingForURI="true" />


Step 2: Creating a CSR


For this you use keytool.exe that is located in your JDK instance's bin directory. You will be asked for the keystore password that can also be found on the xml mentioned earlier. Make sure to mention the -alias parameter with the keyAlias attribute from the settings.xml file.

C:\JDK\bin> keytool -certreq -keystore "C:\JIRA\cert\jira.jks" -alias tomcat

No questions asked, the request will use the same properties as your current certificate. Now copy-paste the CSR from the console and send it to your CA that will issue the certificate for you.


Step 3: Installing the new certificate


Once you got the new certificate save it as a .cer file (I'll save it as C:\JIRA\cert\jira.cer in this example) and open its properties to export *all* the CA certificates from the certification path:




Click on View Certificate -> Details -> Copy to File and export it in the DER encoded binary X.509 format.



After the exports, in this example I'll have 3 certificates to import into the KeyStore file:
jira.cer (the certificate I got from the CA)
ca-root.cer (the first certificate exported in the Certification Path)
ca-intermediary.cer (the second certificate exported in the Certification Path)

So go back to the Command Prompt, you JAVA instance's bin directory and use keytool.exe to import all these certificates. When you're asked if you want to import the certificate, type yes at the console.


C:\JDK\bin>keytool.exe -importcert -keystore "C:\JIRA\cert\jira.jks" -storepass somepass -trustcacerts -alias ca-root -file "C:\JIRA\cert\ca-root.cer" C:\JDK\bin>keytool.exe -importcert -keystore "C:\JIRA\cert\jira.jks" -storepass somepass -trustcacerts -alias ca-intermediate -file "C:\JIRA\cert\ca-intermediate.cer" C:\JDK\bin>keytool.exe -importcert -keystore "C:\JIRA\cert\jira.jks" -storepass somepass -trustcacerts -alias tomcat -file "C:\JIRA\cert\jira.cer"


Restart Tomcat (JIRA) and you're done.

Wednesday, April 9, 2014

Top FREE Cloud Storage Providers - 2014

Short and on subject (as always :).

Did some research on the market and currently these are the top Cloud Storage Providers that offer the Most Free Space and have Desktop and Mobile (iOS, Android) Sync Clients.
Everyone is starting the list with Dropbox but that's outdated offering a shameful of 2GB.

  1. Mega.co.nz - 50 GB
  2. FireDrive - 50 GB
  3. Bitcasa.com - 20 GB (Sync up to 3 devices)
  4. Copy.com - 15 GB (Or you get 20GB if you register from this referral)
  5. Google Drive - 15 GB
  6. 4sync.com - 15 GB
  7. MediaFire.com - 10 GB
  8. Box.com - 10 GB (250 MB max file size)
  9. Microsoft OneDrive - 7 GB

Note - I personally recommend Copy.com, it's a great service. Works almost just like Dropbox but you get a ton of space. You get an additional 5GB for every referred friend.

Although you can scrape up a bunch of free space this way I don't recommend installing more than two sync clients on your computer because it can seriously affect the computers performance.

I will update this list as soon as something interesting comes up.

Additional Resources

  • 5/3/14 - Adding FireDrive to #2 offering a mind-blowing free space of 50GB and no file size limit.

Monday, March 24, 2014

VBoxManage modifyhd Code CO_E_SERVER_EXEC_FAILURE (0x80080005) - Server execution failed

This is a lol one. I tried extending the hard disk of a Virtual Machine and received the following error:

C:\Program Files\Oracle\VirtualBox>VBoxManage.exe modifyhd "E:\Virtual Machines\JIRA\Windows Server 2008.vdi" --resize 40960
VBoxManage.exe: error: Failed to create the VirtualBox object!
VBoxManage.exe: error: Code CO_E_SERVER_EXEC_FAILURE (0x80080005) - Server execution failed (extended info not available)
VBoxManage.exe: error: Most likely, the VirtualBox COM server is not running or failed to start.

The Solution


Do *not* start Command Prompt as admin!

Friday, March 21, 2014

Cannot set unknown member 'CompositeTask.PreserveIncompleteTasks'. HTTP headers received from the server

The problem


Today I encountered a strange issue when trying to publish a basic SharePoint 2013 Workflow that has a Start Task Process action in it.


The error I received was the following:

Cannot set unknown member 'CompositeTask.PreserveIncompleteTasks'. HTTP headers received from the server


Microsoft.Workflow.Client.ActivityValidationException: Workflow XAML failed validation due to the following errors:
Cannot set unknown member 'CompositeTask.PreserveIncompleteTasks'. HTTP headers received from the server - ActivityId: 51341428-f7a1-4856-8303-fcbc699335ea. NodeId: SPSRV. Scope: /SharePoint/default/8f0c9dfe-6f01-499c-a356-a417da9b39b4/53d5e7f1-0360-4909-8997-71eaf26b140d. Client ActivityId : a1627f9c-bdfc-80a3-b6fd-cf246a4e8993. ---> System.Net.WebException: The remote server ret


Solution


Checking the logs didn't provide any useful clue. Digging the net I found a post (linked at the bottom) that suggested re-registering the SharePoint 2013 Workflow Service. So I did that.

Register-SPWorkflowService -SPSite https://portal.mydomain.net -WorkflowHostUri https://spsrv:12290 -Force

Question: Will this command affect my currently running workflows?
Answer: No, all workflows will continue running smoothly, even if they are in progress, paused or waiting for an item to change. Tested.


Resources