glassfish
  1. glassfish
  2. GLASSFISH-17925

Remote Script on Windows is given Garbage Name if run from UNIX

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 3.1.2_b13, 4.0
    • Fix Version/s: None
    • Component/s: distributed management
    • Labels:
      None

      Description

      1. I ran install-node-dcom from a UNIX machine to a Windows machine
      2. It said that it failed.

      I attached a debugger and saw that it actually worked perfectly! It's just that no output was returned from running the remote script.
      This is the first time I tried it from UNIX instead of Windows so maybe it is a problem on UNIX?
      At any rate the code below is too stringent. In this case the unpacking went fine.

      Recommend:
      Change the test to look for a particular file that got unpacked instead of looking at the output.

      String out = scripter.run(unpackScript);

      if (out == null || out.length() < 50)
      throw new CommandException(Strings.get("dcom.error.unpacking", unpackScript, out));

      logger.fine("Output from Windows Unpacker:\n" + out);
      }

        Activity

        Hide
        Byron Nevins added a comment -

        The code is in:

        InstallNodeDcomCommand.unpackOnHosts()

        Show
        Byron Nevins added a comment - The code is in: InstallNodeDcomCommand.unpackOnHosts()
        Hide
        Byron Nevins added a comment -

        Actual Error is this:

        SmartFile.sanitize was used to create a remote path. But SmartFile is designed for creating paths for use on the CURRENT PLATFORM! It got confused with the "C:"

        the result is that the remote script path was set to garbage like this:

        /export/home/bnlocal/c:/gf/unpack.bat

        So the unpack script never ran.

        Show
        Byron Nevins added a comment - Actual Error is this: SmartFile.sanitize was used to create a remote path. But SmartFile is designed for creating paths for use on the CURRENT PLATFORM! It got confused with the "C:" the result is that the remote script path was set to garbage like this: /export/home/bnlocal/c:/gf/unpack.bat So the unpack script never ran.
        Hide
        Byron Nevins added a comment -

        d:\gf\branches\3.1.2\cluster>svn commit d:\gf\trunk\main\nucleus\cluster\cli d:\gf\branches\3.1.2\cluster\cli
        Sending D:\gf\branches\3.1.2\cluster\cli\src\main\java\com\sun\enterprise\admin\cli\cluster\InstallNodeDcomCommand.java
        Sending D:\gf\trunk\main\nucleus\cluster\cli\src\main\java\com\sun\enterprise\admin\cli\cluster\InstallNodeDcomCommand.java
        Transmitting file data ..
        Committed revision 51358.

        I also fixed the "ask for the password twice" issue

        Show
        Byron Nevins added a comment - d:\gf\branches\3.1.2\cluster>svn commit d:\gf\trunk\main\nucleus\cluster\cli d:\gf\branches\3.1.2\cluster\cli Sending D:\gf\branches\3.1.2\cluster\cli\src\main\java\com\sun\enterprise\admin\cli\cluster\InstallNodeDcomCommand.java Sending D:\gf\trunk\main\nucleus\cluster\cli\src\main\java\com\sun\enterprise\admin\cli\cluster\InstallNodeDcomCommand.java Transmitting file data .. Committed revision 51358. I also fixed the "ask for the password twice" issue
        Hide
        Byron Nevins added a comment -

        The earlier comment about UNIX not getting the output from the remote command – is JUST PLAIN WRONG.

        It actually gets the output just fine. The problem is that the path to the script was garbage. It never actually ran the script – thus no output.

        Show
        Byron Nevins added a comment - The earlier comment about UNIX not getting the output from the remote command – is JUST PLAIN WRONG. It actually gets the output just fine. The problem is that the path to the script was garbage. It never actually ran the script – thus no output.

          People

          • Assignee:
            Byron Nevins
            Reporter:
            Byron Nevins
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: