-
Notifications
You must be signed in to change notification settings - Fork 73
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
MCX ""MCX ERROR(-2):can not load the specified config file" error #111
Comments
just did a test, it seems to work ok. my server is a Ubuntu 16.04 box with 2x TitanV GPU. The PATH variable is set in ~/.bashrc to point to where mcx executable is located. The host is running Windows 10 with a different GPU (1050Ti). When I chose the plink command and enable Run remote command, and click on the "GPU" button, it initially ask you if you want to store the cache. I typed 'y' in the User input and clicked Send, it hanged for the first time. But after restarting mcxstudio, it was able to retrieve the GPU info on the server correctly. So, it looks like the server ssh key was cached. Then I ran a simulation, it also worked ok, see my screenshot below. |
Looking at the source code regarding the json data after https://github.com/fangq/mcx/blob/master/mcxstudio/mcxgui.pas#L3014-L3016 not sure why it did not get replaced in your case - maybe this is locale related? |
Sorry, I think the escape characters where lost here somewhere between copy and paste and forum formatting.
I do not know much Pascal. Maybe you could explain the program flow. So , if you create a remote job in MCX Studio, first a json file is written? Then the file is parsed to a function and escape characters inserted to send over by ssh? So I think the parser of the json is working as intended. But the --input string is not right concatenated. A single quote is used here. See line 3021, not easy to spot but two single quotes, not a double quote I tested with MS Windows Powershell, MS CMD, MS Terminal and pwlink shell: |
PS: I also do not understand https://github.com/fangq/mcx/blob/master/mcxstudio/mcxgui.pas#L3013 |
also, I am not sure if this difference is a result of windows version differences. The lab server I tested is running on Windows 10 Enterprise, Version 1709. We do not avidly update this machine because we want to keep it stable. what is your windows version? |
@fangq Your screenshot has some sensitive information, please check |
@fangq Working command line for Windows 10 and 7 and local execution in a cmd shell
Notice: No single quote ' for the --input parameter, every double quote " trailing with backslash. The mcx.exe windows built is expecting the \" Using pwlink the above command can be entered in an interactive Windows 10 shell. If the pwlink command is given in a one-liner, also the backslash and double quote must be escaped separately. So every \ is changed for \\ and " for \" This is working for me plink starts a cmd shell on the remote maschine and passes the arguments of the command, removing the leading backslash. This also work from a Win7 cmd shell with an English windows version, so I am pretty sure it is not related with the region setting of the client. On the remote Windows 10 PC I used process explorer to log what command line parameters are really passed to the executable. You find it in the screenshot PS1: If there is a local job the batch file uses the local .json file with --input file.json without any issue ` |
oops. the screenshot is deleted and password changed, thanks. did not check carefully.
ok, I see the problem. You are using a Windows server. I admit that I have never tried that. All my tests so far have been using a Linux server to run the remote commands. I think the handling of the quotation mark escape will be differ by your ssh server (and its default shell). On my windows machine, I have an ssh server installed via OpenSSH-Win64 https://github.com/PowerShell/Win32-OpenSSH/releases when running the below command from a Linux terminal, I have
if I use the escape string printed from mcxstudio, I can get the correct json string, which behave similarly to a linux server
can you try this on your win64-ssh server and see what you get? my suspicion is that your windows ssh server does not use bash as the default shell, but PS or cmd, which can not parse "" properly https://stackoverflow.com/questions/7760545/escape-double-quotes-in-parameter I think the escape format I used is related to this SO thread |
@fangq In a default installation it uses the cmd shell, to change it needs manual adjustments You manually installed OpenSSH, what is your version with As there is Git for Windows installed on the remote machineI tried with the ported git bash. In a powershell a Registry value is added to point to the bash Now, plink opens via openSSH a bash shell, and bash calls mcx. But with this configuration there is even more filtering, now also single quotes are filtered and more double quotes. From MCXStudio, on the Windows 10 remote server the actual commandline parameters are $ echo "'{ ""Session"":1 }'" and from the client in a cmd shell { Session:1 }` and from the client in a git bash shell { Session:1 } |
After setting up a pwlink connection to a remote ssh server, which is running MCX Studio under Windows 10 2004 x64, a test job will terminate with the following error
Input to reproduce, the quicktest job:
The problem seems to be a false parsing in the input section, using the same command in a local shell leads to the same error. If the "' is replaced with """ the job is run without error from a shell
The text was updated successfully, but these errors were encountered: