not getting working dir of go-agent

2,549 views
Skip to first unread message

Nida Fatma

unread,
Mar 25, 2014, 11:32:20 AM3/25/14
to go...@googlegroups.com
the material is find in /var/lib/go-agent/pipelines/my-pipeline/trunk and trunk has all the data of app.when m executing the command from the trunk.the command is working fine.but when i execute app from go server.it is not recognizing the command.error is please make sure that following command can be execute in particular agent.and debugging is showing the different path value from path value in dir trunk.i m not getting from where this particular command is running.I wanted to know the go-agent working dir.

Sharanya Bathey

unread,
Mar 26, 2014, 12:06:24 AM3/26/14
to Nida Fatma, go...@googlegroups.com
Hi Nida,

All the tasks executed by an Agent are run as the 'go' user. This is the user that the Go Agent runs as. 

Could you try the following:
1. cd /var/lib/go-agent/pipelines/my-pipeline/trunk
2. sudo su - go
3. execute the command and check if it works, if the command is available in the path of the 'go' user it should execute successfully.

You have to ensure that whatever command you are trying to execute is available in the path of the 'go' user on the agent. The file through which you can make this configuration is /etc/default/go-agent, you can edit it to add the command to the 'go' user path. Please make sure not to change the permissions/ownership of this file.

Regards,
Sharanya




On Tue, Mar 25, 2014 at 9:02 PM, Nida Fatma <nida...@gmail.com> wrote:
the material is find in /var/lib/go-agent/pipelines/my-pipeline/trunk and trunk has all the data of app.when m executing the command from the trunk.the command is working fine.but when i execute app from go server.it is not recognizing the command.error is please make sure that following command can be execute in particular agent.and debugging is showing the different path value from path value in dir trunk.i m not getting from where this particular command is running.I wanted to know the go-agent working dir.

--
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 go-cd+un...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Nida Fatma

unread,
Mar 26, 2014, 1:12:01 AM3/26/14
to go...@googlegroups.com
Hey thnx,

I have already figured it out.Exactly that was the issue.

Nida Fatma

unread,
Mar 26, 2014, 7:13:32 AM3/26/14
to go...@googlegroups.com, Nida Fatma
Hey,

I m not getting how to run "bundle exec rails server" via agent which should be the command part and which shud be the argumnet.if i give whole as command it didnt recognize it.

srinivas upadhya

unread,
Mar 26, 2014, 7:17:45 AM3/26/14
to Nida Fatma, go...@googlegroups.com
Hi Nida,

the command is just bundle 
& arguments
exec
rails
server



On Wed, Mar 26, 2014 at 4:43 PM, Nida Fatma <nida...@gmail.com> wrote:
Hey,

I m not getting how to run "bundle exec rails server" via agent which should be the command part and which shud be the argumnet.if i give whole as command it didnt recognize it.

--

Nida Fatma

unread,
Mar 26, 2014, 7:22:22 AM3/26/14
to go...@googlegroups.com, Nida Fatma
so there will be three arguments?

srinivas upadhya

unread,
Mar 26, 2014, 7:27:15 AM3/26/14
to Nida Fatma, go...@googlegroups.com
Yes.

if you are trying to do something like curl -T d:\test.txt ftp://user:password@url -k --ftp-ssl
you can use something like this (if curl is not in path then you can give complete path to it:

<exec command="C:\Program Files\cURL\bin\curl">
  <arg>-T</arg>
  <arg>d:\test.txt</arg>
  <arg>ftp://user:password@url</arg>
  <arg>-k</arg>
  <arg>--ftp-ssl</arg>
  <runif status="passed" />
</exec>

OR, if using the UI:
Inline image 1




On Wed, Mar 26, 2014 at 4:52 PM, Nida Fatma <nida...@gmail.com> wrote:
so there will be three arguments?

--

Nida Fatma

unread,
Apr 7, 2014, 4:07:08 PM4/7/14
to go...@googlegroups.com, Nida Fatma
Hey,

go-agent is facing some cookie issue?it was working fine before and why this error happened ,I have no idea.Can somebody help in
this?.I think this is because of duplicate agent values but no idea how to get rid of it.

ERROR  :: AgentWithDuplicateUUIDException: Agent [Agent [ip-172-31-27-240, 172.31.27.240, 5aadf36c-d4e3-41ca-8793-bf50c2b6b3e7, 17a5e2ae-79d2-461a-980e-66798e8dfdd8]] has invalid cookie

and the second problem is m not getting the right value for path environment variable.For go agent PATH value is different from the path when build runs.
I have no idea about from where this PATH is overwriting.This Path value is also overrites the path value which i have set in environment of go-server.thnx in advance.

 
.

Sharanya Bathey

unread,
Apr 8, 2014, 4:28:25 AM4/8/14
to Nida Fatma, go...@googlegroups.com
Hi Nida,

The Go Server uniquely identifies the Go Agents through the UUID. The Go Server registers the agents using these UUID and assigns them cookies based on this UUID for further communication. The AgentWithDuplicateUUIDException comes up, when you have two agents running that have the same uuid.

Did you copy an existing/running go agent and bring up another instance using it? If so, you can do the following:
1. Go to one of these two agents
2. Go to the /var/lib/go-agent folder 
3. Delete the whole config folder

Whenever you copy over an existing agent to create more agents, please be sure to delete the whole config folder in the copied over one. The next time you bring up this copied agent, it will have a different UUID and a different cookie. 

Could you please explain a bit more about what exactly that your trying to do around environment variables?

Regards,
Sharanya







--
Message has been deleted

Nida Fatma

unread,
Apr 8, 2014, 4:50:41 AM4/8/14
to go...@googlegroups.com, Nida Fatma
Hey,

1.I dont want to run 2 agents on 1 machine. I think that has done by mistake.
2.Now i remove config from agent and i can see 2 agents on server console.
3.But on agent mahine i  can see only one machine and build is not running on that.
4.now what i need to do to clean all this mess up.i just want only 1 working agent.

Sharanya Bathey

unread,
Apr 8, 2014, 5:06:10 AM4/8/14
to Nida Fatma, go...@googlegroups.com
Hi Nida,

You can find out how many, and where the respective agents are from the "Agents" tab on go server UI. 

On the agents tab, the sandbox location/column will give you the place where an agent stores most of its files.  Please refer to this documentation for more details - http://www.thoughtworks.com/products/docs/go/current/help/managing_a_build_cloud.html

Deleting an agent from config xml directly will not delete the agent, agent will still continue to ping the server. You need to first disable the agent and then delete it. You can do this from the "Agents" tab or via the API or the config xml file.

Hope that helps. 

Regards,
Sharanya



Nida Fatma

unread,
Apr 8, 2014, 5:20:30 AM4/8/14
to go...@googlegroups.com, Nida Fatma
Hey

I have already deleted from sever console.actually the thing is when i  stop and then restart the agent then i got a second agent on server.and getting cookies conflict error.I just want 1 working agent.How can i remove all this bull shit and can get a fresh new agent.

Sharanya Bathey

unread,
Apr 8, 2014, 5:53:04 AM4/8/14
to Nida Fatma, go...@googlegroups.com
I'm not sure what you mean by server console.

But, here are the steps to delete agents -

1. Go to the "Agents" tab on the go server.

Inline image 2

2. Look at the sandbox directory to determine where the agent is installed - In the screenshot above, that location would be "/Users/sbathey/Desktop/go-agent-14.1.0" for me.

3. Go to this location (for me this location is "/Users/sbathey/Desktop/go-agent-14.1.0") on the box where the agent is installed.
4. Stop the agent
5. Delete the config folder.

6. Go back to the "Agents" tab.
7. Select the agent that you just stopped, disable it.
8. Select the agent that you just disabled, delete it.

Regards,
Sharanya



On Tue, Apr 8, 2014 at 2:50 PM, Nida Fatma <nida...@gmail.com> wrote:
Hey

I have already deleted from sever console.actually the thing is when i  stop and then restart the agent then i got a second agent on server.and getting cookies conflict error.I just want 1 working agent.How can i remove all this bull shit and can get a fresh new agent.

--

Nida Fatma

unread,
Apr 8, 2014, 6:00:13 AM4/8/14
to go...@googlegroups.com, Nida Fatma
Hey

i have already did this but now i m not able to even trigger the build and getting the following error.

Failed to trigger stage [defaultStage] pipeline [Lb_web] [Apr-08 09:58:18]
Could not find matching agents to run job [defaultJob] of stage [defaultStage].


Nida Fatma

unread,
Apr 8, 2014, 6:31:28 AM4/8/14
to go...@googlegroups.com
Build is not running on agent.and m also not getting any error now.So , How to debug it?
--
Thanks & Regards
Nida Fatma

Sharanya Bathey

unread,
Apr 8, 2014, 7:02:50 AM4/8/14
to Nida Fatma, go...@googlegroups.com
This error means that there are no agents on which the jobs can run.

Have you added any new agents after deleting the previous ones? If yes, you need to go to the agents tab and enable them for them to run. If no, then please add some agents, enable them and try again.

You can refer to the docs at http://www.thoughtworks.com/products/docs/go/current/help/ to get more details about Go, its concepts, its feature and usage. 

Regards,
Sharanya




--
Reply all
Reply to author
Forward
0 new messages