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

🐛 : Problem with Runner #750

Open
barbaops opened this issue Oct 15, 2024 · 6 comments
Open

🐛 : Problem with Runner #750

barbaops opened this issue Oct 15, 2024 · 6 comments
Assignees
Labels
🐛 bug Something isn't working

Comments

@barbaops
Copy link

Describe the bug
I create stack with Docker-Compose following doc, but when i try running any stack the runner show error:

Unable to connect to gaia find jobs to run : I/O error on GET request for "http://localhost:8080/api/runner/steps/request": Connection refused; nested exception is java.net.ConnectException: Connection refused

I try change the port, url but only error

To Reproduce
Steps to reproduce the behavior:

  1. Running docker-compose up -d
  2. Access with admin
  3. Create a module or import from GitHub
  4. Try Launch

Expected behavior

Screenshots
If applicable, add screenshots to help explain your problem.
image
image
image

Desktop (please complete the following information):

  • OS: Windows 11
  • Browser Edge and Chrome
  • Version Lkatest
@barbaops barbaops added the 🐛 bug Something isn't working label Oct 15, 2024
@juwit
Copy link
Member

juwit commented Oct 16, 2024

Hey @barbaops ! 👋

Can you share your docker-compose file?
The error IO error on GET request for "http://localhost:8080/api/runner/steps/request" means that your runner is missing the GAIA_URL configuration.

The related documentation is here: https://docs.gaia-app.io/getting-started/quick-start/#getting-started-with-docker-compose-pre-build-images

@juwit juwit self-assigned this Oct 16, 2024
@barbaops
Copy link
Author

barbaops commented Oct 18, 2024

Follow the docker-compose file:

version: "3.9"
services:
  gaia:
    image: "gaiaapp/gaia"
    ports: 
      - "8080:8080"
    environment:
      - "GAIA_MONGODB_URI=mongodb://mongo/gaia"
      - "GAIA_RUNNER_API_PASSWORD=123456"
      - "GAIA_EXTERNAL_URL=http://localhost:8080"
      - "SPRING_PROFILES_ACTIVE=github"
      - "SPRING_SECURITY_OAUTH2_CLIENT_REGISTRATION_GITHUB_CLIENT_ID=xxxxxxxxxx"
      - "SPRING_SECURITY_OAUTH2_CLIENT_REGISTRATION_GITHUB_CLIENT_SECRET=xxxxxxxxx"
  runner:
    image: "gaiaapp/runner"
    environment:
      - "GAIA_URL=http://localhost:8080"
      - "GAIA_RUNNER_API_PASSWORD=123456"
    volumes:
      - "/var/run/docker.sock:/var/run/docker.sock"
  mongo:
    image: "mongo:4.4"

I use docker in local machine

@juwit
Copy link
Member

juwit commented Oct 18, 2024

The problem is the GAIA_URL in the runner.

It should be http://gaia:8080 (to use the gaia service)
The GAIA_EXTERNAL_URL in the gaia container can be http://localhost:8080.

So your docker-compose should be :

version: "3.9"
services:
  gaia:
    image: "gaiaapp/gaia"
    ports: 
      - "8080:8080"
    environment:
      - "GAIA_MONGODB_URI=mongodb://mongo/gaia"
      - "GAIA_RUNNER_API_PASSWORD=123456"
      - "GAIA_EXTERNAL_URL=http://localhost:8080"
      - "SPRING_PROFILES_ACTIVE=github"
      - "SPRING_SECURITY_OAUTH2_CLIENT_REGISTRATION_GITHUB_CLIENT_ID=xxxxxxxxxx"
      - "SPRING_SECURITY_OAUTH2_CLIENT_REGISTRATION_GITHUB_CLIENT_SECRET=xxxxxxxxx"
  runner:
    image: "gaiaapp/runner"
    environment:
      - "GAIA_URL=http://gaia:8080"
      - "GAIA_RUNNER_API_PASSWORD=123456"
    volumes:
      - "/var/run/docker.sock:/var/run/docker.sock"
  mongo:
    image: "mongo:4.4"

@barbaops
Copy link
Author

Job stuck:

image

Gaia Log
image

Runner Log:
image

My compose file:

version: "3.9"
services:
  gaia:
    image: "gaiaapp/gaia"
    ports: 
      - "8080:8080"
    environment:
      - "GAIA_MONGODB_URI=mongodb://mongo/gaia"
      - "GAIA_RUNNER_API_PASSWORD=123456"
      - "GAIA_EXTERNAL_URL=http://localhost:8080"
      - "SPRING_PROFILES_ACTIVE=github"
      - "SPRING_SECURITY_OAUTH2_CLIENT_REGISTRATION_GITHUB_CLIENT_ID=xxxxxxxxxx"
      - "SPRING_SECURITY_OAUTH2_CLIENT_REGISTRATION_GITHUB_CLIENT_SECRET=xxxxxxxxx"
  runner:
    image: "gaiaapp/runner"
    environment:
      - "GAIA_URL=http://gaia:8080"
      - "GAIA_RUNNER_API_PASSWORD=123456"
    volumes:
      - "/var/run/docker.sock:/var/run/docker.sock"
  mongo:
    image: "mongo:4.4"

@barbaops
Copy link
Author

Now when i try run a module, gaia create a terraform container BUT not running.....

image
image

If i delete this Container return error on gaia

@barbaops
Copy link
Author

@juwit can help?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants