# Elastic Observability On-Demand: APM RUM agent seems to have wrong version

**URL:** <https://discuss.elastic.co/t/elastic-observability-on-demand-apm-rum-agent-seems-to-have-wrong-version/317419>\
**Category:** Elastic Training\
**Created:** [October 25, 2022, 2:07pm UTC](https://discuss.elastic.co/t/elastic-observability-on-demand-apm-rum-agent-seems-to-have-wrong-version/317419 "2022-10-25T14:07:33Z")\
**Posts on this page:** 17\
**Page:** 1

<div class="post-metadata">

**Author:** ![jan.stap](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jan.stap/32/97404_2.png) [@jan.stap](https://discuss.elastic.co/u/jan.stap)\
**Post date:** [October 25, 2022, 2:07pm UTC](https://discuss.elastic.co/t/elastic-observability-on-demand-apm-rum-agent-seems-to-have-wrong-version/317419/1 "2022-10-25T14:07:33Z")

</div>

Hi,

Lab 3.4 instructs to install version 4.9.0 of the APM RUM agent by running:

`npm install @elastic/apm-rum@4.9.0 --save`

After doing this and then applying the agent configuration as instructed in the lab I do receive the agent data in Kibana, however the Service Map has no connection between the RUM agent and the Node.js agent (marked with red cross):

![afbeelding](https://us1.discourse-cdn.com/elastic/original/3X/0/9/094c0b86122fe906e76c1213169ea86d1321c084.png)

The Petclinic application itself works fine as seen from my browser, so data _is_ flowing from the React to the Node.js application.

I notice that the APM integration in Kibana has version 8.2.0 and the [APM agent compatibility page](https://www.elastic.co/guide/en/apm/guide/current/agent-server-compatibility.html) says that for APM integration version \>= 7.0 one needs to use a JavaScript RUM agent version **5.x** , not 4.x.

So... can I fix this issue by upgrading the RUM agent to the latest version? (currently 5.12.0).

Thanks!

---

<div class="post-metadata">

**Author:** ![Andre\_Murbach\_Maidl](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/andre_murbach_maidl/32/83508_2.png) [@Andre\_Murbach\_Maidl](https://discuss.elastic.co/u/Andre_Murbach_Maidl)\
**Post date:** [October 25, 2022, 2:24pm UTC](https://discuss.elastic.co/t/elastic-observability-on-demand-apm-rum-agent-seems-to-have-wrong-version/317419/2 "2022-10-25T14:24:54Z")

</div>

Hi @jan.stap ,

the issue is actually related to the way the load generator works, as most of the transactions are triggered from `petclinic-node`. After you interact with PetClinic in your browser you can narrow the time window with the time picker (e.g. Last 15 minutes) and you will probably get the proper service map. We will work to fix this in a next training release. Thanks for pointing this out.

Best,  
Andre

---

<div class="post-metadata">

**Author:** ![jan.stap](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jan.stap/32/97404_2.png) [@jan.stap](https://discuss.elastic.co/u/jan.stap)\
**Post date:** [October 25, 2022, 2:36pm UTC](https://discuss.elastic.co/t/elastic-observability-on-demand-apm-rum-agent-seems-to-have-wrong-version/317419/3 "2022-10-25T14:36:32Z")

</div>

Hi Andre,

I do have used the Petclinic GUI quite a lot and in this way generated traffic via the React component of the app. But still no connection in the Service Map and no transactions spanning from React onwards through Node.js and on.

I did have an issue initially with the petclinic-java component as I made a backup copy /root/start-scripts/50-petclinic-server.sh-20221022 of the /root/start-scripts/50-petclinic-server.sh file, not smart, as this resulted in two copies trying to start. So I deleted the backup file and restarted petclinc-java, after which it worked fine, also the Java agent.

This caused the RUM agent to send data before the Node.js agent did. Could this have caused the "missing link"?

And what about the compatibility page saying we need a 5.x RUM agent?

Thanks.

---

<div class="post-metadata">

**Author:** ![jan.stap](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jan.stap/32/97404_2.png) [@jan.stap](https://discuss.elastic.co/u/jan.stap)\
**Post date:** [October 25, 2022, 4:59pm UTC](https://discuss.elastic.co/t/elastic-observability-on-demand-apm-rum-agent-seems-to-have-wrong-version/317419/4 "2022-10-25T16:59:52Z")

</div>

Hi Andre,

I zoomed in on the period of my own activity on the petclinic GUI, but still get the same result. Tried couple of times.

Trying to figure out in the traces-apm.rum-\* datastreams what may be wrong. At least all event.outcome field values are "unknown"; for non-rum they are mostly "success". Docs [here](https://www.elastic.co/guide/en/apm/guide/8.2/data-model-transactions.html) don't go into that detail, sigh...

Cheers,  
Jan

---

<div class="post-metadata">

**Author:** ![jan.stap](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jan.stap/32/97404_2.png) [@jan.stap](https://discuss.elastic.co/u/jan.stap)\
**Post date:** [October 25, 2022, 5:07pm UTC](https://discuss.elastic.co/t/elastic-observability-on-demand-apm-rum-agent-seems-to-have-wrong-version/317419/5 "2022-10-25T17:07:16Z")

</div>

Hi Andre,

Please reset my labs, such that I can hopefully get a working setup regarding RUM.

My subscription email is: [jan.stap@atos.net](mailto:jan.stap@atos.net)

Thanks!  
Jan

---

<div class="post-metadata">

**Author:** ![Andre\_Murbach\_Maidl](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/andre_murbach_maidl/32/83508_2.png) [@Andre\_Murbach\_Maidl](https://discuss.elastic.co/u/Andre_Murbach_Maidl)\
**Post date:** [October 25, 2022, 6:27pm UTC](https://discuss.elastic.co/t/elastic-observability-on-demand-apm-rum-agent-seems-to-have-wrong-version/317419/6 "2022-10-25T18:27:18Z")

</div>

Hi @jan.stap ,

I already replaced your lab instance.

Best,  
Andre

---

<div class="post-metadata">

**Author:** ![jan.stap](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jan.stap/32/97404_2.png) [@jan.stap](https://discuss.elastic.co/u/jan.stap)\
**Post date:** [October 26, 2022, 6:49am UTC](https://discuss.elastic.co/t/elastic-observability-on-demand-apm-rum-agent-seems-to-have-wrong-version/317419/7 "2022-10-26T06:49:13Z")

</div>

Thanks!

---

<div class="post-metadata">

**Author:** ![jan.stap](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jan.stap/32/97404_2.png) [@jan.stap](https://discuss.elastic.co/u/jan.stap)\
**Post date:** [October 26, 2022, 3:08pm UTC](https://discuss.elastic.co/t/elastic-observability-on-demand-apm-rum-agent-seems-to-have-wrong-version/317419/8 "2022-10-26T15:08:16Z")

</div>

Hi Andre,

I have run through all labs again up to and including the RUM agent config. I still get an isolated RUM agent in my service map. Done a lot of accesses on the Petclinic GUI, in Kibana APM selected just that timeframe and still get an isolated RUM agent. Tried other browser (Chrome instead of Firefox), tried Dynamic DNS name instead of public URL for apm\_server\_js param (but resolves to same IP, so indeed makes no difference).

Any suggestions are welcome. But I don't want to burn all my lab time on this topic, so I continue the labs.

Thanks,

Jan

---

<div class="post-metadata">

**Author:** ![Andre\_Murbach\_Maidl](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/andre_murbach_maidl/32/83508_2.png) [@Andre\_Murbach\_Maidl](https://discuss.elastic.co/u/Andre_Murbach_Maidl)\
**Post date:** [October 26, 2022, 3:36pm UTC](https://discuss.elastic.co/t/elastic-observability-on-demand-apm-rum-agent-seems-to-have-wrong-version/317419/9 "2022-10-26T15:36:39Z")

</div>

Hi @jan.stap ,

can you please share your configuration file?

Best,  
Andre

---

<div class="post-metadata">

**Author:** ![jan.stap](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jan.stap/32/97404_2.png) [@jan.stap](https://discuss.elastic.co/u/jan.stap)\
**Post date:** [October 26, 2022, 3:41pm UTC](https://discuss.elastic.co/t/elastic-observability-on-demand-apm-rum-agent-seems-to-have-wrong-version/317419/10 "2022-10-26T15:41:30Z")

</div>

Hi Andre,

This is my config.js:

```auto
var config = {
  apm_server: process.env.ELASTIC_APM_SERVER_URL || 'http://fleet-server:8200',
  apm_server_token: process.env.ELASTIC_APM_SECRET_TOKEN || 'nonprodpwd',
  apm_server_js: process.env.ELASTIC_APM_SERVER_JS_URL || 'http://ec2-52-59-226-231.eu-central-1.compute.amazonaws.com:8200',
  apm_service_name: process.env.ELASTIC_APM_SERVICE_NAME || 'petclinic-node',
  apm_client_service_name: process.env.ELASTIC_APM_CLIENT_SERVICE_NAME || 'petclinic-react',
  apm_service_version: process.env.ELASTIC_APM_SERVICE_VERSION || '1.0.0',
  api_server: process.env.API_SERVER || 'http://petclinic-server:8000',
  api_prefix: process.env.API_PREFIX || '/petclinic/api',
  address_server: process.env.ADDRESS_SERVER || 'http://address-finder:5000',
  distributedTracingOrigins: process.env.DISTRIBUTED_TRACINGS_ORIGINS || 'http://petclinic-client:4000,http://petclinic-server:8000,http://localhost:4000,http://localhost:8080,http://localhost:8081'
}

module.exports = config;

```

Basically the same as in the lab solution.

Cheers,  
Jan

---

<div class="post-metadata">

**Author:** ![Andre\_Murbach\_Maidl](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/andre_murbach_maidl/32/83508_2.png) [@Andre\_Murbach\_Maidl](https://discuss.elastic.co/u/Andre_Murbach_Maidl)\
**Post date:** [October 26, 2022, 4:09pm UTC](https://discuss.elastic.co/t/elastic-observability-on-demand-apm-rum-agent-seems-to-have-wrong-version/317419/11 "2022-10-26T16:09:31Z")

</div>

Hi @jan.stap ,

is [ec2-52-59-226-231.eu-central-1.compute.amazonaws.com](http://ec2-52-59-226-231.eu-central-1.compute.amazonaws.com) your current Public DNS? The config file should be using the current Public DNS of your lab instance.

Best,  
Andre

---

<div class="post-metadata">

**Author:** ![jan.stap](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jan.stap/32/97404_2.png) [@jan.stap](https://discuss.elastic.co/u/jan.stap)\
**Post date:** [October 27, 2022, 7:35am UTC](https://discuss.elastic.co/t/elastic-observability-on-demand-apm-rum-agent-seems-to-have-wrong-version/317419/12 "2022-10-27T07:35:27Z")

</div>

Hi Andre,

Yes, I update that every time it changes after pause/resume of my labs, after which I restart the petclinic-client container.

FYI in Kibana Discover I found that the RUM agent just sees the loadgen traffic, not my browser traffic:

- my FireFox and Chrome browsers do appear in the set of user agents:

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/f/1/f1029dcf2e3e161563bcc0d0237f7b67b6d25153.png)

- but when filtering on the FireFox one, I only get these APM agent names:

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/9/5/950cc513a0f83bf7dfd9f4942c458bc7731ead4b.png)

- disabling this filter also gives me agent.name:"js\_base", which must be the RUM agent. Filtering on that agent, I only get the loadgen-related user agent, so no FireFox or Chrome:

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/1/d/1d54e17a28b846f8cce4c9b3b5ae9c40a35a42bc.png)

So in all, the RUM agent just sees the loadgen traffic, whereas the other three agents see loadgen, FireFox and Chrome traffic. Could this be some browser security filter blocking JavaScript injection? (not sure if that happens at all here though).

Thanks,

Jan

---

<div class="post-metadata">

**Author:** ![Andre\_Murbach\_Maidl](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/andre_murbach_maidl/32/83508_2.png) [@Andre\_Murbach\_Maidl](https://discuss.elastic.co/u/Andre_Murbach_Maidl)\
**Post date:** [October 27, 2022, 2:42pm UTC](https://discuss.elastic.co/t/elastic-observability-on-demand-apm-rum-agent-seems-to-have-wrong-version/317419/13 "2022-10-27T14:42:39Z")

</div>

Hi @jan.stap ,

I tested on my end and it worked. Are you accessing PetClinic using the following URL pattern?

`http://<public-DNS>:4000`

If you use the internal Strigo URL it will not be able to communicate with the RUM agent.

You can also use the developer tools of your browser to check if your APM agent is being created correctly. You should see something like this:

 ![Screen Shot 2022-10-27 at 11.34.44](https://us1.discourse-cdn.com/elastic/original/3X/c/4/c4f0d4e0b5b6b5eb30b9ee9423c9da8fcf2eeb1a.jpeg)

If you see any error that's an indication that something is not right in the configuration.

If you still have trouble you can send me a private message with your Public DNS so I can take a look in your environment.

Best,  
Andre

---

<div class="post-metadata">

**Author:** ![jan.stap](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jan.stap/32/97404_2.png) [@jan.stap](https://discuss.elastic.co/u/jan.stap)\
**Post date:** [October 28, 2022, 9:56am UTC](https://discuss.elastic.co/t/elastic-observability-on-demand-apm-rum-agent-seems-to-have-wrong-version/317419/14 "2022-10-28T09:56:19Z")

</div>

Hi Alex,

Got it! Should have remembered myself to check devtools. The agent was blocked due to a "mixed content" web page: the app itself is served over HTTPS, but the agent connects over HTTP. I got this:

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/4/c/4c826888b088d0da25ab0cfc5dde1651cb0773de.png)

and:

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/1/6/166f849e355ea32c5c69dca5686d3dd98d394e87.png)

The "[Learn More]" in the top screenshot leads to [here](https://developer.mozilla.org/en-US/docs/Web/Security/Mixed_content). Since FireFox 23 mixed content is blocked, the page says. I see the protection can be manually switched off for the session duration:

![afbeelding](https://us1.discourse-cdn.com/elastic/original/3X/2/b/2b4c5a59c2eaf4f8a290e2aff35767464e403d17.png)

After doing so, I indeed get the correct service map:

 ![afbeelding](https://us1.discourse-cdn.com/elastic/original/3X/1/8/1874f3a7638d8f94e7cb7df0a8afef0958d3f1f1.png)

Thanks a lot for your help! I guess this info is something to include in the labs, or even better the agent to be put on HTTPS.

Best regards,

Jan

---

<div class="post-metadata">

**Author:** ![jan.stap](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jan.stap/32/97404_2.png) [@jan.stap](https://discuss.elastic.co/u/jan.stap)\
**Post date:** [October 28, 2022, 10:09am UTC](https://discuss.elastic.co/t/elastic-observability-on-demand-apm-rum-agent-seems-to-have-wrong-version/317419/15 "2022-10-28T10:09:14Z")

</div>

FYI in Chrome 106.0.5249.120:

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/7/0/7070738306a0a6c4db164d819b423293389d155f.png)

Cheers, Jan

---

<div class="post-metadata">

**Author:** ![Andre\_Murbach\_Maidl](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/andre_murbach_maidl/32/83508_2.png) [@Andre\_Murbach\_Maidl](https://discuss.elastic.co/u/Andre_Murbach_Maidl)\
**Post date:** [October 28, 2022, 12:39pm UTC](https://discuss.elastic.co/t/elastic-observability-on-demand-apm-rum-agent-seems-to-have-wrong-version/317419/16 "2022-10-28T12:39:06Z")

</div>

Hi @jan.stap

thanks very much for your feedback. We will indeed add this note to lab instructions about using HTTP over HTTPS.

Best,  
Andre

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [November 27, 2022, 12:39pm UTC](https://discuss.elastic.co/t/elastic-observability-on-demand-apm-rum-agent-seems-to-have-wrong-version/317419/17 "2022-11-27T12:39:57Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
