-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
the .exe modifies itself at runtime, making itself incompatible after initial run #399
the .exe modifies itself at runtime, making itself incompatible after initial run #399
Comments
I was able to remedy this by declaring:
in a |
Do you have the |
I am suffering this issue on 2.4.0. I was following this this guide. Just started looking at it. Even though I was running the -net4 version (I have .net 4.5 installed), it seems to replace it with a version that installs < .net 4.0 and thus seems to break because it wants to install .net 3.5! I'll let you know if I find a way round it. |
Found the issue. The link above names the .config file .conf, and thus its not read and replace by a binary for .net < 4.0! Then the binary wants to install .net 3.5 when 4.5 is already installed! Also a oddity. I am using version 2.4.0. When I start the service, it renames the binary to .bak and replaces it with a 2.3.0 binary. Seems odd it down graded it? When I say version, I used the |
To be clarified, .NET 4+ versions of WinSW will not request to install .NET 3.5. And WinSW didn't have self-updating functions. Even if something is configured to update it, the latest release version is 2.4.0 on Jenkins releases and 2.6.2 on Github releases. Why did it download the 2.3.0 version? |
You missed the point about the
So that is why the .net < 4.0 binary was downloaded. |
The .NET 4 binary doesn't need the |
This is windows server 2012 r2 with .net 4.5 installed. Its a long story why windows is an old release; lets say its a big platform (lots of servers), a big company, the business revolves around this platform and its not my call to upgrade it (although I have mentioned it in the past). I am not sure why it has .net 4.5 rather than the default (3.5?), other than we need to keep it up to date with security patching, as well as making it compatible with modern software, etc. I think https://github.com/kohsuke/winsw/blob/master/doc/exeConfigFile.md could do with some docs? I had a quick look through and apart from the |
Thanks for taking the time to report this issue. I've found the problem. WinSW self-updating was implemented as a "feature" as a part of JENKINS-19055. The 2.3.0 version is defined here: https://github.com/jenkinsci/jenkins/blob/3ebb9e3592d648bb0408634b8f92ec3b6fb0c54e/core/pom.xml#L796 |
I don't see it in the links you provide. I see the references to updating Also how do you turn the auto update off? |
The auto update is implemented in Windows Agent Installer module. See Disabling Automatic upgrade for how to disable it. |
Holy moly, did not know about those docs. It would have been easier to follow the auto install than doing it manually. Thanks for all the help. |
I tried downgrading to 2.3.0, but the jenkins master still downloads its own version of winsw (2.3.0) and replaces your version (yours will be renamed to .bck). For the benefit of others: If you are running Oracle jdk/jre on your client, and it has java web start (javaws), open a browser to your jenkins master from the client, go to the windows agent node on the gui. Click the Launch button and open or download the .jnlp file.Then open the file with java web start and run it. When the agent is up and running, click on File and then Install as a service. Then open services (run services.msc) and check its running. No need to setup winsw manually! |
IIUC it downloaded the .NET 2 version and replaces the .NET 4 one. The installer module currently determine versions by MD5 checksum of the binary rather than version strings. The installer should be fixed to:
|
Closing as answered in #399 (comment). |
I am able to install, test, and start the service using the 2.5.0 release of WinSW.NET461.exe artifact. However, at runtime, it moves itself to a
.bak
extension and replaces itself with an executable that will no longer start properly. After a stop and then start, I get an incompatibility warning, attached.I assume it's downloaded a more "recent" version of itself, but with the wrong dotnet framework version?
The text was updated successfully, but these errors were encountered: