Giter Club home page Giter Club logo

Comments (8)

feliksik avatar feliksik commented on May 13, 2024

I tries reverse engineering a little bit, but didn't work it out immediately.

Be aware of the following: The url that is generated by the server UI and should be executed on agent host, in order to start agent, seems te be based on the host/ip used by the browser. The agents will then try to contact the server on same socket.

This is not necessarily the way people want to use rancher. I envision accessing the server through a public IP, and having the agents behind a firewall, contacting the server on an internal network.

from rancher.

feliksik avatar feliksik commented on May 13, 2024

A note on incorrect IP detection (related to #110 and #112): Also note that in my case, chrome is contacting http://172.17.42.1/?token=.... when I try to execute a shell in a container. 172.17.42.1 is actually the IP of the docker0 interface on the host machine, which is probably never what you want to use as the external IP address.
With other hosts it does correctly detect the ip.

from rancher.

deniseschannon avatar deniseschannon commented on May 13, 2024

@feliksik I'm going to close this issue as we've documented how to override the IP in our FAQs. https://github.com/rancherio/rancher/wiki/FAQs-about-Rancher/

As for your comments, I have created a separate issue for the idea of a public IP on the server and agents behind the firewall.

from rancher.

roynasser avatar roynasser commented on May 13, 2024

If I'm not mistaken there is an error in the FAQ. The -e CATTLE_AGENT_IP=x.x.x.x must be added previously on the docker command, and not at the end as is described in the FAQ... at least for me it didnt work... maybe it works for others? (using coreos alpha here so dont know if its something new in docker).

Anyways, there was a digitalocean article that had an example of putting the -e argument before the volume arguments, and that did the trick... just a headsup...

Trying exactly as in the FAQ it was giving me: "Unable to find image '–e:latest' locally" as if it was looking for the image instead of using that as a last parameter...

from rancher.

deniseschannon avatar deniseschannon commented on May 13, 2024

@RVN-BR It says that it must be added to the docker command. In the example in the FAQ, you can see the location of where the option is added.

Here is the example in the docs:

sudo docker run -d --privileged -v /var/run/docker.sock:/var/run/docker.sock –e CATTLE_AGENT_IP=x.x.x.x rancher/agent:v0.5.2 http://MANAGEMENT_IP:8080/v1/scripts/SECURITY_TOKEN

At the time of writing, it was assumed that most users would know to add the options before the image name (i.e. rancher/agent).

But I am now updating to clarify that it must be listed with the other options.

from rancher.

roynasser avatar roynasser commented on May 13, 2024

I have used env and other arguments before...the issue here is that the -e could not be the last argument BEFORE the image name. It just ignored the image name taking "-e" as an image name..... Flipping the -e arg (along with the var name and value) to before the -v argument worked.... So evwn for people who did know how to use it there was some inconsistency in the example (perhaps some versions of docker are picky abt argument orders)...who knows

from rancher.

deniseschannon avatar deniseschannon commented on May 13, 2024

Thanks for the note. I've updated all places in the documentation so that all examples show the -e before the -v.

from rancher.

ferhimedamine avatar ferhimedamine commented on May 13, 2024

@deniseschannon is there a way apply the fix from the UI .. as i am using the machine driver to provision my hosts on aws.

from rancher.

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.