Posts Tagged ‘troubleshooting’

I was recently having trouble telling Jira to connect to a named SQL Server instance. Using Jira’s configuration manager, I should be able to use the SERVERNAME\INSTANCENAME syntax like every other modern application. Well, not with Jira. I found the solution and here ya go:

In the database field in the configuration manager, which you can launch from bin\config.bat in the Atlassian Jira Program Files folder, type

SERVERNAME;instance=INSTANCENAME

Oh, did Atlassian forget to tell you to install Java Runtime Edition on your server? Of course they did… Go ahead and install it if you haven’t, but make sure you pay very close attention and don’t click I Agree to install Yahoo and junkware on your machine. Because, well, Oracle.

This information was lovingly sourced from the comments on: https://confluence.atlassian.com/jira/connecting-to-named-instances-in-sql-server-173435.html

Enjoy!

I recently ran into a need to use the LAME MP3 encoder in a customer’s website. Problem was, once I deployed to Azure, I received an error of “Unable to load DLL libmp3lame.32.dll”. Uh oh! “But it’s in the bin folder!” I screamed silently at Starbucks. So, I binged the issue and found a good answer on StackOverflow. I’m sharing here because it helped unstick me, and I imagine others may be running to this issue with libraries other than LAME.

I ended up adding the function to my Global.asax, in addition to importing namespaces System.IO and System.Linq:

/// <summary>
/// Updates PATH variable in hosting instance to allow referring to items in this project's /bin folder.
/// Very helpful with Azure.
/// </summary>
public static void CheckAddBinPath()
{
    // find path to 'bin' folder
    var binPath = Path.Combine(new string[] { AppDomain.CurrentDomain.BaseDirectory, "bin" });
    // get current search path from environment
    var path = Environment.GetEnvironmentVariable("PATH") ?? "";
 
    // add 'bin' folder to search path if not already present
    if (!path.Split(Path.PathSeparator).Contains(binPath, StringComparer.CurrentCultureIgnoreCase))
    {
        path = string.Join(Path.PathSeparator.ToString(), new string[] { path, binPath });
        Environment.SetEnvironmentVariable("PATH", path);
    }
}

Then in Application start I simply added:

// Sometimes files aren't loaded properly from bin. Hint to the app to load from /bin, too.
CheckAddBinPath();

I hope that helps!