Giter Club home page Giter Club logo

Comments (2)

dosubot avatar dosubot commented on July 24, 2024 3

To resolve the "AxiosError: Request failed with status code 502" when trying to access DevLake on your Windows local machine, follow these steps:

  1. Ensure the Server is Running: Verify that the DevLake server is started and running on the specified port. Use the docker-compose.yml file provided in the DevLake repository to set up the necessary services.

  2. Check Docker Services: Ensure all services defined in the docker-compose.yml file are up and running. This includes mysql, grafana, devlake, and config-ui.

  3. Verify Configuration: Ensure that the environment variables and ports are correctly configured in the docker-compose.yml file. For example, the devlake service should be accessible on 127.0.0.1:8080.

  4. Check Nginx Configuration: Verify that the Nginx configuration for the config-ui service is correctly set up. The nginx.conf file should properly route requests to the DevLake and Grafana endpoints. Here is a relevant part of the nginx.conf file:

server {
  listen 80;
  server_name localhost;
  absolute_redirect off;
  client_max_body_size 20m;

  root /usr/share/nginx/html;

  location = / {
    add_header Cache-Control no-cache;
    expires 0;
    try_files /index.html =404;
  }

  location / {
    try_files $uri /index.html;
  }

  location /api/ {
    resolver 127.0.0.11 valid=30s;
    resolver_timeout 3s;
    set $target "devlake:8080";
    rewrite ^ $request_uri;
    rewrite ^/api/(.*) $1 break;
    proxy_send_timeout 60s;
    proxy_read_timeout 60s;
    proxy_pass http://$target/$uri;
    proxy_http_version 1.1;
    proxy_set_header   "Connection" "";
  }

  location /api/rest/ {
    auth_basic off;
    resolver 127.0.0.11 valid=30s;
    resolver_timeout 3s;
    set $target "devlake:8080";
    rewrite /api/(.*) /$1  break;
    proxy_send_timeout 60s;
    proxy_read_timeout 60s;
    proxy_pass http://$target;
    proxy_http_version 1.1;
    proxy_set_header   "Connection" "";
  }

  location /grafana/ {
    auth_basic off;
    set $external "false";
    if ($external = "true") {
      return 302 "http://localhost:3002";
    }
    resolver 127.0.0.11 valid=30s;
    resolver_timeout 3s;
    set $target "grafana:3000";
    proxy_set_header Host $http_host;
    proxy_set_header Authorization "";
    proxy_set_header X-Forwarded-Access-Token "${cookie_access_token}";
    proxy_send_timeout 60s;
    proxy_read_timeout 60s;
    proxy_pass http://$target;
    proxy_http_version 1.1;
    proxy_set_header   "Connection" "";
  }

  location /health/ {
    auth_basic off;
    return 200;
  }

  location /health {
    auth_basic off;
    return 200;
  }
}

Ensure the server is properly configured and running on the specified port. Use the docker-compose up command to start all the services and verify that they are running without errors [1][2][3].

Details

About Dosu
This response is meant to be useful and save you time. It is not meant to be a precise solution, but rather a starting point for your own research.

Help me be more useful! Please leave a 👍 if this is helpful and 👎 if it is irrelevant.

To continue the conversation, mention @dosu.

from incubator-devlake.

chrisolido avatar chrisolido commented on July 24, 2024

image
it working now it just take time to migrate .

from incubator-devlake.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.