APM Server - Error Connection Refused


(RT Patel) #1

If you are asking about a problem you are experiencing, please use the following template, as it will help us help you. If you have a different problem, please delete all of this text :slight_smile:

Kibana version:
6.7.1

Elasticsearch version:
6.7.1

APM Server version:
6.7.1

APM Agent language and version:
English
elastic-apm-rum.umd.min.js v4.0.1 from github

Browser version:
Chrome 71.0.3578.98

OS Version:
Ubuntu 18.04 LTS

Original install method (e.g. download page, yum, deb, from source, etc.) and version:
APT Repository

Fresh install or upgraded from other version?
Fresh

Is there anything special in your setup?

Description of the problem including expected versus actual behavior. Please include screenshots (if relevant):
Trying to setup up APM on simple Flask App. Python agent is working fine and we can see transactions in APM. The client-side is not interacting at all with the APM-Server. We are receiving ERR_CONNECTION_REFUSED error in the Chrome Debugger. Even though we have enabled RUM in the config file.

Steps to reproduce:
1.Setup basic Flask App with only a blank button (button generates a random number sends it to python, in python number is squared then displayed in an alert on web app).
2.Click button.
3.Receive alert of randomly generated integer squared.
4.Look in Chrome DevTools Console to see error.

Errors in browser console (if relevant):
elastic-apm-rum.umd.min.js:2 OPTIONS http://localhost:8200/intake/v2/rum/events net::ERR_CONNECTION_REFUSED

(anonymous) @ elastic-apm-rum.umd.min.js:2
(anonymous) @ elastic-apm-rum.umd.min.js:2
r.(anonymous function) @ elastic-apm-rum.umd.min.js:2
(anonymous) @ elastic-apm-rum.umd.min.js:2
e._makeHttpRequest @ elastic-apm-rum.umd.min.js:2
e._postJson @ elastic-apm-rum.umd.min.js:2
e.sendTransactions @ elastic-apm-rum.umd.min.js:2
(anonymous) @ elastic-apm-rum.umd.min.js:2
e.flush @ elastic-apm-rum.umd.min.js:2
(anonymous) @ elastic-apm-rum.umd.min.js:2
setTimeout (async)
e._setTimer @ elastic-apm-rum.umd.min.js:2
e.add @ elastic-apm-rum.umd.min.js:2
(anonymous) @ elastic-apm-rum.umd.min.js:2
e.addTransaction @ elastic-apm-rum.umd.min.js:2
(anonymous) @ elastic-apm-rum.umd.min.js:2
(anonymous) @ elastic-apm-rum.umd.min.js:2
e.applyAll @ elastic-apm-rum.umd.min.js:2
e.add @ elastic-apm-rum.umd.min.js:2
(anonymous) @ elastic-apm-rum.umd.min.js:2
(anonymous) @ elastic-apm-rum.umd.min.js:2
Promise.then (async)
(anonymous) @ elastic-apm-rum.umd.min.js:2
e.runOuter @ elastic-apm-rum.umd.min.js:2
e.applyAsync @ elastic-apm-rum.umd.min.js:2
a.onEnd @ elastic-apm-rum.umd.min.js:2
e.callOnEnd @ elastic-apm-rum.umd.min.js:2
r.end @ elastic-apm-rum.umd.min.js:2
r.detectFinish @ elastic-apm-rum.umd.min.js:2
r.removeTask @ elastic-apm-rum.umd.min.js:2
(anonymous) @ elastic-apm-rum.umd.min.js:2
setTimeout (async)
i @ elastic-apm-rum.umd.min.js:2
load (async)
e._sendPageLoadMetrics @ elastic-apm-rum.umd.min.js:2
e.init @ elastic-apm-rum.umd.min.js:2
(anonymous) @ (index):9

elastic-apm-rum.umd.min.js:2 Failed sending transactions! Error: http://localhost:8200/intake/v2/rum/events HTTP status: 0 at XMLHttpRequest.i.onreadystatechange (elastic-apm-rum.umd.min.js:2)

o.(anonymous function) @ elastic-apm-rum.umd.min.js:2
(anonymous) @ elastic-apm-rum.umd.min.js:2
Promise.then (async)
(anonymous) @ elastic-apm-rum.umd.min.js:2
e.flush @ elastic-apm-rum.umd.min.js:2
(anonymous) @ elastic-apm-rum.umd.min.js:2
setTimeout (async)
e._setTimer @ elastic-apm-rum.umd.min.js:2
e.add @ elastic-apm-rum.umd.min.js:2
(anonymous) @ elastic-apm-rum.umd.min.js:2
e.addTransaction @ elastic-apm-rum.umd.min.js:2
(anonymous) @ elastic-apm-rum.umd.min.js:2
(anonymous) @ elastic-apm-rum.umd.min.js:2
e.applyAll @ elastic-apm-rum.umd.min.js:2
e.add @ elastic-apm-rum.umd.min.js:2
(anonymous) @ elastic-apm-rum.umd.min.js:2
(anonymous) @ elastic-apm-rum.umd.min.js:2
Promise.then (async)
(anonymous) @ elastic-apm-rum.umd.min.js:2
e.runOuter @ elastic-apm-rum.umd.min.js:2
e.applyAsync @ elastic-apm-rum.umd.min.js:2
a.onEnd @ elastic-apm-rum.umd.min.js:2
e.callOnEnd @ elastic-apm-rum.umd.min.js:2
r.end @ elastic-apm-rum.umd.min.js:2
r.detectFinish @ elastic-apm-rum.umd.min.js:2
r.removeTask @ elastic-apm-rum.umd.min.js:2
(anonymous) @ elastic-apm-rum.umd.min.js:2
setTimeout (async)
i @ elastic-apm-rum.umd.min.js:2
load (async)
e._sendPageLoadMetrics @ elastic-apm-rum.umd.min.js:2
e.init @ elastic-apm-rum.umd.min.js:2
(anonymous) @ (index):9

Provide logs and/or server output (if relevant):