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, which I've never used before. 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 them were normal getting an existing Episerver website up and running errors. I thought I'd share all the issues, 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?' Like Epifind, under the hood, Vulcan uses elastic search.
The first permissions error was a red herring and 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 error was a valid Vulcan error, which I'll cover below.
Also, 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 did have several external Nuget repositories set within my Visual studio. To get past this error, I disabled all the Nuget feeds except for the Episerver one, within my Visual Studio -> Options -> Nuget Package Manager -> Package Sources (I'm assuming most people will only have Nuget and the Episerver feed). I also swapped from using VS 2017 to Visual Studio 2015 based on a stack overflow post I stumbled across.
How To Configure Your System To Play Nicely With Vulcan
To get rid of the Vulcan error, after some Googling, I found that I needed to install elastic locally. So I headed over to the download 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'. Boom!
Check The Vulcan AppSettings
Vulcan uses two app settings, VulcanUrl and VulcanIndex. Next step, 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!
My Site Works!
After running the site, everything ran as expected. To get the products indexed, I went to the scheduled jobs section, within the Episerver admin and ran the Vulcan job. If everything has installed correctly, then you should see a job named 'Vulcan Index Content'. The screenshot below displays the Vulcan Index Content.
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!