cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Duplicate Injection: ruxitagentjs and dtjsagent After Second Page Load Action In RUM Session

I've instrumented a web application in Dynatrace, and all of my applications automatically inject the ruxitagentjs file with a snippet like this:

<script type="text/javascript" src="/ruxitagentjs_27SVdfjqrux_10171190702121620.js" data-dtconfig="app=aa1423c5ea7c8b7d|srms=1,1,,,|uxrgcm=100,25,300,3;100,25,300,3|featureHash=27SVdfjqrux|lastModification=1562124269798|srsr=25000|dtVersion=10171190702121620|tp=500,50,0,1|rdnt=1|uxrgce=1|uxdcw=1500|bp=2|agentUri=/ruxitagentjs_27SVdfjqrux_10171190702121620.js|reportUrl=/rb_bf71503msz|rid=RID_1447354126|rpid=-851053352|domain=syscolabs.com"></script>


But then on only one of my applications I get this injected immediately after the above snippet:

<script id="dtjsagent" type="text/javascript" src="/ruxitagentjs_27SVdfjqrux_10171190702121620.js"></script>

When this secondary dtjsagent is injected, we get a console log like this:

Duplicate agent injection detected, turning off redundant initConfig.
Initconfig not found or agent already initialized! This is an injection issue.
Duplicate agent injection detected or no initCode available, turning off redundant core.
WARNING: Module "2" already enabled!
WARNING: Module "7" already enabled!
WARNING: Module "V" already enabled!
WARNING: Module "d" already enabled!
WARNING: Module "f" already enabled!
WARNING: Module "j" already enabled!
WARNING: Module "q" already enabled!
WARNING: Module "r" already enabled!
WARNING: Module "x" already enabled!

When the application has a double injection like this, NO USER ACTIONS or RUM occurs.


Here's the really weird part: The first time a user loads this app everything is fine and works normally. Afterwards, when the user refreshes or loads another page, the duplicate injection occurs. If the user clears their cookies or opens an incognito/private browser the injection is fine. It's only starting with the 2nd page load action during a session that a duplicate injection occurs.

I'm so confused! Has anyone else encountered this type of situation?


8 REPLIES 8

skrystosik
DynaMight Guru
DynaMight Guru

The question is: do you have manual injection on tho single application with double agents? Is it still available when you disable rum for this application? Are you sure that only this application is covering requests from it’s uri pattern?

Sebastian


Regards, Sebastian

Negative, no manual injection.

Yes, sure that no other applications match this uri. However, when I disable RUM on the application the ruxitagentjs is still injected. I continue to get duplicate injection. Not sure how or why, but maybe a cache is preventing the injection from leaving?


Ok another idea. Please confirm if I am correct. You have some application process working on tomcat for example and then you have nginx/apache as reverse proxy? If yes than go to process group related to tomcat and disable injecting rum on this level. This should help 🙂

Sebastian


Regards, Sebastian

Yes, we've got nginx serving as a reverse proxy for tomcat. However, that's the setup for _all_ of the applications, and they're actually powered by the exact same nginx/tomcat with domain names causing tomcat to load a different context path. Why would this only affect 1 webapp and not all 5 of them?


It may be case for support, but I've seen such issue before in this context.

Sebastian


Regards, Sebastian

So, it's been about 12 hours since I disabled the RUM on the problem app, and now that some caches have had a chance to clear I am no longer seeing any injection in the problem app. I haven't restarted any processes or disabled RUM anywhere else.

RUM injection still working perfectly for all other apps served by the same host.


Babar_Qayyum
DynaMight Guru
DynaMight Guru

Hello Ian,

I had faced almost a similar issue with an application in the past. I found that the same application was instrumented by AppMon and UEM feature was enabled on it.

Once I disabled the UEM from the AppMon then duplication of scripts gone and UEM started work accordingly.

Regards,

Babar


Ah, unfortunately we're not using AppMon but rather Dynatrace. These are, evidently, separate products. But thanks for the input!


Featured Posts