rancher-active-proxy: Failed to initialize Metadata client

Hi there. I tried running RAP but when I fire docker-compose up I see this error in the logs:

Failed to initialize Rancher Metadata client: Get http://rancher-metadata/latest/version: dial tcp: lookup rancher-metadata on 127.0.0.11:53 no such host

I think this is due to using rancher-proxy without having a rancher-agent running. My problem is, though, that I want to use a rancher-server and -agent on the same host and I need some best practice on what my initial docker-compose with the rancher-server and RAP should be, so I can reach the rancher-server on my domain, before I create the agent.

Any ideas on how I should tackle this? =/

Thank you a lot for your hard work!

About this issue

  • Original URL
  • State: open
  • Created 7 years ago
  • Comments: 29 (7 by maintainers)

Most upvoted comments

Hello,

To setup rancher-server with RAP : you can start Rancher Server like that : docker run -d -v /home/data/mysql:/var/lib/mysql --restart=unless-stopped -p 8080:8080 --name=rancher-server -l rap.host=rap.foo.bar -l rap.port=8080 -l rap.le_host=rap.foo.bar -l rap.le_email=rap@foo.bar -l io.rancher.container.pull_image=always rancher/server This will start rancher server on port 8080, connect to foo.bar:8080 and add an host ( do not forget to setup the IP if you want to have server and agent on the same host ) and run the command on you host.

Then you can go to ADMIN > SETTING >> Add a Catalog part : https://github.com/adi90x/rancher-active-proxy.git

Then go to CATALOG and add Rancher Active Proxy Stack

And it should start Rancher Active Proxy !

Do not hesitate , if you need some more information.

Yeah, so it looks like you have to create another stack for RAP to be triggered for the rancher-server. Maybe this should be added to the readme for this use-case.

Wow, ok. I tried to start up another stack (Wekan docker) just for shits and giggles. When that one started up RAP fetched the certificate for rancher-server.domain.com and wekan.domain.com. Now everything works.

So now… why does it need for another stack to spin up for RAP to recognize the rancher-server needs a letsencrypt certificate, too?

I’m running this stuff on a VM with 4 Xeon Cores and 16GB ECC RAM on a RAID SSD… Hardware is definitely not the problem.

@adi90x I did just as you say, but it doesn’t work. The rancher-server is on a different subnet than RAP and I don’t see RAP recognizing the rancher-server container in the logs, when I restart it. I can’t access the rancher-server on the rap.host and a certificate isn’t being generated.