Recently, I needed to get a client's website up and running on my local PC, the gotcha... it uses Vulcan search, which is a third-party search plug-in that uses elastic search. It can be used with Episerver CMS instead of Episerver Find, however, it is not as well supported. In today's guide, I'm going to cover the errors and the steps I followed to get the website back up and running. Note, some of these steps aren't Vulcan specific, most of the issues I encountered while trying to fix the site were Episerver setup errors. I thought I'd share all the issues anyway, as you never know it might help someone out there (if it does, leave a comment!)

My Initial Issues Getting The Site To Load

First, when I tried to load the website, I received a lovely error 'You do not have permission to view this directory or page.'. Looking in the Episerver logs (usually within the App\_data directory), I could see this error being logged:

Could not get Nodes info to check Elasticsearch Version. Check that you are correctly connected to Elasticsearch?

The errors were not related. The first issue was due to a permission and configuration error. It had nothing to do with Vulcan. As I was loading a new website, I hadn't got the correct hostname/URL set-up within my host definitions within the Episerver admin. I was using a hostname of 'blahblah' and my hostname and the existing database wanted my hostname to be 'clientname'. When you first try and load an Episerver website, if the homepage fails to load, the first thing you should check is that your host definition matches the hostname you want to use.

The second error was a valid Vulcan error and the root cause was due to it not being configured. As I was trying to get Vulcan up and running from an existing website, I didn't need to do the Vulcan installation from scratch. All I needed to do was a NuGet restore and tweak some config. I did encounter an issue with the Vulcan Commerce Nuget Package. When I first tried to do the Nuget restore on the solution, the process failed on the 'TcbInternetSolutions.Vulcan' package, with Visual Studio spitting out this error in the output console:

'Error Unable to download package: There are multiple root elements. Line 42, position 2.'.

I don't know if this was a specific issue with my PC or the Vulcan package, however, to resolve it, I disabled all the Nuget feeds in my Visual Studio NuGet feeds list except for the Episerver one. You can access this screen within Visual Studio from:

OptionsNuget Package ManagerPackage Sources

I'm assuming most people will only have the main NuGet feed and the Episerver Nuget feed installed. I had several internal feeds that I disabled. I also swapped from using VS 2017 to VS 2015 to perform the NuGet restore. I swapped versions because of some advice that I stumbled across on a StackOverflow post. Disabling the NuGet feeds and using VS 2015 seemed to fix the issues and the package restored successfully.

How To Configure Your System To Play Nicely With Vulcan

To get rid of the Vulcan error in my logs, after some Googling, I found that I needed to install Elastic search locally. I headed over to the Elastic search page, at https://www.elastic.co/downloads/elasticsearch and downloaded it (for reference, I downloaded version 6.1). To run elastic, unzip the elastic zip file on your hard drive. Within the bin folder, run bin\elasticsearch.bat. Open up PowerShell and type Invoke-RestMethod http://localhost:9200 💥

Check The Vulcan AppSettings

Vulcan uses two app settings, VulcanUrl and VulcanIndex. My next step was to check that they look correct:

Looking at the elastic documentation, it seems port 9200 is elastic's default port and I wouldn't suggest trying to change it! After running the site with Elastic Search up and running in the background, everything ran as expected. To get the products indexed, I went to the scheduled jobs section, within the Episerver admin and ran the Vulcan indexing scheduled tasks. If everything has installed correctly on your machine, then you should see a job named 'Vulcan Index Content' appear.

As someone new to Vulcan, I was a bit scared that getting everything up and running would waste loads of time, but, luckily everything went smoothly and getting Vulcan up and running was fairly pain-free! Happy Coding 🤘