still unable to upload charm resources #96

Open
battlemidget opened this Issue Oct 31, 2016 · 9 comments

Comments

Projects
None yet
6 participants

This bug was marked fixed: CanonicalLtd/jujucharms.com#255

However, im stilling seeing an issue:

[adam:~/Projects/dokuwiki] master ± charm attach ~adam-stokes/dokuwiki stable-release=/home/adam/Downloads/dokuwiki-stable.tgz
ERROR can't upload resource: cannot post resource: cannot unmarshal error response "<!DOCTYPE HTML PUBLIC \"-//IETF//DTD HTML 2.0//EN\">\n<html><head>\n<title>502 Bad Gateway</title>\n</head><body>\n<h1>Bad Gateway</h1>\n<p>The proxy server received an invalid\r\nresponse from an upstream server.<br />\r\n</p>\n<hr>\n<address>Apache/2.4.7 (Ubuntu) Server at api.jujucharms.com Port 443</address>\n</body></html>\n": invalid character '<' looking for beginning of value
[adam:~/Projects/dokuwiki] master 1 ± charm version
charm 2.2.0-0ubuntu1~ubuntu16.04.1~ppa2
charm-tools 2.1.4
Member

jrwren commented Oct 31, 2016

Include the version in the charm url you pass to charm attach.

We have a fix coming soon which will return an error message saying so.

@jrwren jrwren added the fix-commited label Oct 31, 2016

Member

johnsca commented Nov 1, 2016

In CanonicalLtd/jujucharms.com#332 I mentioned that including the charm rev doesn't address this error for resources over a certain file size.

Member

johnsca commented Nov 1, 2016

As noted on the aforementioned issue, I've been informed by @urosj that the issue for large resources is in fact related to the underlying blob store and that the fix is non-trivial and thus will take some time but is being worked on. Note that this only applies to large resource payloads, so if this payload is smaller, it may simply be the charm rev issue that @jrwren mentioned.

arosales commented Jan 26, 2017

@wwwtyro looks to be hitting a similar issue

$ charm attach cs:~ryeterrell/xenial/kubernetes-master-7 kubectl=./kubectl_1.5.2_amd64.snap
ERROR can't upload resource: cannot post resource: cannot unmarshal error response "<!DOCTYPE HTML PUBLIC \"-//IETF//DTD HTML 2.0//EN\">\n<html><head>\n<title>502 Bad Gateway</title>\n</head><body>\n<h1>Bad Gateway</h1>\n<p>The proxy server received an invalid\r\nresponse from an upstream server.<br />\r\n</p>\n<hr>\n<address>Apache/2.4.7 (Ubuntu) Server at api.jujucharms.com Port 443</address>\n</body></html>\n": invalid character '<' looking for beginning of value

Resource size is 9.2MB, and the version is being included so may not be the same exact issue here.

The issue looks fix-commited, but do folks know what release of charm-tools this is addressed in? Or, if this looks like a new issue please let us know and we can open up a new issue.

-thanks,
Antonio

wwwtyro commented Jan 26, 2017

My uplink is 6Mbps, and the attempted command takes roughly between 15 and 17 seconds.

The problem I have with this issue is the error message that is returned is not helpful at all. If it's a user error then the error message should say so. This issue has been open for a long time now and I can't tell if any traction had been made.

This is actually a very common problem people are hitting and deserves more attention.

wwwtyro commented Jan 26, 2017

Fixed my issue, was user error. Agree with @battlemidget, though, some kind of feedback there would have saved me time. :) If it helps, in my case, I was pushing an incorrect metadata.yaml file with the wrong resource definitions. -2 IQ points to me.

Owner

urosj commented Feb 6, 2017

As part of the investigation, we've filed the following bug to Apache:
https://bz.apache.org/bugzilla/show_bug.cgi?id=60330

We're currently looking at an alternative implementation so that we don't have to depend on the apache accepting the patch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment