Finally we got solution for this. You want beleave it, but it was just about encoding of the file. We had UTF-8, then we changed to windows default (to be honest, still not sure, which is windows default), and it worked. So everything was setup correctly and only the encoding of the agent-autoregister.properties was wrong. Thank you all for all suggestions and help. :-)
Dne středa 4. listopadu 2020 v 16:30:34 UTC+1 uživatel [email protected] napsal: > Hello, > > The host OS is less relevant than the container OS in this situation. What > OS is your custom container image based on? This information will likely be > necessary to "tunnel" into the container from the host. > > For troubleshooting, I recommend using docker's CLI to access one of your > containers after GoCD spins it up. Since the containers are registering > themselves as Static Agents, you should be able to see the Sandbox > directory listed in the GoCD UI. Based on the information that Ram provided > and what I see in our own Agents, you want to look for > <SandboxDirectory>/config/autoregister.properties. > > My guess is that Ram is correct and this file is either missing or does > not contain the expected information. > > Hope this helps, > Jason > > On Wednesday, 4 November 2020 at 09:25:46 UTC-5 IXI wrote: > >> Yes we do, what you mentioned. Path: >> C:\Go-Agent\config\autoregister.properties (please remember that we are >> doing it on Windows Server 2016 machine) >> >> And just repeating question from my previous answer: Is there a way to >> debug our situation? It seems like a windows container problem. >> >> Dne středa 4. listopadu 2020 v 13:18:33 UTC+1 uživatel [email protected] >> napsal: >> >>> On Wed, Nov 4, 2020 at 8:12 PM IXI <[email protected]> wrote: >>> >>>> Yes we do. Is there a way to debug our situation? It seems like a >>>> windows container problem. >>>> >>> >>> If your containers are coming up and getting registered as static >>> agents, then the agent startup is likely unable to locate >>> autoregister.properties. >>> >>> At which path are you installing the go-agent? >>> You need to create a config sub-directory, and then place the >>> autoregister.properties file there (see >>> https://docs.gocd.org/current/advanced_usage/agent_auto_register.html) >>> >>> "On the remote GoCD Agent machine, create a file named >>> <agent_installation_directory>/config/autoregister.properties. In a native >>> agent installation this file is usually located on >>> /var/lib/go-agent/config/ directory. The config/ folder might not exist, in >>> this case you should create it by yourself." >>> >>> -- Ram >>> >>> >>> >>> >>>> >>>> Dne středa 4. listopadu 2020 v 12:21:00 UTC+1 uživatel Aravind SV >>>> napsal: >>>> >>>>> Hello, >>>>> >>>>> I see. You’re creating your own image. >>>>> >>>>> The docker image provided by GoCD (on DockerHub) does this >>>>> <https://github.com/gocd/docker-gocd-agent-dind/blob/fd70ef0eb4c2ff750ad297b1810b08bd31f11229/docker-entrypoint.sh#L26-L36> >>>>> >>>>> to populate the autoregister.properties file correctly, based on >>>>> environment variables passed in by the plugin when it wants to start an >>>>> elastic agent. Do you do that in your image too? The values passed in >>>>> should be used. That’s how the server / plugin knows that the agent it >>>>> was >>>>> waiting for has come up. >>>>> >>>>> Cheers, >>>>> Aravind >>>>> >>>> -- >>>> You received this message because you are subscribed to the Google >>>> Groups "go-cd" group. >>>> To unsubscribe from this group and stop receiving emails from it, send >>>> an email to [email protected]. >>>> To view this discussion on the web visit >>>> https://groups.google.com/d/msgid/go-cd/b1afe618-8db0-4023-9f12-f6578ddd9c88n%40googlegroups.com >>>> >>>> <https://groups.google.com/d/msgid/go-cd/b1afe618-8db0-4023-9f12-f6578ddd9c88n%40googlegroups.com?utm_medium=email&utm_source=footer> >>>> . >>>> >>> -- You received this message because you are subscribed to the Google Groups "go-cd" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/go-cd/da122b8d-490a-4266-91b3-568faec40f90n%40googlegroups.com.
