Automatically download the newest daily build

fewyn

Administrator
Staff member
Eh it's not the server itself this time it was Jenkins. There've been some major fixes since the last release pushed to stable on apt so I manually upgraded it instead. Hopefully that will fix it for now.
 

fronobulax

Developer
Staff member
I would suggesting making a cron job to auto restart the server weekly.

There will come a time in your career as a sysadmin when you realize that you are treating the symptom and not the cause and that will offend you enough that you will finally figure out how to fix the underlying problem :)
 

taltamir

Member
In the last 4 days or so the jenkins server has become slow and unreliable. instead of downloading in 2 seconds it takes 2 minutes, and it always drops the download at least once before it finishes (tested more than 20 times per day each day)

when i manually download with firefox i just hit retry and it resumes the download where the server broke it off. after 1 to several retries it manages to go through.

but with this app the moment the server drops the connection it assumes success despite the filesize mismatch and deletes existing files and replaces with the new broken file
when i try to run it again it errors saying the file is invalid, if it is invalid it should delete it and redownload
 

zarqon

Well-known member
When that happens for me, the incomplete file is always about 8 MB, so perhaps a test for filesize > 13 MB would help decide whether to resume or re-download.
 

fewyn

Administrator
Staff member
I found out the keepalivesetting is broken in the current version of Jenkins but should hopefully be fixed with an upcoming weekly build. In the mean time I think I've discovered a workaround let me know if you still run into problems.
 

taltamir

Member
I found out the keepalivesetting is broken in the current version of Jenkins but should hopefully be fixed with an upcoming weekly build. In the mean time I think I've discovered a workaround let me know if you still run into problems.
thank you. I will let you know if I encounter anymore issues

where can I download your updated version with the workaround?
 

fewyn

Administrator
Staff member
thank you. I will let you know if I encounter anymore issues

where can I download your updated version with the workaround?

This was a problem specifically with Jenkins the program that automatically creates builds.
 

TaPol

New member
Hi, Just letting you know the server has packed up it's toys and gone home in a huff... :)
Log below, Cheers

13/07/2020 3:57:45 PM
Checking http://ci.kolmafia.us/ for the latest version of KoLMafia...
An error occurred while downloading data from http://ci.kolmafia.us/
Exception Message: The remote server returned an error: (503) Server Unavailable.
 

fewyn

Administrator
Staff member
Anyone have any issues since the 13th? I'm hoping the current version it's running has been stable enough.
 

fewyn

Administrator
Staff member
Hrm.... I'm forcing SSL currently on the build site.

Code:
11/8/2020 6:03:44 PM
Checking http://ci.kolmafia.us/ for the latest version of KoLMafia...
An error occurred while downloading data from http://ci.kolmafia.us/
Exception Message: The request was aborted: Could not create SSL/TLS secure channel.

I'd prefer not turning SSL off though.
 

taltamir

Member
Not working for me either. Jenkins also appears to have recently purged all kolmafia history, which is when the issue started.
 

fewyn

Administrator
Staff member
Not working for me either. Jenkins also appears to have recently purged all kolmafia history, which is when the issue started.
When we migrated to the new forum software I had to reinstall pretty much everything. The reason the downloader is currently not working is because it does not support SSL connections, someone who knows how to update it will need to fix that as I'm not very familiar with what this is written in. The source code seems to be attached to the original post if anyone wants to take a stab at it.
 

taltamir

Member
When we migrated to the new forum software I had to reinstall pretty much everything. The reason the downloader is currently not working is because it does not support SSL connections, someone who knows how to update it will need to fix that as I'm not very familiar with what this is written in. The source code seems to be attached to the original post if anyone wants to take a stab at it.
Thank you for the explanation on what happened.
 

MCroft

Developer
Staff member
When we migrated to the new forum software I had to reinstall pretty much everything. The reason the downloader is currently not working is because it does not support SSL connections, someone who knows how to update it will need to fix that as I'm not very familiar with what this is written in. The source code seems to be attached to the original post if anyone wants to take a stab at it.
Get the source from Post #103 : https://kolmafia.us/threads/automatically-download-the-newest-daily-build.2856/page-6#post-133106
 

matt.chugg

Moderator
Updated and recompiled.

Most users will need the binary file, download it and put in KoLMafia Directory, edit the file name to remove the .txt extension.

Binary -> KoLMafiaUpdate.exe.txt
Source -> KoLMafiaUpdate.cs.txt

Have kept this compiled in .NET 2.0 for people who don't have latest versions, using a newer version would have allowed it to compile with the just an updated URL, but have added in a workaround for the .NET2.0 WebClient() to use TLS1.2

Code:
ServicePointManager.SecurityProtocol = (SecurityProtocolType)3072;
 

Attachments

  • KoLMafiaUpdate.cs.txt
    5.4 KB · Views: 146
  • KoLMafiaUpdate.exe.txt
    10 KB · Views: 585
Last edited:

Tombot

New member
For some reason I just get an error saying "This app can't run on your PC". I think maybe the forum software mangled it.
Edit: I removed the .txt before I downloaded it, this seems to have fixed the problem on the second try. I still had to remove the .txt again after I downloaded, but regardless it worked.
 
Top