-
Notifications
You must be signed in to change notification settings - Fork 2k
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
File in use error when validating job on windows #1714
Comments
I think it's the same problem as in #1690 |
Going to close this as it has been quite a while and the same fix @mwieczorek references should fix this too. Feel free to reopen if you are still affected by this. Thank, |
Sorry it took so long but I have never setup a go environment. I have everything setup used I type I have tried locating the example.nomad file in various directories that I know I have write permission to. This does work if I run from an elevated command prompt. |
@wstaples I am assuming same error for |
@mwieczorek Any ideas as to the cause? |
@wstaples What version of Windows? |
Windows 7 64-bit. Yes I receive the same error running |
@dadgar Looks like nomad cannot create symlink
Quick search and I found this: @wstaples Can you try that solution? |
Hi, where can I get windows 64bit binary 0.5RC2 ? Regards. Qba. |
Thx. Dziękuję. |
Unfortunately this did not work. This may work for a windows limited user account but it will not work for users in the 'administrator' group. As you can see here: http://superuser.com/a/376141. I tried adding my user to the list anyway and restarted but no luck. Using |
@wstaples maybe it's something related to win7. if I find time I'll try to build box (https://github.com/joefitzgerald/packer-windows/blob/master/windows_7.json) and test it. |
I confirm is a general condition on using symlink on Windows. I have the same problem with Windows 10, and the worse part is that you cannot get this privilege if you're using Home Edition, where the only thing you can do is to always run with Elevated privileges. Given that only nomad can accept job written in HCL, it will be a big change to my workflow if I need to transform all my templates to JSON and only used the http api for submitting. Could we get nomad accept a "copy" option to pass to go-getter or, even better, have go-getter handle this more gracefully by default? Right now, that's my only roadbloack to use all the wonderful stuff of 0.5. |
Small workaround I think about, is to use 'nomad run - < file.nomad', but yes, that's only prove that I don't need extra privilege to run the job, only to create the symlink. |
closing this in favor of #3491 |
I'm going to lock this issue because it has been closed for 120 days ⏳. This helps our maintainers find and focus on the active issues. |
If you have a question, prepend your issue with
[question]
or preferably use the nomad mailing list.If filing a bug please include the following:
Nomad version
Nomad v0.4.1
Operating system and Environment details
Windows 7 64-bit
Issue
When validating a job file with
nomad validate <job_file>
I receive the errorError getting job struct: Error getting jobfile from "example.nomad": remove C:\Users\user\AppData\Local\Temp\jobfile382992987: The process cannot access the file because it is being used by another process.
This works with Nomad 0.4.0
Reproduction steps
1
nomad init
2
nomad validate example.nomad
Nomad Server logs (if appropriate)
I'm not running this as a client or server. Just using it to validate job files
The text was updated successfully, but these errors were encountered: