Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windows Server for remote batch run #64

Open
etatara opened this issue Oct 23, 2021 · 0 comments
Open

Windows Server for remote batch run #64

etatara opened this issue Oct 23, 2021 · 0 comments
Assignees

Comments

@etatara
Copy link
Member

etatara commented Oct 23, 2021

The remote batch ssh is not compatible with Windows-based servers. A work in progress solution is on a separate development branch "windows_remote_ssh". There are a number of issues:

  1. The command to cd and unzip and run the model are not formatted correctly. Linux uses the ';' char to separate commands, and windows uses either the '&' or '&&' command. The double ampersand is a conditional command separator that will only execute the second commands if the previous is successful. This has been corrected in the repo.

  2. The command to check if the java task is running on the remote server is different in Windows. This has been corrected in the repo. However, the current code only checks if java.exe is running on the server. This is brittle since other unrelated java processes could be running. The Windows command can also return the process ID which should be used instead.

  3. Running background jobs in Windows is not natively supported like the nohup process in linux. It's possible to use the Windows powershell Start-Process to start a background process, however it will terminate when the ssh session disconnects. This is a fundamental limitation of Windows - processes that are started in a login session will terminate when a user disconnects. Furthermore, using powershell assumes that the remote user has elevated privileges on the host, which may be unreasonable, so the powershell approach may not be the best option. Starting a model remotely via ssh does work, it's just that we cannot disconnect the session. The current Repast RemoteSession workflow starts a background process of the model, disconnects the session, and then regularly polls the host to see if the model is finished. If we want this to work on a Windows server, the ssh session that starts the model will need to remain connected until the model completes. This raises a few questions:

    • Why is the remote ssh session disconnected in the first place instead of just waiting for the model to complete? Is there a timeout issue?

    • Can we start the remote session in a separate java thread and let it stay connected, and then use the main thread to start the model completion polling ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant