Author Topic: remote execution of QuantumATK scripts for Windows  (Read 325 times)

0 Members and 1 Guest are viewing this topic.

Offline lomarcus

  • New ATK user
  • *
  • Posts: 1
  • Country: hk
  • Reputation: 0
    • View Profile
Hi everyone,

I am recently trying to setup remote execution of QuantumATK scripts within two Windows computers. However, I've faced some problems while setting up the remote machine. It says that a bash shell binary does not exit on the server in the Diagnostics in Machine Settings. Although I tried to install bash from Windows Subsystem for Linux package and Ubuntu on my server computer,  it stills doesn't work.

Could anyone teaches me more about this, or suggested me any other method to get thru this problem?

Thanks in advance for any help.

-----------------------------------------------------------------------------------------
After some investigation, I found that it is the problem of Default shell of OpenSSH.
  • Using powershell.exe as default, I will just get stuck with the error of bash shell binary doesn't exit on the server in the Diagnostics in Machine Settings with the sshd logs:

    3060 2021-06-15 17:27:41.085 debug2: fd 9 setting O_NONBLOCK
    3060 2021-06-15 17:27:41.085 debug2: fd 10 setting O_NONBLOCK
    3060 2021-06-15 17:27:41.085 debug2: fd 11 setting O_NONBLOCK
    3060 2021-06-15 17:27:41.085 debug2: fd 12 setting O_NONBLOCK
    3060 2021-06-15 17:27:41.085 debug2: fd 13 setting O_NONBLOCK
    3060 2021-06-15 17:27:41.085 debug2: fd 14 setting O_NONBLOCK
    3060 2021-06-15 17:27:41.085 debug3: shell: "c:\\windows\\system32\\windowspowershell\\v1.0\\powershell.exe"
    3060 2021-06-15 17:27:41.085 debug3: shell_option: -c
    3060 2021-06-15 17:27:41.085 debug3: exec_command: sftp-server.exe
    3060 2021-06-15 17:27:41.085 debug3: arg escape option: TRUE
    3060 2021-06-15 17:27:41.085 debug3: spawn_argv[0]: "c:\\windows\\system32\\windowspowershell\\v1.0\\powershell.exe"
    3060 2021-06-15 17:27:41.085 debug3: spawning "c:\\windows\\system32\\windowspowershell\\v1.0\\powershell.exe" -c sftp-server.exe
    3060 2021-06-15 17:27:41.085 debug2: fd 4 setting TCP_NODELAY
    3060 2021-06-15 17:27:41.085 debug3: fd 11 is O_NONBLOCK
    3060 2021-06-15 17:27:41.085 debug3: fd 10 is O_NONBLOCK
    3060 2021-06-15 17:27:41.085 debug3: fd 13 is O_NONBLOCK
    3060 2021-06-15 17:27:41.085 debug3: send packet: type 99
    3060 2021-06-15 17:27:43.428 debug3: receive packet: type 96

     
  • Using bash.exe as default, I would be able to have all checks in the Diagnostics but get stuck at the Copying file phase. The reason is bash.exe isn't working with sftp-server.exe properly. Here attached with the sshd logs:

    19172 2021-06-15 17:30:04.303 debug2: fd 9 setting O_NONBLOCK
    19172 2021-06-15 17:30:04.303 debug2: fd 10 setting O_NONBLOCK
    19172 2021-06-15 17:30:04.303 debug2: fd 11 setting O_NONBLOCK
    19172 2021-06-15 17:30:04.303 debug2: fd 12 setting O_NONBLOCK
    19172 2021-06-15 17:30:04.303 debug2: fd 13 setting O_NONBLOCK
    19172 2021-06-15 17:30:04.303 debug2: fd 14 setting O_NONBLOCK
    19172 2021-06-15 17:30:04.303 debug3: shell: "c:\\windows\\system32\\bash.exe"
    19172 2021-06-15 17:30:04.303 debug3: shell_option: -c
    19172 2021-06-15 17:30:04.303 debug3: exec_command: sftp-server.exe
    19172 2021-06-15 17:30:04.303 debug3: arg escape option: TRUE
    19172 2021-06-15 17:30:04.303 debug3: spawn_argv[0]: "c:\\windows\\system32\\bash.exe"
    19172 2021-06-15 17:30:04.303 debug3: spawning "c:\\windows\\system32\\bash.exe" -c sftp-server.exe
    19172 2021-06-15 17:30:04.303 debug2: fd 4 setting TCP_NODELAY
    19172 2021-06-15 17:30:04.303 debug3: fd 11 is O_NONBLOCK
    19172 2021-06-15 17:30:04.303 debug3: fd 10 is O_NONBLOCK
    19172 2021-06-15 17:30:04.303 debug3: fd 13 is O_NONBLOCK
    19172 2021-06-15 17:30:04.303 debug3: send packet: type 99
    19172 2021-06-15 17:30:08.460 debug3: receive packet: type 1
« Last Edit: June 15, 2021, 11:45 by lomarcus »

Offline Anders Blom

  • QuantumATK Staff
  • Supreme ATK Wizard
  • *****
  • Posts: 5012
  • Country: dk
  • Reputation: 85
    • View Profile
    • QuantumATK at Synopsys
Re: remote execution of QuantumATK scripts for Windows
« Reply #1 on: August 31, 2021, 21:37 »
I have never tried this on Windows. I think you have the right idea to use the OpenSSH client/server in Windows 10, and the yes, we require bash as the shell (perhaps not mentioned in the manual).

I would have thought OpenSSH handles file copy requests via "scp" protocol but maybe it needs sftp-server started as a service for that to work? I have some trouble installing OpenSSH on my machine, but once I do I can test a few things.

Offline Anders Blom

  • QuantumATK Staff
  • Supreme ATK Wizard
  • *****
  • Posts: 5012
  • Country: dk
  • Reputation: 85
    • View Profile
    • QuantumATK at Synopsys
Re: remote execution of QuantumATK scripts for Windows
« Reply #2 on: September 21, 2021, 07:39 »
Maybe the error is more related to the directories into which the files are copied? There is no direct error message in what you showed indicating the sftp-server is not working, but maybe the default directory where the copy operation goes to is not the "home" directory that the machine manager references...? I'm mostly guessing though, I am not able to install a full Linux subsystem for testing.

Are there further messages in the log file that could help or is that the end of it?

Are you able to copy any files from the machine to itself, using "scp" from the Powershell bash command line?