We are using 7.16.x ELK version in production and Dev environment and we are running heartbeat docker container v7.17.x for uptime monitoring. The http tests are working but the browser tests are failing with below error. Any work around to fix this issue without upgrading the ELK stack? We tried to upgrade heartbeat docker version to 8.x but thats not compatible with older Elastic search.
docker-elk-heartbeat-1 | 2023-01-31T17:04:55.059Z INFO synthexec/synthexec.go:260 stderr: /tmp/elastic-synthetics-2772323990/node_modules/@elastic/synthetics/dist/core/runner.js:184docker-elk-heartbeat-1 | 2023-01-31T17:04:55.060Z INFO synthexec/synthexec.go:260 stderr: data.url ??= page.url();docker-elk-heartbeat-1 | 2023-01-31T17:04:55.062Z INFO synthexec/synthexec.go:260 stderr: ^^^docker-elk-heartbeat-1 | 2023-01-31T17:04:55.062Z INFO synthexec/synthexec.go:260 stderr: docker-elk-heartbeat-1 | 2023-01-31T17:04:55.062Z INFO synthexec/synthexec.go:260 stderr: SyntaxError: Unexpected token '??='docker-elk-heartbeat-1 | 2023-01-31T17:04:55.063Z INFO synthexec/synthexec.go:260 stderr: at wrapSafe (internal/modules/cjs/loader.js:988:16)
Syntax error suggests to me a potential version mismatch. You say you tried to upgrade heartbeat. Are you getting this error when you downgraded back down to the original version, or when you upgraded to version 8?
I am getting this error with ELK 7.16.x with heartbeat docker 7.17.x. I upgraded the heartbeat docker version to 8.x with allow_older_versions = true for elasticsearch in heartbeat.yml config but did not work still. We are getting this error only for browser tests with node package source.
Yes the error is from @elastic/synthetics package. We are using @elastic/synthetics": "^1.0.0-beta version. We tried with multiple version within beta versions but didnt help.
@lawrance.ruban We have released a lot of code changes to the Synthetics package considering the 8.x stack improvements from Kibana and ES, so it would be possible that there is some breaking changes. Could you help with the following.
ELK stack version : 7.16.3
Heartbeat docker version : 7.17.4
Synthetics version : ^1.0.0-beta.40 (tried different versions)
Monitor type : local type
heartbeat.yml
The node version that the HB stack 7.17.x is running is 14.x which lacks some of the features and why we are seeing this SyntaxError.
I am checking if there is anyway we can backport this change. But unfortunately, you would have to wait for the next patch release of the Elastic Stack. The alternative option is to move to 8.x release version and try using projected based monitors - Create monitors with Project Monitors | Observability Guide [8.6] | Elastic which runs on our SAAS infrastructure.
@vigneshshanmugam Thanks for the prompt response. Is there a workaround to use HB 8.x version with our existing ELK stack 7.16.x (runs on ELK SAAS infrastructure) or If we inject the newer Node version from our custom docker image to 7.17.x HB docker, will it work?
@vigneshshanmugam First of all thanks for the prompt response really appreciate it .The version 38 did not fix it. Actually older version 26 did the trick.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.