GithubHelp home page GithubHelp logo

Comments (5)

Pheggas avatar Pheggas commented on August 23, 2024 1

Another update, i tried to run it as docker compose file in your README. I found out portainer has issue with specifying exact file. When i defined only folder, not that configuration file, the container stared. But Web UI wasn't avalible. I headed into logs and saw open /etc/easy-gate/easy-gate.json: no such file or directory.

This way i wanted to docker exec into that container and add the provided config file provided in this repo. I wasn't able to do so because container keep restarting (till the death i think). Any ideas how could i import config file inside container while it's restarting or it's stopped?

EDIT:
Heureka! I got it working by creating easy-gate.json inside my filesystem, populating it with the provided contents via Nano and copying it to stopped container via docker cp ./easy-gate.json Easy-Gate:/etc/easy-gate/ where the first argument is my local path, and second is container_name:/path/to/json

I recommend to generate config file with docker container creation so there wouldn't be issues with this.

from easy-gate.

r7wx avatar r7wx commented on August 23, 2024

Hello, could you provide the following info?

  • Easy Gate version.
  • Easy Gate configuration file.

If the 400 error comes from Easy Gate itself there is only one reason for this:

reqIP, _, err := net.SplitHostPort(req.RemoteAddr)
if cfg.BehindProxy {
    reqIP = req.Header.Get("X-Forwarded-For")
    if reqIP == "" {
	http.Error(w, "", http.StatusBadRequest)
	return
   }
}

So probably you have configured Easy Gate to run behind an already configured reverse proxy, but you are not providing the "X-Forwarded-For" header correctly. If you are using nginx you can find an example configuration in examples folder or in the main Readme:

[...]
location / {
  proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  proxy_pass http://easy-gate:8080;
}
[...]

from easy-gate.

Pheggas avatar Pheggas commented on August 23, 2024

Version of EasyGate is latest (1.1.1) and configuration file wasn't even created. But I probably caught the issue already. On host part, i defined only the folder, not the config file so that could be the issue. I will test it when I get home.

In any case I will keep you updated.

from easy-gate.

Pheggas avatar Pheggas commented on August 23, 2024

I just tried what i thought would be the fix but unfortunately, still the same error code 400. And it's not shown by EasyGate but by portainer.

PS: I don't have any proxy set up yet.

from easy-gate.

r7wx avatar r7wx commented on August 23, 2024

Glad you solved the issue, but you should use volumes in order to edit configuration file easily.

from easy-gate.

Related Issues (16)

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.