Tridion broker database connectivity issue - tridion

I'm not quite sure what's going on, but several issues are occurring on our website supported by Tridion 2011 SP1 that I can only think is being caused by the broker db
1, Loading the website results in the error with the Ambient Data Module:
[NullReferenceException: Object reference not set to an instance of an object.]
Tridion.ContentDelivery.AmbientData.HttpModule.OnRequestStart(Object sender, EventArgs e) +292
System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +79
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +269
2, Audience manager profile synchronisation between the broker and subscription management databases is failing, receiving the following errors from the logs:
Error occurred while fetching a synchronization batch from the presentation system with url: [URL] Profilesync.aspx. Message class java.sql.SQLException No Data Access Object for AudienceManagerProfile java.sql.SQLException: No Data Access Object for AudienceManagerProfile
3, Publishing the website publication repeatedly fails at the transport stage, returning:
Transport failed: Could not transport tcm_0-10689-66560.Content.zip using HTTPS
I know these sound like several issues happening at once, but my site was running fine up until another web publication was added into blueprinting. Since then we've been getting these errors, and like to think it's all related to an issue with the broker db.
Anyone come across something like this?
UPDATE: Should also add the fact that dynamic linking has stopped working as well, which strengthens my belief there is an issue either connecting to or with the broker database

That's full of loaded questions, oh.. boy.. let's take one by one.
Did you check your license file is valid and did not expire recently.
I would rule the license file out first. If that's not the case then see below.
First, Adding publication blueprinting publication does not have any impact on CDA site. So, I would totally rule this out.
Second, Your site up and running until publication added.. This can't be happening. There should be some configurations changed/added on your web site. Sometimes, the configurations updated but the APPPool did not recycled so you don't see the impact. At later time, when the AppPool restarted/recycled you will notice the errors and might have the impression that the site is breaking all of sudden.
Did you double check your configs and dlls?
Are you able to connect to your database directly with broker user
id/password?
Any firewall changes happened recently, try connecting to DB from
CDA Server

For #3, I had this same problem... is it possible that adding the new publication caused the package size to increase from less than 30mb to more than 30mb? If so, check IIS Request Filtering >> Edit Feature Settings and look at Maximum allowed content length. This defaults to 30MB and for us increasing this size to something larger than our package size solved the Transport Failed error (since IIS would just reject our transports due to the size being greater than 30mb).

About issue #1: Could it be you have the Tridion.ContentDelivery.AmbientData.HttpModule configured in the Web.config, but are lacking the java installation? Do you have a cd_ambient_conf.xml in your config folder? And a cd_ambient.jar in the lib?
About issue # 2: you seem to be missing the audience manager DAOs (Data Access Objects). Do you have the following in your cd_storage_conf.xml?
<StorageBindings>
<Bundle src="AudienceManagerDAOBundle.xml"/>
</StorageBindings>
About issue # 3: do you have more information in the cd_transport.log or windows event viewer?
I agree with Ram that the added publication couldn't have caused this. It looks like your CD installation was changed somehow. Did you do an upgrade or something?

Related

Artifactory Users Management not loading

I'm trying to open the Artifactory Users Management page, following the Admin->Security->Users tab.
Then I'm getting the following error:
Any idea of what might be causing it? Also, which log I can check this? Couldn't find anything yet.
The server error generally indicates there is problem fetching the user details from Artifactory. This can happen due to any of the following reasons:
when you have a high volume of users and the request is timing out.
There is a chance that you might have created a username with a
special character which is not allowed (using the REST method or some
other method)
There is an issue with the backend database
And the best place to troubleshoot is to first check the request log a good valid entry looks like below:
20200715164402|104|REQUEST|165.225.104.49|admin|GET|/ui/users|HTTP/1.1|200|0
Next check the artifactory.log file for java stack or check catalina.out under tomcat/logs directory.

Alfresco share ClientAbortException

Sometimes when we open folder, Alfresco shows spinning wheel and never opens the folder. The log has below exception.
2016-03-08 11:45:40,652 INFO [webscripts.connector.RemoteClient] [http-bio-8080-exec-494] Exception calling (GET) http://localhost:8080/alfresco/s/slingshot/doclib/treenode/site/test/documentLibrary/Books/science?children=true&max=-1&alf_ticket=TICKET_400a73c20348346eed011695af270f837f27a654
2016-03-08 11:45:40,652 INFO [webscripts.connector.RemoteClient] [http-bio-8080-exec-494] Error status 500 null
ClientAbortException: java.net.SocketException: Connection reset
at org.apache.catalina.connector.OutputBuffer.realWriteBytes(OutputBuffer.java:413)
If I curl the above URL or open directly in webrowser I am able to get the json response successfully.
I am using only Alfresco Share and not anyother client. The localhost:8080 is working perfectly fine in most of the cases except this one.
Can anyone please tell me what is the issue and why connection is closed or ClientAbortException exception is occurring?
Mostly this is an issue of timeout and you'll need active monitoring on your Alfresco & Share environment to see how Alfresco is running.
Easy check is to install some java monitoring or use Jmeter to load test the system and see how it responds on different load.
Mostly the outcome is more CPU/RAM for Alfresco :).
As Tahir Malik mentioned above, the issue is related to performance.
The ClientAbort error itself occurs when the client (in this case, Share) times out or the user cancels a download. The message on the log is type INFO. More details here: https://issues.alfresco.com/jira/browse/ALF-20349
If you are on SSO and using Alfresco Enterprise 5.2.3 or 5.2.4, there is a chance that you may hit a similar bug, which is discussed in the Alfresco Forum. However, this particular bug would not show the ClientAbortException.

Rare System.NullReferenceException show up for a HttpContext.Current.Session["courseNameAssociatedWithLoggedInUser"] that was previously populated?

Our ASP.NET C# web application is used in the following environment
.NET Framework 4
Silverlight 4 / PivotViewer
IIS 7
Windows 2008
Visual Studio 2010 .NET IDE
C#
HTTPS ( SSL )
Our Silverlight 4 / PivotViewer controls are obviously embedded in
ASP.NET pages.
In rare cases we get the "Object reference not set to an instance of
an object. error when navigating around ASP.NET pages that host our
Silverlight 4 / PivotViewer modules on our standalone Windows 2008
server with IIS 7.
Also, there is number of very odd things about the error. First, it
occurs only sometimes on certain user computers. To elaborate, it
usually only occurs when a the user uses a computer that accesses our ASP.NET web application for the first time.
Moreover, once we clear the browser cache the error does Not occur
when navigating around ASP.NET pages that host our
Silverlight 4 / PivotViewer modules.
Another interesting aspect about the error is that it refers to
absolute path on my local development computer in the error stack
trace when it is in reality deployed to the standalone Windows 2008
server with IIS 7. That`s really strange because before I deploy to
the standalone Windows 2008 server with IIS 7, I ensure that all
configuration parameters in files such as web.config refer to the
standalone server environment. In other words, I remove any
references to configuration parameter values associated with my local
development computer.
Therefore, I am confused as to why it refers to absolute path on my
local development computer in the error stack trace.
It would be bad experience for the user to get the "Object reference
not set to an instance of an object.` while using the site. Also, it
would be bad user experience if we have to tell the user to clear
his/her browser cache everytime the error shows up.
Server Error in '/' Application.
Object reference not set to an instance of an object.
Description: An unhandled exception occurred during the execution of
the current web request. Please review the stack trace for more
information about the error and where it originated in the code.
Exception Details: System.NullReferenceException: Object reference not
set to an instance of an object.
Source Error:
An unhandled exception was generated during the execution of the
current web request. Information regarding the origin and location of
the exception can be identified using the exception stack trace below.
Stack Trace:
[NullReferenceException: Object reference not set to an instance of an object.]
PivotServer.SectionBasedRelatedModules.SectionBasedPerlsViewer.tailorConfigurationDetailsOfPageElementsToFallInLineWithTutorialSelection()
in C:\VisualStudioWorkSpace\VisualCSharpProjects\PerlsPivot\PivotServer\SectionBasedRelatedModules\SectionBasedPerlsViewer.aspx.cs:160
PivotServer.SectionBasedRelatedModules.SectionBasedPerlsViewer.Page_Load(Object
sender, EventArgs e) in
C:\VisualStudioWorkSpace\VisualCSharpProjects\PerlsPivot\PivotServer\SectionBasedRelatedModules\SectionBasedPerlsViewer.aspx.cs:146
System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp,
Object o, Object t, EventArgs e) +24
System.Web.UI.Control.LoadRecursive() +70
System.Web.UI.Page.ProcessRequestMain(Boolean
includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
+3063
Version Information: Microsoft .NET Framework Version:4.0.30319;
ASP.NET Version:4.0.30319.272
I looked at line 160 which contains the following code:
String coursename = HttpContext.Current.Session["courseNameAssociatedWithLoggedInUser"].ToString();
Obviously, this tells us that there is no value for the variable "courseNameAssociatedWithLoggedInUser" in the HttpContext.Current.Session.
However, I took the same steps on another computer but it all ran smoothly.
Also, I am sure that I am giving a value to the HttpContext.Current.Session["courseNameAssociatedWithLoggedInUser"] as soon as the user logs in.
Does the HttpContext.Current.Session["courseNameAssociatedWithLoggedInUser"] get corrupted for some reason? If so, why, and how do we prevent it?
Should I be using Page.Session instead of HttpContext.Current.Session? Would that help?
"Obviously, this tells us that there is no value for the variable"courseNameAssociatedWithLoggedInUser" in the
HttpContext.Current.Session."
Not exactly... given your code...
String coursename = HttpContext.Current.Session["courseNameAssociatedWithLoggedInUser"].ToString();
... the following items could be causing this
HttpContext - unlikely
HttpContext.Current - more often than you would think, but would be reproducible
HttpContext.Current.Session["courseNameAssociatedWithLoggedInUser"]
To find out the specific item in that chain, you could do something like this (pseudo code)
function string GetCourseNameThingie()
{
if HttpContext is null
throw new Exception("HttpContext is null")
if HttpContext.Current is null
throw new Exception("HttpContext.Current is null")
if HttpContext.Current.Session["courseNameAssociatedWithLoggedInUser"] is null
throw new Exception("HttpContext.Current.Session["courseNameAssociatedWithLoggedInUser"]is null")
return HttpContext.Current.Session["courseNameAssociatedWithLoggedInUser"].ToString()
}
This would tell you specifically what was missing. As we have pointed out, it is more likely the value is either being cleared by another page or an error is occurring that is severe enough to destroy session for that user (Do you have a Application_Error or Session_End handler in Global.asax?).
You can also try wrapping the original statement in a try/catch and if an exception occurs, immediately check another session variable you assume to be still working. This will also tell you for sure whether the other variables are OK or not.
First, sorry for my grammar-English.
I had a similar issue with my .net applications and the reason was the idle time expiration.
There are four time expiration settings "(Yes 4)" and the recycling process of the application pools. I did the following
A) From Application pool: Open the advance setting and change the "Idle Time out". By default is 20 minutes.
Also, set the "Regular Time Interval" to 0. so it wont be recycled. I do not know why microsoft decided to default this to 1740 minutes. This is not a time out setting, it is a setting for always recycling the appPool after a period of time, so if your users are in the middle of something they will loose everything or having exceptions like that one you are having. Setting it to 0 will disable this.
B) Authentication Time Out. if you are using it, for example Form Authentication, then go to the authentication feature of your virtual directory app, right click in "Form Authentication" and select "Edit". Change the authentication cookie-time out.
C) ASP.NET Session State. in ISS, open the .net session state feature and change the session time-out. It is also by default 20 minutes.
D) asp.net form authentication time out. This was confusing for me at the beginning because I had already modified the cookie-time out of the form authentication in IIS (Step B). So I still had some problems, when I realised that I also need to change the web.config form authentication tag in order to add a time out attribute for changing the default 20 minutes.
My tag is looking like that: ...forms name=".ASPXFORMSAUTH" path="/" loginUrl="frmLogin.aspx" timeout="1740" protection="All" ...
We have developed a javascript mechanism that take the session state time out setting so we warm users that the system is about to auto log off due to inactivity.
It works beautiful now, Basically I have set all the time out settings to "1740" minutes, except the session state that we set to 30 minutes. So at the minute 29 of inactivity we show the user that the system will auto log off in a minute unless that they do some activity so the idle time is beginning from 0 again. Brilliant, now we do not have any problem with sessions.
Anyway guys, I have told you our experience and how we solve a similar problem that you are having now. However, the reason why I ended here is because we also want to eliminate the references to the absolute path on my local development computer at the moment of any exception.
We have not figured out why it is showing the absolute path. We have compiled our DLL assemblies in released mode, but this does not change anything. Have someone of you sort it out this issue?????
Thanks guys
Referencing a Session Within a ViewModel
You may not be using ASP.net MVC, but this would be useful if someone were to be looking for an answer.
I was in exactly the same situation except I would receive the null exception every time, whereas my colleague didn't at all, even though we were running exactly the same code.
Our mistake was to reference a session variable from a ViewModel, which is apparently bad practice. The code was changed so that the ViewModel received the session contents via the controller then set it as a property of the ViewModel. The session data (my example is called ProcessingWeek) would use this.ProcessingWeek, and not look directly at the httpcontext.current.session["ProcessingWeek"].
EventMatchResult Match = new EventMatchResult(
(ImportedEventModel)SessionData.ImportedEventModel,
ref db,
SessionData.ProcessingWeek);
...
public EventMatchResult(ImportedEventModel Event, ref CFModel db,
int ProcessingWeek)
{
this.db = db;
this.MatchedField = new List<PlayerMatchResult>();
this.ImportedEvent = Event;
this.ProcessingWeek = ProcessingWeek;
}

SmartTarget Errors in log file

I don't have any errors with my smart target application, but I do see in the event log, the following error messages:
ERROR 2012-09-19 14:30:09
com.tridion.smarttarget.utils.AmbientDataHelper - can't find defined
trigger-types in claim store (check if your smarttarget cartridge is
up and running)
and:
ERROR 2012-09-19 14:30:11
com.tridion.smarttarget.tags.TimeoutQueryRunner - The fredhopper query
timed out java.util.concurrent.TimeoutException at
java.util.concurrent.FutureTask$Sync.innerGet(Unknown Source) at
java.util.concurrent.FutureTask.get(Unknown Source) at
com.tridion.smarttarget.tags.TimeoutQueryRunner.executeQuery(TimeoutQueryRunner.java:64)
ERROR 2012-09-19 14:30:11
com.tridion.smarttarget.tags.TimeoutQueryRunner - The fredhopper query
timed out
I would really like to understand what is causing these and how I can remove them. Or some suggested steps to help me debug this would be great :)
As I say, everything is working perfectly, later on in the logs I see the query to ST is correct and the results being generated.
In the event that is helps, I'm running on a 2009 implementation with Smart Target 2010, java 1.5.
thanks
John
Sounds like you might have a trigger configured in ST that does not actually exist in the ADF (or is mismatched). Have you looked through your trigger-types.xml file for anything obvious? Have you disabled an ADF cartridge but not removed the corresponding trigger in the XML perhaps? See the documentation for Defining trigger types.
I think your timeout is coming from the SmartTarget region rather than FredHopper. Sometimes a query that isn't already cached in FredHopper can take a while to return, even though it's ultimately successful. The ST query tag has a timeout (defined in the smarttarget_conf.xml file, or over-ridden with a tag attribute) that it will wait for a response from Fredhopper for before resorting to using the fallback content. This might explain why you see later in the logs that the query is correct and that results are returned. See the documentation for <tcdl:query>.
No conclusive answer for you I'm afraid, but I hope that helps.
The first error is logged if your SmartTarget cartridge is not running -- or if the data that it puts into ADF is lost somehow (e.g. you have disabled sessions in your web server).
In that case, SmartTarget will still do a query but it won't include anything from the Ambient Data Framework in it. If you don't have any triggers based on ambient data, the end result is the same for you.
To get rid of the error, make sure that smarttarget_cartridge is configured correctly.
As for the timeout error, it simply means that the query sent to Fredhopper took longer than the configured time. In that case it will show the fallback content instead. If this is happening a lot, you might want to increase the timeout within smarttarget_conf.xml.
I hope you found the issue, but for future reference, the first error message is raised when the claim "taf:claim:ambientdata:definedtriggertypes" is not set by the SmartTarget cartridge. This can be caused by:
SmartTarget cartridge could not load the the trigger types from the SmartTarget server. The log will show an error "can't retrieve list of defined trigger types from FH".
The HTTP session on your web server is expired during an active visit (the HTTP session expired but the browser is still open) and the claim is "lost".
The server does not support sessions like Peter mentioned.

MSDeploy issues (WMSVC 500 error)

Having some issues with MSDeploy on a windows server 2008 box, the internal service is throwing a 500 error without putting anything in the server's event logs.
I'm attempting to setup automated deployments using MSBuild/TeamCity/MSDeploy, and this is basically the current halting point, has anyone come across this issue before?
Thanks, Ed
To find out why you are getting this error you should enable logging.
First, enable Failed Request Tracing for the web management service. You can see how to do this by referring to the "Optional: Set Up Tracing" section of this article:
http://learn.iis.net/page.aspx/984/configure-web-deploy/
The "frebs" can be found in:
C:\inetpub\logs\wmsvc\TracingLogFiles\W3SVC1
Open each of the frXXXXXX.xml files with IE and it'll use the freb.xsl transform to generate a nice report.
Don't delete freb.xsl when you're done, it doesn't always get recreated.
Then turn on logging for the web management service:
http://technet.microsoft.com/en-us/library/ff729437(WS.10).aspx
You want to have the following registry entry configured:
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\IIS Extensions\MSDeploy\1]
"EnabledTraceLevel"=dword:00000002
"EnabledTraceSources"=dword:000001ff
You can fiddle with the tracing levels/sources to increase and decrease the verbosity of the logs.
As per the article the management service logs are written to:
%WINDIR%\ServiceProfiles\LocalService\AppData\Local\Temp\WMSvc.log

Resources