aspose file tools*
The moose likes Ant, Maven and Other Build Tools and the fly likes Hudson and ssh problem someone can help me? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Bookmark "Hudson and ssh problem someone can help me?" Watch "Hudson and ssh problem someone can help me?" New topic
Author

Hudson and ssh problem someone can help me?

yu xiaohang
Greenhorn

Joined: Sep 15, 2011
Posts: 5
hello everybody

i am confused by this problem for few days:

I installed SSH plugin and SCP plugin on hudson-ci system, so in the config page i can find config section then i enable ssh function:

======================
just like picture in attachement
======================

but my ssh script can not run on the remote server

then give this log:

===========================
Started by user hudson
[SSH] executing pre build script:
cp /usr/local/11/10/earlybird/upld /usr/local/11/10/earlybird/../upld_bk -r -f

[SSH] exit-status: 1
[SSH] executing post build script:

[DEBUG] Skipping watched dependency update; build not configured with trigger: ssh test #4
Finished: SUCCESS
===========================

i dont know why i want my script executed during build,please help me


[Thumbnail for ssh.png]

Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5836
    
    7

If you run the pre build script command manually using ssh on the build slave, while logged in as the same user as Hudson is, then what happens?


JBoss In Action
yu xiaohang
Greenhorn

Joined: Sep 15, 2011
Posts: 5
Peter Johnson wrote:If you run the pre build script command manually using ssh on the build slave, while logged in as the same user as Hudson is, then what happens?


i can run these cmd in my secureCRT client but not in hudson ssh plugin

yesterday i tried another command "ls >>txt" it can be executed,give messages below:

=======================
Started by user hudson
[SSH] executing pre build script:
cd /usr
ls >> /usr/txt

[SSH] exit-status: 0
[SSH] executing post build script:

[DEBUG] Skipping watched dependency update; build not configured with trigger: ssh test #9
Finished: SUCCESS
=======================

Strangly, i checked this "txt" file in /usr/, it was named "txt?" not "txt", i am confused again


[Thumbnail for txt.png]

Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5836
    
    7

It would appear that your script commands are terminated with a CR-FL char combination. Linux uses only LF, and the Cr shows up as a "?" at the end of the line. This might be a problem with the ssh plugin you are using for Hudson.

I am guessing that Hudson is running on a Windows box. If so, Therefore you might be better off running a bat file from Hudson and placing the ssh commands into the bat file.

Or are you using a browser on Windows? It would help if you described your setup.
yu xiaohang
Greenhorn

Joined: Sep 15, 2011
Posts: 5
Peter Johnson wrote:It would appear that your script commands are terminated with a CR-FL char combination. Linux uses only LF, and the Cr shows up as a "?" at the end of the line. This might be a problem with the ssh plugin you are using for Hudson.

I am guessing that Hudson is running on a Windows box. If so, Therefore you might be better off running a bat file from Hudson and placing the ssh commands into the bat file.

Or are you using a browser on Windows? It would help if you described your setup.


thank you peter ,Hudson deployed on linux but still can't find problem ,now i write scripts in my build.xml it can be executed by ant
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Hudson and ssh problem someone can help me?