Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error running the docker-compose run k6 run /scripts/ewoks.js #6

Open
FJLopezGarcia opened this issue Feb 8, 2022 · 2 comments
Open

Comments

@FJLopezGarcia
Copy link

FJLopezGarcia commented Feb 8, 2022

Hi @luketn how are your? I am writing you since i am having an error running the docker-compose run k6 run /scripts/ewoks.js

I have clone the repository and from docker-k6-grafana-influxdb folder after running the docker-compose up -d influxdb grafana (the container is running)
image1

But when i run the docker-compose run k6 run /scripts/ewoks.js I am getting the following error:
image2

Do you know what could be the root cause? i am running from mac

Thanks a lot isn advance!

@tirmizee
Copy link

@FJLopezGarcia you can try to change k6 version to loadimpact/k6:0.34.1

@topolanekmartin
Copy link

For me as a windows user it worked when I edited the files as follows:

docker-compose.yml

  k6:
    image: loadimpact/k6:latest
    entrypoint: /bin/sh
    user: root
    networks:
      - k6
    ports:
      - "6565:6565"
    environment:
      - K6_OUT=influxdb=http://influxdb:8086/k6
    volumes:
      - ./scripts:/scripts

run-load-test.sh

docker compose up --build -d influxdb grafana
echo "--------------------------------------------------------------------------------------"
echo "Load testing with Grafana dashboard http://localhost:3000/d/k6/k6-load-testing-results"
echo "--------------------------------------------------------------------------------------"
docker compose run --rm -it k6

Then I run this bash command from root directory:

./run-load-test.sh

Inside docker container terminal I run following command:

k6 run /scripts/ewoks.js

Problem was in resolving path to ewoks.js script. When I ran command docker compose run --rm k6 run /scripts/ewoks.js, the path to script was resolved in my Windows context and not in k6 container context. So docker container tried to run script located in C:/Program Files/Git/scripts/ewoks.js.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants