Skip to content

Fail to update repository after CKAN is sitting open for a while #2391

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

Closed
linuxgurugamer opened this issue Mar 26, 2018 · 18 comments
Closed
Labels
Network Issues affecting internet connections of CKAN

Comments

@linuxgurugamer
Copy link
Contributor

I dont the how long it takes, but this is repeatable:
Windows 10, CKAN 1.24.0

Open CKAN, everything works fine, refreshes work etc.
Leave it open, come back several hours later, and hit refresh, get the following message:

Updating repositories...
Connection to https://github.com/KSP-CKAN/CKAN-meta/archive/master.tar.gz could not be established.
Repository update failed!

I'm guessing that a cookie or session is timing out, but CKAN isn't restarting from the beginning

@HebaruSan HebaruSan added the Network Issues affecting internet connections of CKAN label Mar 27, 2018
@HebaruSan
Copy link
Member

About how many hours to wait before the problem starts? I launched it about an hour ago, and so far it's OK.

@Olympic1
Copy link
Member

Tested this too, opened ckan before I left for work. 8h later it couldn't update the repos.

@linuxgurugamer
Copy link
Contributor Author

I can't say how long, I'd have to do long tests. I'll try to keep an eye on it.
But, it seems that once it fails, it doesn't seem to try to restart the connection

@DasSkelett
Copy link
Member

Can confirm, had the same problem few days ago.

I can't tell the exact time either, might have been 3-4 hours.

@HebaruSan
Copy link
Member

Mine's still fine after 11+ hours. :(

@Dazpoet
Copy link
Member

Dazpoet commented Mar 28, 2018

Had this happen to me once aswell, it disappeared (and didn't come back) after a restart of CKAN. Was probably going for 2-3 hours before it happened.

@linuxgurugamer
Copy link
Contributor Author

@HebaruSan it has to be untouched for a long time.

and, it happens to me all the time

@HebaruSan
Copy link
Member

@linuxgurugamer, I wasn't using it at all except for clicking Refresh every few hours. Still fine at 24h. Based on that, I'm going to guess that some other factor triggers this, not time (or not just time).

@linuxgurugamer
Copy link
Contributor Author

a few hours isn't enough.
Open a CKAN, do a refresh, then leave it for 8 hours.

@HebaruSan
Copy link
Member

I left it for 24 hours.

@HamiltonKsos
Copy link

HamiltonKsos commented Mar 30, 2018

I get this immediately on opening CKAN v 1.24.1
Using: Cinnamon Mint 3.6.7.
New install of mono and CKAN.

Does not happen to Windows version.

Connection to https://github.com/KSP-CKAN/CKAN-meta/archive/master.tar.gz could not be establisied.

@blackliner
Copy link

Same here, Win10 (17025), it was idle for about 12h: https://i.imgur.com/VD92ldt.png
Progressbar is running, as if there is something to wait for.

@Rohaq
Copy link

Rohaq commented Apr 7, 2018

Confirming that I've had this happen here too, it's very intermittent though; sometimes it happens after only a few hours, sometimes I've had CKAN open for ~8 hours and it doesn't happen at all.

Very difficult to diagnose without more debugging data regarding the HTTP request/response when it fails to make a connection though.

@Ruedii
Copy link

Ruedii commented Apr 26, 2018

It looks like CKAN is relying on web sessions staying open.

It shouldn't do that.

I know, you are just using the default .Net/Mono behavior, but bad behavior. It's an upstream bug we have to account for and correct.

@HebaruSan
Copy link
Member

@Ruedii , where do you see that in the code?

@Olympic1
Copy link
Member

I tested this today and these are my findings.

Opened CKAN, minimized it, went away while leaving PC on -> CKAN works fine.
Opened CKAN, set my PC on sleep mode, brought out of sleep mode -> CKAN can't update
Opened CKAN, disabled/enabled my internet -> CKAN can't update.

When a computer goes into sleep mode, it loses the internet connection on Windows 10. When bringing it out of sleep mode, it reconnects to the internet. This way CKAN lost connection and can't update.

Could we make CKAN check when lost connection and reconnect?

Sorry, something went wrong.

@politas
Copy link
Member

politas commented May 14, 2018

Ah, ok, this is why I've never had this happen. My computer never goes into sleep mode. I also don't normally leave CKAN open.

Sorry, something went wrong.

@DasSkelett
Copy link
Member

Yeehaw, got the error message after playing a few hours (and maybe putting PC in standby and wake up again, but not sure):

Updating repositories…
Failed to download https://github.com/KSP-CKAN/CKAN-meta/archive/master.tar.gz: System.Net.WebException: Ausnahmefehler während einer WebClient-Anforderung. ---> System.IO.DirectoryNotFoundException: Ein Teil des Pfades "C:\Users\User\AppData\Local\Temp\CdFileMgr\804ed71f-ca41-4f.tmp" konnte nicht gefunden werden.
   bei System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
   bei System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
   bei System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access)
   bei System.Net.WebClient.DownloadFile(Uri address, String fileName)
   --- Ende der internen Ausnahmestapelüberwachung ---
   bei System.Net.WebClient.DownloadFile(Uri address, String fileName)
   bei CKAN.Net.Download(String url, String filename, IUser user)
   bei CKAN.Repo.UpdateRegistry(Uri repo, KSP ksp, IUser user)
Repository update failed!

Same as #2342, CdFileMgr does not exist.
Storage Sense is activated on my system, but it sais 0 Byte deleted in the last 30 days...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Network Issues affecting internet connections of CKAN
Projects
None yet
Development

No branches or pull requests

10 participants