When I create a multi-step journey in the UI and paste this script in, it fails, but it does attempt to run.
Update #2
I figured out what the issue was and it now runs as expected when I create a multi-step journey with the above script in the UI. Still not working when pushed from CLI.
I have to wonder whether this is the issue. When I look at the processes running in the container, they're all running as root. Are all synthetics test pushed through the UI automagically run as elastic-agent? OTOH, if this were the issue, I would expect the lightweight tests I'm pushing via @elastic/synthetics to also fail.
@Andrew_Cholakian1 - Since your deployment is working as expected, can you provide any insight?
When I attempt to deploy a browser test to an on-prem node (e.g., an Elastic Agent deployed to a Linux server, rather than to an elastic-agent-complete container), I get the following error:
I'm also stuck into the same error. Browser monitors run correctly when created through Kibana but they don't when created using project monitors.
I tried changing the user of my k8s container to "elastic-agent" as described in the docs but it gives me other permission errors while starting up the container.
@Andrew_Cholakian1 I'm getting exactly the same error that @DougR mentioned in the beginning of this thread. BTW I'm using ECK and elastic-agent-complete:8.7.0 as well.
When I change the user to elastic-agent (runAsUser: 1000) I keep getting the following error and the container doesn't start.
In my last investigation I checked the permissions of the folders inside /tmp and discovered that my monitors are being copied to the agent with permissions to the root user only. I suspect this is the reason why the elastic-agent user can't execute that .bin/elastic-synthetics command.
Elastic agent cannot run as non-root user, it's a known issue for ECK deployments. Any errors you get when changing the user are probably related to that.
Could you check under what user and capabilities heartbeat process is running? What does the env variable BEAT_SETUID_AS evaluate to inside the container?
We have mechanisms in place to prevent running browser monitors as a root user which are probably interfering here. FYI, we have introduced a new approach on 8.7.1.
Thanks for the info @tf4, I reviewed the scenario again and it turns out your analysis was right on target.
We have had issues with around mitigations in place to prevent running browser monitors under root. A new approach was implemented on 8.7.0 (not 8.7.1, as I thought) which impacts push monitors and other deprecated types. Since we generally recommend not running containers as root, this issue will impact ECK users mostly.
We have mechanisms in place to prevent running browser monitors as a root user which are probably interfering here. FYI, we have introduced a new approach on 8.7.1.
I just updated to 8.7.1 today. However, in checking my tests, there don't seem to be any changes. I'm still receiving the same results.
We have had issues with around mitigations in place to prevent running browser monitors under root. A new approach was implemented on 8.7.0 (not 8.7.1, as I thought) which impacts push monitors and other deprecated types. Since we generally recommend not running containers as root, this issue will impact ECK users mostly.
A quick question. You write "...push monitors and other deprecated types." Have push monitors been deprecated?
As @shahzad31 very kindly mentioned, push monitors and their related features are not deprecated.
What I meant to say is: other monitor types (mainly zip url and local), which are already deprecated, are also impacted. I should have used better wording on my previous comment, sorry about the confusion.
On the other topics:
Yes, I initially thought 8.7.1 was the version that came with permissions rework, but it ended up going into 8.7.0.
elastic-agent is the user that heartbeat will switch to when running synthetic journeys, since chromium can be picky about running as root. ATM, permissions are not granted to this user in order to read journey files from disk.
NP. This is what I assumed, I just wanted clarification, since we've just started to go down this road for our synthetic monitoring.
elastic-agent is the user that heartbeat will switch to when running synthetic journeys, since chromium can be picky about running as root. ATM, permissions are not granted to this user in order to read journey files from disk.
Are there any workarounds for this? I've attempted to set umask for the /tmp directory, as well as attempted to do a setacl + sticky bit on /tmp when the pod starts, but no joy so far.
Unfortunately, there's no workaround that we can suggest using. Our recommendation would be to upgrade to v8.8 when possible and, in the meantime, running these on our synthetics infrastructure, if that's an option for you.
Unfortunately we can't share expected release dates, it's always possible to find a bug that might cause us to delay a release for instance. It has been a while since our last minor, and it's our goal to get this release out to customers as soon as it's ready. Apologies for the issues you've seen, and we hope 8.8 works much better for you.
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.