@lucaferrarihotmail I’m not sure how that would work in general, GoCD or not. Not saying it isn’t possible, just not straightforward or obvious.
How would a single OS process that crashes in midway be picked up by another process in another host from where it left off? There would have to be some state saved, synchronously, and that would have to be to the new host after recovering from the initial crash. Right?
If you are talking about picking up jobs that didn’t finish in a stage, the GoCD already does this; it doesn’t need to reexecute jobs that have already completed within a stage if the stage fails midway, and can run the jobs that were unfinished or pending.
However, at the task level, this is not possible to continue unfinished tasks on another agent after the original one dies.
You cannot use an IP address? But the error indicates a resolution problem.
Anyhow, what do you mean by proxy? Reverse http proxy, forward proxy, or something like SOCKS proxy?
If your DNS is happening over proxy, you might check there first since you got a resolution error.
@lucaferrarihotmail sorry, I don’t know how that would work.
GoCD does not have native support for such a thing, as I imagine no other software would either. This sounds like some custom functionality specific to your application. Sorry about that, nothing we can do here to that specific solution.
Feel free to elaborate on some specifics of your problem to see if there are alternative approaches to solve your problem, other than what you hypothesized.
Hi R.Rajalakshmi it would be more helpful to pose a specific question rather than just say that you need help.
Try to be as specific as possible:
Hello! Can a task stop the pipeline without being shown as failed? My use case is a pipeline which deploys on a special staging server whenever there are new commits in the main branch. The pipeline is placed behind our testing pipeline so that it is triggered only when all the tests where successful. This is the task that checks for the main branch:
source ./app_env_vars
if [[ "$APP_CURRENT_BRANCH" == "main" ]]; then
echo "Yes, it's the main branch!"
exit 0
else
echo "That's not the main branch: $APP_CURRENT_BRANCH"
exit 1
fi
It works but it's distracting that the pipeline is shown as failed when the latest tested commits where not in main.
cruise.h2.db
) with the newly generated one in the prior step (cruise.mv.db
— note the name change)Hi there ... I wanna give gocd a try, but currently I can't manage to get version 21.2.0 docker to see the agent. I am using this 2 docker images: gocd/gocd-server:v21.2.0 and gocd/gocd-agent-debian-10:v21.2.0 on my local environment. I have started the agent docker image like this:
docker run -itd --name gocd-agent -e CI=true -e GO_SERVER_URL=https://$(docker inspect --format='{{(index (index .NetworkSettings.IPAddress))}}' gocd-server):8153/go gocd/gocd-agent-debian-10:v21.2.0
but unfortunately I can't see the agent in the agent view in the gocd ui. Is there a special way to run the agent docker image in order to see it in the gocd ui?
Hi all,
I'm trying to setup an auto registration remote agent on aws but I'm stuck due to the following error:
My current configuration:
<?xml version="1.0" encoding="utf-8"?>
<cruise xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="cruise-config.xsd" schemaVersion="139">
<server agentAutoRegisterKey="195ea125-5d3a-4d33-8cc7-5c0e482cc0e7" webhookSecret="..." serverId="..." tokenGenerationKey="...">
<security>
agent.auto.register.key=195ea125-5d3a-4d33-8cc7-5c0e482cc0e7
agent.auto.register.hostname=agent-01
agent.auto.register.elasticAgent.agentId=7f5e55d20407
agent.auto.register.elasticAgent.pluginId=com.example.aws
With these settings I'm getting the following error:
go-server (/var/log/go-server/go-server.log):
2021-07-21 06:44:21,034 ERROR [qtp993070390-40] AgentRegistrationController:242 - Rejecting request for registration. Error: HttpCode=[422] Message=[Elastic agent registration requires an auto-register agent key to be setup on the server. The agentAutoRegisterKey: [195ea125-5d3a-4d33-8cc7-5c0e482cc0e7] is either not provided or expired. Agent-id: [7f5e55d20407], Plugin-id: [com.example.aws]] UUID=[bbbfd276-ce32-430f-81f5-69dbc3cea571] Hostname=[4255f57b7ca5]ElasticAgentID=[7f5e55d20407] PluginID=[com.example.aws]
go-agent (/var/log/go-agent/go-agent.log):
2021-07-21 06:44:16,390 ERROR [scheduler-2] RemotingClient:166 - Server responded to action `ping` with: status[403 Forbidden], body[]
2021-07-21 06:44:16,393 ERROR [scheduler-2] AgentHTTPClientController:114 - Error occurred when agent tried to ping server:
java.lang.RuntimeException: org.apache.http.client.ClientProtocolException: The server returned status code 403. Possible reasons include:
- This agent has been deleted from the configuration
- This agent is pending approval
- There is possibly a reverse proxy (or load balancer) that has been misconfigured. See https://docs.gocd.org/21.2.0/installation/configure-reverse-proxy.html#agents-and-reverse-proxies for details.
at com.thoughtworks.go.agent.RemotingClient.post(RemotingClient.java:118)
at com.thoughtworks.go.agent.RemotingClient.ping(RemotingClient.java:74)
at com.thoughtworks.go.agent.AgentHTTPClientController.ping(AgentHTTPClientController.java:109)
...
at java.base/java.lang.Thread.run(Unknown Source)
Caused by: org.apache.http.client.ClientProtocolException: The server returned status code 403. Possible reasons include:
- This agent has been deleted from the configuration
- This agent is pending approval
- There is possibly a reverse proxy (or load balancer) that has been misconfigured. See https://docs.gocd.org/21.2.0/installation/configure-reverse-proxy.html#agents-and-reverse-proxies for details.
at com.thoughtworks.go.agent.RemotingClient.validateResponse(RemotingClient.java:141)
at com.thoughtworks.go.agent.RemotingClient.post(RemotingClient.java:114)
... 14 common frames omitted
2021-07-21 06:44:21,043 ERROR [scheduler-1] SslInfrastructureService:173 - Error occurred during agent registration process: Elastic agent registration requires an auto-register agent key to be setup on the server. The agentAutoRegisterKey: [195ea125-5d3a-4d33-8cc7-5c0e482cc0e7] is either not provided or expired. Agent-id: [7f5e55d20407], Plugin-id: [com.example.aws]
Could anyone help me with this issue?
Thanks!
Hi all,
We've been working on setting up multiple agents for pipeline.For allocating jobs to agents as far as the documentation we've gone through.we needt to manually assign the resource to the agents.Is there any way to random assign agents to jobs without doing manually.
Good day! I might have posted this before, but I did not see an answer: I am trying to run gocd in an IPv6 only kubernetes cluster. However the gocd never starts, but errors out with:
Warning FailedPostStartHook 4m22s kubelet Exec lifecycle hook ([/bin/bash /preconfigure_server.sh]) for Container "gocd-server" in Pod "gocd-server-5b8fb6b58f-54qc8_default(799b2a6e-aa1c-4292-b091-4b500a0ab857)" failed - error: command '/bin/bash /preconfigure_server.sh' exited with 137: % Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
curl: (7) Failed to connect to localhost port 8153: Connection refused
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
curl: (7) Failed to connect to localhost port 8153: Connection refused
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
curl: (7) Failed to connect to localhost port 8153: Connection refused
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
curl: (7) Failed to connect to localhost port 8153: Connection refused
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
(lots of repetitions)
@skele10 Correct, however on August 13th GitHub changed what is allowed for logging in and I receive this message now for Materials:
STDERR: remote: Support for password authentication was removed on August 13, 2021. Please use a personal access token instead.
STDERR: remote: Please see https://github.blog/2020-12-15-token-authentication-requirements-for-git-operations/ for more information.
STDERR: fatal: unable to access 'https://github.com/my-repo': The requested URL returned error: 403