Thursday, October 21, 2021

Install solr 6.6.2

 STEP 1 - INSTALL SOLR 

Copy the powershell script from the below link

https://gist.github.com/jermdavis/8d8a79f680505f1074153f02f70b9105  

and save it as Install-Solr.ps1  

Create a folder for solr as c:\solr 

Update the following variables in the script:

The $JREVersion variable – this should be the same as your Java version

The $JREPath – this should be the path to your Java version

 Save the file. 

Open powershell with admin permissions and run the following command

Set-ExecutionPolicy RemoteSigned

Then run the script Install-Solr.ps1

 Once the script completes you should see Solr open in a browser and look like this: 

 

STEP 2 - CREATE KEYSTORE

 Run the following in command prompt with administrative privileges 

Change the path to the executable based on the path of your JRE installation 

“C:\Program Files\Java\jre-9.0.1\bin\keytool.exe” -genkeypair -alias solr-ssl -keyalg RSA -keysize 2048 -keypass secret -storepass secret -validity 9999 -keystore solr-ssl.keystore.jks -ext SAN=DNS:localhost,IP:127.0.0.1 -dname “CN=localhost, OU=Organizational Unit, O=Organization, L=Location, ST=State, C=Country” 

Uploading: 191216 of 191216 bytes uploaded. 

After running the above command, a keystore file called solr-ssl.keystore.jks will be created in the current directory.

 STEP 3 - GENERATE CERTIFICATE 

Run the following in command prompt with administrative privileges.

Change the path of jre before running the command 

“C:\Program Files\Java\jre-9.0.1\bin\keytool.exe” -importkeystore -srckeystore solr-ssl.keystore.jks -destkeystore solr-ssl.keystore.p12 -srcstoretype jks -deststoretype pkcs12 

This will ask for a password. Enter the password as secret 

 

This will generate a certificate called solr-ssl.keystore.p12 in the current directory 

STEP 4 - INSTALL CERTIFICATE 

Double click on the generated solr-ssl.keystore.p12 file and follow the wizard to import the certificate. When you reach the Certificate Store window, make sure to place the certificate in the Trusted Root Certification Authorities.

 

STEP 5 - MOVE KEYSTORE AND CERTIFICATE TO SOLR 

Move the generated certificate and keystore files (solr-ssl.keystore.jks, solr-ssl.keystore.p12) to C:\solr\solr-6.6.2\server\etc\ 




 
STEP 6 - ENABLE SSL IN SOLR 

Edit the file C:\solr\solr-6.6.2\bin\solr.in.cmd

Uncomment properties starting with Solr_SSL_* 

 

STEP 7 - TEST START SOLR 

To start solr, run the following in command prompt with administrative privileges 

C:\solr\solr-6.6.2\bin\solr.in.cmd -p 8984 

Once successfully started up, you should be able to navigate to https://localhost:8984 to make sure that the instance is running. 

If no errors are encountered and Solr started successfully, stop Solr by running the command:

C:\solr\solr-6.6.2\bin\solr.in.cmd stop -all 

STEP 8 - SET UP SOLR TO RUN AS A WINDOW SERVICE 

Run the following in command prompt with administrative privileges.

“C:\solr\nssm-2.24\win64\nssm.exe” install SOLR6 

In the insatller window, Set the path to ‘C:\solr\solr-6.6.2\bin\solr.cmd’ ,startup directory to ‘C:\solr\solr-6.6.2\bin’, and  Arguments to ‘start -f -p 8983’.

Enter the service name as SOLR, then click Install Service.

Navigate to https://localhost:8983 to make sure Solr is running.

Thursday, July 22, 2021

Getting started with Sitecore Content Serialization

Everyone knows that Sitecore has the serialization feature for a long time. But with the Sitecore 10, we can unlock several new features of Out-Of-the-Box serialization. With Sitecore Content Serialization, you can eliminate the need for version control tools like Unicorn, Sitecore Packages and TDS.

Sitecore Content Serialization is a feature that helps to keep our Content Items in version control by the actions like serialize, share and deploy. You can serialize items across different Sitecore Instances using SCS. You can achieve this by configuring some settings like which content items to include and which content items to exclude, and which operations are to be performed on the content items. The SCS system serializes content items into your project folder as YAML files.

There are two modes of Serialization you can adopt with SCS:

  • Sitecore Command Line Interface
  • Sitecore for Visual Studio

Sitecore CLI enables the console communication with your Sitecore instance. 


The Sitecore for Visual Studio plugin acts as a graphical user interface for SCS. This plugin provides:

  • Visual configuration of modules and environments.
  • Visual synchronization of items, including conflict handling.
  • Visual configuration of automated item synchronization at build time.


 

 Now, you might have got some idea about Sitecore Content Serialization. We'll learn about the available modes in details with the installation process in upcoming blogs.


Thursday, June 17, 2021

Errors on Sitecore Experience Analytics Dashboard

The purpose of this blog is to consolidate the analysis made to understand and fix the below errors which occur while accessing the Sitecore Experience Analytics Dashboard.

 


 

1. Xconnect certificates are the most important to communicate with the xconnect site for analytics data. First thing is to check if the certificates are present and valid in the server. If it is invalid or expired, we need to generate those and assign it to the site bindings.

2. Check if the xconnect site is accessible through HTTPS. In my case, it failed and hence I generated the xconnect cert.






3. Check for any errors in console. If there are server errors while connecting to the xconnect services this would be a client certificate trust issue due to the presence of Non self signed certificates in Trusted Root certificates. In this case, identify the untrusted certificates and move them to Immediate Certification Authorities. Alternatively, delete the Non-SSL certificate from Root.

4. Check if the following sitecore services are running
a. {siteprefix}.xconnect-IndexWorker
b. {siteprefix}.xconnect-MarketingAutomationService
Tried restarting these services and make sure there is no issue while running.

5. Check if xDB is enabled in the configuration file in the path
C:\inetpub\wwwroot\{site}\App_Config\Sitecore\Marketing.xDB\Sitecore.Xdb.config
Check if the value assigned to the setting Xdb.Enabled is true. If not, change the value to true.

6. Try changing the Application Pool Identity of the xconnect site to Network Service in IIS-> Application Pools-> corresponding xconnect->Advanced settings->App Pool Identity


7. Assign Read permission to Network Service in the self-signed certificates.

8. Check the ConnectionStrings.config and verified the xconnect site url for the below settings
xconnect.collection
xdb.referencedata.client
xdb.marketingautomation.reporting.client
xdb.marketingautomation.operations.client settings

9. Verify the thumbprint value for all the client certificate references configured in ConnectionStrings.config file and it should match the certificate found in MMC.

10. Experience Analytics relies on the Reporting Server of Sitecore and the Reference Data service of xConnect. Check if these are accessible and if the reporting and collection databases are accessible via sitecore shell.

11. Examine the xConnect Reference Data service logs.

12. Verify the IIS access logs to identify server issues if any.

13. Make sure if the collectionuser have required rights on Shard databases.

I hope these investigations will help you to fix the issues on Experience Analytics Dashboard.

Thanks for reading.. Let's TRAVEL WITH SITECORE...

Monday, March 25, 2019

The controller for path '/' was not found or does not implement IController.

In this post I am gonna share an issue which I faced. Probably most of the sitecore beginners would have gone through this.

     The controller for path '/' was not found or does not implement IController.

While working on my sitecore application everything was fine before implementing the controller rendering.As you know, we need to register the controller name and action in the rendering's definition item. 

I created a controller rendering to show breadcrumb in my webpage with Breadcrumb as the name and Index as the action method. I made this rendering to appear on the pageHeader placeholder.
But when I previewed the page, I was surprised to see the following screen. 



From the error message I got to know that the controller is not recognized by sitecore. Later I found that, I have not provided the proper name in the definition item of my controller rendering.Yes, it's a typo issue.


It was supposed to be Breadcrumb and not Breadcrum. That's it correcting that solved my issue.

Possibilities of this issue: 
  • typo error in Controller or Action field.
  • Controller may not exists in the path specified.
  • File may not be published.    

Hope this will help someone.
Thanks for reading.. Let's TRAVEL WITH SITECORE...

Saturday, March 23, 2019

CREATING A VISUAL STUDIO SOLUTION FOR SITECORE PROJECT



Here are the steps that help sitecore beginners on how to create a visual studio solution for their sitecore project.

1. Open Visual Studio as Administrator

2. Choose File -> New Project

3. In the dialog box, select ASP.NET Web Application

4. Select Empty template and check the MVC checkbox in Add Folders and core references section and click OK

5. Once the VS project is created, replace the global.asax file of newly created project with the global.asax file from the Website folder of sitecore instance.It will have only %@Application Language='C#' Inherits="Sitecore.Web.Application" %

6. Similarly replace the Web.config of VS solution with the Web.config file of the sitecore instance. This is done because once if we publish the project,the file in the project should not overwrite those within the sitecore instance.

7. Right-Click the References in VS solution, select Add Reference-and browse to the bin folder within website folder of sitecore instance. Select the following files:
Sitecore.Kernel
Sitecore.Mvc
Sitecore.Mvc.Analytics

8. For each of the above added references , right-click it and go to Properties.In that, set the Copy Local property to false

9. In VS project,go to Views/web.config file and add the following namespaces:
<add namespace="Sitecore.Mvc" />
<add namespace="Sitecore.Mvc.Presentation" />

10. Now, right-click near the toolbar of VS project and check the Web One Click Publish. In the Create Publish Setting dropdown, select <New Custom Profile> In the dialog box appeared choose File system. In the dropdown of target location, browse to the website folder of sitecore instance. Then click Publish.
Now MVC solution is created for the sitecore instance.

Thanks for reading.. Let's TRAVEL WITH SITECORE...

Friday, March 15, 2019

Solr service stopped running


As all know, working with sitecore is amazing. But still we would have gone through so many issues while setting up the sitecore solution. In this blog,I am going to share a common issue which most of the sitecore beginners have faced along with the solution.

When I installed sitecore 9.0 for the first time it requires solr to be configured and all other stuffs for my site. It was working very fine and one day, when I was about to rebuild my indexes I was surprised to see my Indexing Manager as blank as below


   
But how this would have happened ? Then I understood that the problem might be with the solr. I checked with the solr url, https://localhost:8983/solr/# and found that it was running.

Then I checked with the services and there my solr service was in Paused state.




While attempting to restart the service, I got the pop up saying that, Windows could not start the solr-6.6.2 service on Local Computer.




There are so many reasons for this solr issue.But to identify the actual cause, try to start the service using command prompt.




Now I figured out that the problem is with the JAVA_HOME system variable. I checked the value for that variable and it said C:\Program Files\Java\jre1.8.0_171, but the actual path is C:\Program Files\Java\jre1.8.0_201.





Thats it, now just updating the correct path of JAVA_HOME environment variable solved this issue.It is recommended that the variable should point to the path where the java has been installed on the system. Now restarting the solr service and it started running and all my indexes are back !!





Thanks for reading and let's TRAVEL WITH SITECORE …