Inedo Community Forums Forums
    • Recent
    • Tags
    • Popular
    • Login

    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

    Scheduled Pinned Locked Moved Support
    javabuildmaster
    5 Posts 1 Posters 53 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • ? This user is from outside of this forum
      Guest
      last edited by

      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 directory

      I 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

      1 Reply Last reply Reply Quote 0
      • ? This user is from outside of this forum
        Guest
        last edited by

        The path: /opt/glassfish3/glassfish/glassfish/bin strikes me as a bit odd, is there supposed to be 3 nested glassfish directories like that?

        1 Reply Last reply Reply Quote 0
        • ? This user is from outside of this forum
          Guest
          last edited by

          Hi

          The GlassFish on the Linux machine has 3 nested 'glassfish' directories.

          It works when:

          1. deploy from local Windows to S2
          2. from S1 to S2.

          Both are using the same location for GlassFish.

          Thanks

          1 Reply Last reply Reply Quote 0
          • ? This user is from outside of this forum
            Guest
            last edited by

            In addendum to the previous post:

            1. S1 to S2 - uses the same location for GlassFish on S1 to run asadmin command in the ant task.
            1 Reply Last reply Reply Quote 0
            • ? This user is from outside of this forum
              Guest
              last edited by

              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?

              1 Reply Last reply Reply Quote 0

              Hello! It looks like you're interested in this conversation, but you don't have an account yet.

              Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

              With your input, this post could be even better 💗

              Register Login
              • 1 / 1
              • First post
                Last post
              Inedo Website Home • Support Home • Code of Conduct • Forums Guide • Documentation