View Issue Details

IDProjectCategoryView StatusLast Update
0000399OpenFOAMBugpublic2012-02-23 16:56
Reporteruser334Assigned Tochris  
PrioritynormalSeverityminorReproducibilityhave not tried
Status resolvedResolutionfixed 
PlatformLinuxOSUbuntuOS Version10.04
Summary0000399: Unable to download package
DescriptionI'm following the instructions from this page:

http://www.openfoam.org/download/ubuntu.php

And I run into a snag when I actually try to install using

sudo apt-get install openfoam210

Specifically, I get the following error:

Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
  libsuperlu3-dev libklu1.1.0 libcxsparse2.2.3 gfortran-4.4 libspooles-dev libblas-dev
  libcholmod1.7.1 libsuperlu3 libccolamd2.7.1 liblapack-dev libldl2.0.1 gfortran libcamd2.2.0
  libcsparse2.2.3 libbtf1.1.0 libspooles2.2 libsuitesparse-dev
Use 'apt-get autoremove' to remove them.
Suggested packages:
  paraviewopenfoam3120
Recommended packages:
  libptscotch-dev
The following NEW packages will be installed:
  openfoam210
0 upgraded, 1 newly installed, 0 to remove and 180 not upgraded.
Need to get 92.9MB of archives.
After this operation, 352MB of additional disk space will be used.
WARNING: The following packages cannot be authenticated!
  openfoam210
Install these packages without verification [y/N]? y
Err http://www.openfoam.org/download/ubuntu/ lucid/main openfoam210 0-1
  Got a single header line over 360 chars
Failed to fetch http://www.openfoam.org/download/ubuntu/./dists/lucid/main/binary-amd64/openfoam210_0-1_amd64.deb Got a single header line over 360 chars
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?

I'm puzzled about the "Got a single header line over 360 chars"?

I ran

sudo apt-cache show openfoam210

and the output looks as expected. Also, running

apt-get -qq --print-uris install openfoam210

gives the following (which looks ok)

'http://www.openfoam.org/download/ubuntu/./dists/lucid/main/binary-amd64/openfoam210_0-1_amd64.deb' openfoam210_0-1_amd64.deb 92861532 SHA256:a28a47e708ffef0320ad8982fb0e05693ba2b60764ba1ed5169e16bc4c23447b

Thanks,
Eric
TagsNo tags attached.

Activities

user19

2012-01-28 11:43

  ~0000965

Last edited: 2012-01-28 11:44

This is IMHO an error in the server setup. Apt-get doesn't follow redirects (302 code). Downloading the package with wget or 'curl --location' works just fine. See my comments on issue #396: http://openfoam.com/mantisbt/view.php?id=396#c955

wyldckat

2012-01-28 22:15

updater   ~0000967

Last edited: 2012-01-29 00:17

I'm using Ubuntu 11.10 x86_64 and I'm getting the same error as reported.
I've been digging through the apt code and everything and haven't found anything yet that might help neutralize the "guilty party".

However, I did find the guilty party! It's not apt's fault, because apt-get does support redirects for quite some time now. The problem is the "cookie of death" that sourceforge.net is using nowadays. Here's how to confirm what's going on:
 1- run the install command like this:

sudo apt-get install openfoam210 -o Debug::Acquire::http=true 2> apt-fetch.log

 2- Open the "apt-fetch.log" file with a text editor and you will find a line that starts with "Set-cookie: sf_mirror_attempt=" and goes on for more than 360 characters. This is the guilty party!!

Like I wrote, I've checked the source code in "apt" and found out that there is a hard-coded "#define MAXLEN 360" in the http related headers that seem to affect both http and https. I'm going to continue digging to see if there is any way of discarding header lines that are cookie related... "wget" has this option, but I haven't found yet for apt-get.

edit:
  The only way I could find to "take out" the bad line header would be to use a Squid service and replace headers directly on the socket connect, thus overriding the long cookie header.
  The other possibility would be to use another script that does the necessary heuristics for us, such as "apt-fast".


edit 2: A "not very pretty" workaround can be found here: http://www.cfd-online.com/Forums/openfoam-installation/96633-trouble-installing-openfoam-2-10-ubuntu-11-10-a.html#post341679

chris

2012-01-29 12:54

manager   ~0000970

Thanks for the work on this problem. I agree that it seems the mirroring system at sourceforge has changed to use a cookie which generates a huge string that means 360 chars are exceeded,in the URL .

In the meantime, I have changed the URL so that all requests go to one specific mirror in Germany. This means the apt system works again, but I don't know whether people outside Europe will find downloading slow, or what will happen if that mirror "goes down". Let's monitor the situation for a while, and if anyone finds a miracle cure, please let us know.

user19

2012-01-29 12:59

  ~0000971

How about a PPA or if you still can't build from a source package, using the http://developer.ubuntu.com/ service?

wyldckat

2012-01-29 16:32

updater   ~0000974

Last edited: 2012-01-29 16:45

Apparently connections outside of the "range" of that mirror's location in Germany, will get bounced off to another mirror and trigger the cookie problem once again: http://www.cfd-online.com/Forums/openfoam-installation/96668-openfoam-installation.html

The PPA system would be the most advantageous one, albeit somewhat troublesome to get it up and running.
The other possibility is to do things the same way as Flash gets installed on Ubuntu: the reference deb package uses a script (or at least seems like one) for downloading the actual tarball and then installing it.

edit: source for flashplugin-installer: https://launchpad.net/ubuntu/precise/+package/flashplugin-installer
edit2: forgot to mention that these stub packages would then have to be placed on the main openfoam.{com,org} website, but since these stub packages wouldn't be much bigger than the ones you already have (4-5kB per .deb), it wouldn't make much of a dent on performance ;)

user334

2012-01-30 05:02

  ~0000977

I was able to just download the .deb and use dpkg to install it.

chris

2012-01-30 11:02

manager   ~0000978

I have put in the temporary workaround in the meantime so people can install on ubuntu.

chris

2012-02-03 09:32

manager   ~0001006

I have reported this issue to the APT development team:
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=658346
Hopefully, this will lead to the URL limit being removed.

In the short term, this problem is being addressed at Sourceforge:
http://sourceforge.net/p/allura/tickets/3683/

Hopefully we will be operating normally again in the coming days and will remove the problem entirely in the long term.

wyldckat

2012-02-03 12:09

updater   ~0001015

@Chris: in Ubuntu 10.04 the "download" option doesn't work for the print command: http://www.openfoam.com/mantisbt/view.php?id=410#c1013

chris

2012-02-03 12:23

manager   ~0001016

Changed it to install. The good thing about download was that it returned the link whether the package already existed in the cache or not.

chris

2012-02-23 16:56

manager   ~0001052

Problem with long URL fixed at Sourceforge - Thanks to SF. Reverted instructions to original form.

Issue History

Date Modified Username Field Change
2012-01-27 16:22 user334 New Issue
2012-01-28 11:43 user19 Note Added: 0000965
2012-01-28 11:44 user19 Note Edited: 0000965
2012-01-28 11:44 user19 Note Edited: 0000965
2012-01-28 22:15 wyldckat Note Added: 0000967
2012-01-28 23:33 wyldckat Note Edited: 0000967
2012-01-29 00:17 wyldckat Note Edited: 0000967
2012-01-29 11:22 chris Assigned To => chris
2012-01-29 11:22 chris Status new => assigned
2012-01-29 12:54 chris Note Added: 0000970
2012-01-29 12:54 chris Status assigned => feedback
2012-01-29 12:59 user19 Note Added: 0000971
2012-01-29 16:32 wyldckat Note Added: 0000974
2012-01-29 16:37 wyldckat Note Edited: 0000974
2012-01-29 16:45 wyldckat Note Edited: 0000974
2012-01-30 05:02 user334 Note Added: 0000977
2012-01-30 05:02 user334 Status feedback => assigned
2012-01-30 11:02 chris Note Added: 0000978
2012-02-03 09:32 chris Note Added: 0001006
2012-02-03 12:09 wyldckat Note Added: 0001015
2012-02-03 12:23 chris Note Added: 0001016
2012-02-23 16:56 chris Note Added: 0001052
2012-02-23 16:56 chris Status assigned => resolved
2012-02-23 16:56 chris Resolution open => fixed