I am deploying a journey to Elastic Synthetics using the following command: npm run push
.
I'm using Elastic Cloud 8.7.0 and my agent is an elastic-agent-complete:8.7.0
container.
The test is pushing to Elastic Cloud as expected, however it does not run and stays in pending status. When I run the test locally using npx @elastic/synthetics .
, it runs as expected and succeeds.
When I check the agent logs for the test ID, these are the log entries I find that appear to be relevant:
{"log.level":"info","@timestamp":"2023-04-14T15:09:48.602Z","message":"Running /usr/share/elastic-agent/.node/node/bin/npm install in /tmp/elastic-synthetics-unzip-3786772281","component":{"binary":"heartbeat","dataset":"elastic_agent.heartbeat","id":"synthetics/browser-default","type":"synthetics/browser"},"log":{"source":"synthetics/browser-default"},"log.origin":{"file.line":148,"file.name":"source/local.go"},"service.name":"heartbeat","ecs.version":"1.6.0","ecs.version":"1.6.0"}
{"log.level":"info","@timestamp":"2023-04-14T15:09:51.429Z","message":"Running command: /tmp/elastic-synthetics-unzip-3786772281/node_modules/.bin/elastic-synthetics /tmp/elastic-synthetics-unzip-3786772281/node_modules/.bin/elastic-synthetics /tmp/elastic-synthetics-unzip-3786772281 --playwright-options {\"headless\":true,\"ignoreHTTPSErrors\":false} --screenshots on --throttling 5d/3u/20l --rich-events --match MyApp Dev --params \"{2 hidden params}\" in directory: '/tmp/elastic-synthetics-unzip-3786772281'","component":{"binary":"heartbeat","dataset":"elastic_agent.heartbeat","id":"synthetics/browser-default","type":"synthetics/browser"},"log":{"source":"synthetics/browser-default"},"service.name":"heartbeat","ecs.version":"1.6.0","log.origin":{"file.line":170,"file.name":"synthexec/synthexec.go"},"ecs.version":"1.6.0"}
{"log.level":"warn","@timestamp":"2023-04-14T15:09:51.429Z","message":"Could not start command /tmp/elastic-synthetics-unzip-3786772281/node_modules/.bin/elastic-synthetics /tmp/elastic-synthetics-unzip-3786772281 --playwright-options {\"headless\":true,\"ignoreHTTPSErrors\":false} --screenshots on --throttling 5d/3u/20l --rich-events --match MyApp Dev --params {\"dev\":{\"id\":\"179aa0f6-7d83-4980-aacf-ee932e7df83b\",\"journey\":\"MyApp Dev\",\"url\":\"https://myapp-dev.example.com/\",\"validation\":\"MyCompany\"},\"prod\":{\"id\":\"c95acd45-b81b-4473-8f6a-fa98f3b175cc\",\"journey\":\"MyApp Prod\",\"url\":\"https://myapp-dev.example.com/\",\"validation\":\"MyCompany\"}} --outfd 3: fork/exec /tmp/elastic-synthetics-unzip-3786772281/node_modules/.bin/elastic-synthetics: permission denied","component":{"binary":"heartbeat","dataset":"elastic_agent.heartbeat","id":"synthetics/browser-default","type":"synthetics/browser"},"log":{"source":"synthetics/browser-default"},"log.origin":{"file.line":251,"file.name":"synthexec/synthexec.go"},"service.name":"heartbeat","ecs.version":"1.6.0","ecs.version":"1.6.0"}
/tmp/elastic-synthetics-unzip-3786772281/node_modules/.bin/
contains the following:
lrwxrwxrwx 1 root root 34 Apr 14 15:09 elastic-synthetics -> ../@elastic/synthetics/dist/cli.js
lrwxrwxrwx 1 root root 34 Apr 14 15:09 synthetics -> ../@elastic/synthetics/dist/cli.js
This resolves to the directory /tmp/elastic-synthetics-unzip-3786772281/node_modules/@elastic/synthetics/dist
, which contains:
-rwxrwx--- 1 elastic-agent elastic-agent 8479 Mar 28 04:07 cli.js*
This has 0770 perms which should be executable for user/group and contains the following shebang:
#!/usr/bin/env node
...so I'm uncertain what is causing the permission denied.