Sitecore Asked by Rajesh Kumar on August 23, 2021
I am seeing an issue in logging to sitecore 9.3 instance.. When i hit the url like https://{domainname}/sitecore. It gets redirected to Sitecore identity server login page. I enter user name password and click on ok button.
I see the error message on browser: Error: An error occurred
This issue started coming when i published my code to Sitecore instance sitecore TDS, before publishing code. It did not see any issue. Login was successful and was getting redirected to content editor.
The thing is when I browse Sitecore identity server from IIS directly and login there, I do not see any issue. I get logged in successfully.
Please help me how to troubleshoot this issue. not getting any direction.
In my case after removing the custom configuration of Publish:end event resolved the issue.
<events>
<event name="publish:end">
<handler type="Sitecore.Publishing.HtmlCacheClearer, Sitecore.Kernel" method="ClearCache">
....
....
</handler>
</event> </events>
Answered by Sivalingaamorthy on August 23, 2021
If using SPE you can clear up all or even for a specific user. I'm using Sitecore 9.3 and still see this issue happening.
Import-Function -Name Invoke-SqlCommand
$connection = [Sitecore.Configuration.Settings]::GetConnectionString("core")
$query = @"
DELETE FROM [dbo].[Properties]
WHERE dbo.Properties.[Key] LIKE 'CORE_SC_TICKET%'
AND dbo.Properties.[Value] LIKE '%mwest%'
"@
Invoke-SqlCommand -Connection $connection -Query $query
Answered by Michael West on August 23, 2021
I am facing the same issue with Sitecore 9.1, in summary the issue is Sitecore not being able to handle long ticket in Core
database
Sitecore has a cleanup task that should take care of cleaning the tickets in the database but for some reason it is not performing, and if you could check your logs and see if you have something similar
ManagedPoolThread #2 12:04:16 INFO Job started: Sitecore.Tasks.CleanupAuthenticationTicketsAgent ManagedPoolThread #2 12:04:16 INFO CleanupAuthenticationTicketsAgent: Number of expired authentication tickets that have been removed: 0 ManagedPoolThread #2 12:04:16 INFO CleanupAuthenticationTicketsAgent: Total number of authentication tickets to process: 0 ManagedPoolThread #2 12:04:16 INFO Job ended: Sitecore.Tasks.CleanupAuthenticationTicketsAgent (units processed: )
OR
20892 10:35:42 ERROR String or binary data would be truncated. The statement has been terminated. Exception: System.Exception Message: String or binary data would be truncated. The statement has been terminated. Source: Sitecore.Kernel at Sitecore.Data.DataProviders.Sql.DataProviderCommand.ExecuteNonQuery() at Sitecore.Data.DataProviders.Sql.SqlDataApi.<>c__DisplayClass33_0.b__0() at Sitecore.Data.DataProviders.NullRetryer.Execute[T](Func`1 action, Action recover) at Sitecore.Data.Properties.SqlPropertyStore.SetStringValueCore(String prefixedName, String value) at Sitecore.Data.Properties.PropertyStore.SetStringValue(String name, String value) at Sitecore.Web.Authentication.DefaultTicketManager.CreateTicket(String userName, String startUrl, Boolean persist) at Sitecore.Owin.Authentication.Pipelines.CookieAuthentication.SignedIn.CreateTicket.Process(SignedInArgs args) at (Object , Object )
Nested Exception
Exception: System.Data.DataException Message: Error executing SQL command: INSERT INTO [Properties] ( [Key], [Value] ) VALUES ( @name, @value )
I hope you are able to find similar entries, however, if that's not the case, please give a shot using the following command in your SQL against the Core
database as a workaround and please note this is going to kill ALL sessions connected to CM
DELETE FROM [yourCoreDatabase].[dbo].[Properties] WHERE [Key] LIKE '%CORE_SC_TICKET%'
I am currently working with Sitecore Support since it seems that was fixed on Sitecore 9.0.1 and Sitecore 9.0.2 but newer versions are still facing such issue.
References: https://viniciusdeschamps.com.br/error-an-error-occurred-after-logging-in-sitecore/
Answered by Vinicius Deschamps on August 23, 2021
Although the message "an error occured” is of course useless, I have found that when this occurs, there are also errors logged in the Sitecore logs. Check those.
Answered by Conrad Albrecht on August 23, 2021
Get help from others!
Recent Questions
Recent Answers
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP