Comments (8)
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.
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.
@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.
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.
@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.
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.
Thanks for the note. I've updated all places in the documentation so that all examples show the -e before the -v.
from rancher.
@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)
- [BUG] CSI-Snapshotter sidecar container not available as part of vSphere CSI Controller HOT 2
- [BUG] Cluster DNS resolution (pod to pod) not working. HOT 1
- [RFE] Add namespace annotation to skip default network policy
- Rancher-Agent delete ERROR HOT 1
- [v2.8] Sync Feb Patches to dev-v2.8 HOT 2
- [BUG] beta.kubernetes.io/os is deprecated since v1.14; use "kubernetes.io/os" instead
- [BUG] Fluentbit from Rancher Apps jemalloc error on system with kernel page size 64K HOT 2
- [RFE] Allow customizing the StorageClass settings for the Harvester node driver
- [BUG] Creating clusters via RKE2 templates results in Helm releases stuck in `pending-install` state
- [Backport 2.7][BUG] NFS file locks with Kubernetes v1.24.10+ require manual intervention HOT 1
- [v2.7] Sync Feb Patches to dev-v2.7 HOT 2
- [RFE] show pod warning events in the pod or deployment
- [BUG] ASG Max Size set as 0 is breaking Configure Cluster page
- [Documentation] Clarify expected monitoring views based on user roles.
- [BUG] unable to provision custom rke2 cluster - waiting for probes: calico
- Rancher Custom role bug when import yaml from Web UI[BUG]
- [BUG] Manager in Docker with Enterprise proxy error : "x509: certificate signed by unknown authority" in Apps/Charts HOT 1
- [RKE1] Can not set DeleteEmptyDirData to true, even with delete_local_data: true in node_drain_input HOT 1
- `sriov` chart K8s 1.28 support HOT 6
- [v2.9] `sriov` chart K8s 1.28 support
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rancher.