I've instrumented a web application in Dynatrace, and all of my applications automatically inject the ruxitagentjs file with a snippet like this:
But then on only one of my applications I get this injected immediately after the above snippet:
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?
Solved! Go to Solution.
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 🙂
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?
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.