Welcome to the Inedo Forums! Check out the Forums Guide for help getting started.
If you are experiencing any issues with the forum software, please visit the Contact Form on our website and let us know!
"Cannot run program 'asadmin' " error shown while deploying to a Linux system
-
Hi,
I used a SSH-Based Agent to connect to a Linux server (S1) for my application.
Then using 'Execute Command Line' option, I connected to S1 and deployed the application to GlassFish server running on another Linux server (S2).
The following error is seen:
deploy:
BUILD FAILED
deployment.xml:152: The following error occurred while executing this line:
api-build.xml:473: Execute failed: java.io.IOException: Cannot run program "asadmin" (in directory "/opt/glassfish3/glassfish/glassfish/bin"): error=2, No such file or directoryI checked on S1 and 'asadmin' command and the folder structure are present.
I am able to ping S2 from S1.
Ran the ant task from S1 and it deployed successfully to S2.I am also able to deploy from my local Windows machine to S2 using BuildMaster.
Am I missing something which I have to add for using SSH Agent?
Thanks
-
The path:
/opt/glassfish3/glassfish/glassfish/bin
strikes me as a bit odd, is there supposed to be 3 nestedglassfish
directories like that?
-
Hi
The GlassFish on the Linux machine has 3 nested 'glassfish' directories.
It works when:
- deploy from local Windows to S2
- from S1 to S2.
Both are using the same location for GlassFish.
Thanks
-
In addendum to the previous post:
- S1 to S2 - uses the same location for GlassFish on S1 to run asadmin command in the ant task.
-
It should work exactly as if you were running the command yourself as the user configured in the SSH agent in the working directory supplied in the Execute Command Line Action. What BuildMaster version are you running? We have just released 4.0.6 as a beta, but it's very close to becoming our official 4.0 release if you're interested in upgrading to it. Could you try to fully qualify the path to "asadmin" in the build script?