GUI server drops connection to Juju Core API when response contains non-ascii values

Bug #1240708 reported by Gary Poster
16
This bug affects 2 people
Affects Status Importance Assigned to Milestone
juju-core
Invalid
Undecided
Unassigned
juju-gui
Fix Released
Critical
Francesco Banconi

Bug Description

If you deploy this stack...

https://raw.github.com/paulczar/charm-championship/master/monitoringstack.sh

...and then visit the GUI and log in, you'll notice that the GUI has problems. It can't show a lot of information. If you go in the console and poke around, and reload the page, sometimes you'll get an error about a reconnecting web socket complaining. If you then go to the network tab (chrome/chromium) and look at the websocket frames, you'll see that the websocket falls over on the Juju side, pretty reliably about 1 second into the connection. http://ubuntuone.com/707jMTdcPvB8fr1r6Gei0G . If you look at it further, you see that the browser is getting a lot of responses from requests to Juju, but never getting a response to the AllWatcher Next call.

Then, if you go to machine 0 and look at /var/log/juju/machine-0.log, you'll see something like this: http://pastebin.ubuntu.com/6247538/

Our pastebins can disappear, so here's the crux. You can see the GUI's request for AllWatcher Next:

2013-10-16 19:56:29 DEBUG juju.rpc.jsoncodec codec.go:107 <- {"Type":"AllWatcher","Request":"Next","Id":"1","Params":{},"RequestId":5}

You can see a lot of other requests and successful responses. Finally, you can see this, which is correlated with the AllWatcher Next request because of the RequestId

2013-10-16 20:05:27 DEBUG juju.rpc.jsoncodec codec.go:110 <- error: EOF (closing false)
2013-10-16 20:05:27 DEBUG juju.rpc.jsoncodec codec.go:172 -> {"RequestId":5,"Error":"state watcher was stopped","Response":{}}
2013-10-16 20:05:27 ERROR juju.rpc server.go:418 error writing response: EOF
2013-10-16 20:05:27 INFO juju.rpc server.go:237 error closing codec: EOF

As far as I can tell, this is Very Bad. It doesn't always happen, but it might always happen at non-toy scale. In that vein, I am trying to verify if https://bugs.launchpad.net/juju-gui/+bug/1238301 has the same symptoms from Juju Core, and will report back here.

Related branches

Revision history for this message
Gary Poster (gary) wrote :

I am using Juju Core 0.16 on saucy.

Revision history for this message
Gary Poster (gary) wrote :

We verified that the other bug has the same behavior (linked as dupe). Apparently, then, the charms are likely unrelated, because the other scenario is of an openstack bundle. This may simply be scale--and not very much of it.

Changed in juju-gui:
status: New → Triaged
importance: Undecided → Critical
Gary Poster (gary)
Changed in juju-core:
status: New → Invalid
Revision history for this message
Gary Poster (gary) wrote :

This is a bug in the Juju GUI's charm server. It is a string encoding issue. We should have a fix released today.

Changed in juju-gui:
status: Triaged → In Progress
assignee: nobody → Francesco Banconi (frankban)
summary: - API server falls over repeatably during AllWatcher Next, killing GUI
+ GUI server drops connection to Juju Core API when charm contains non-
+ ascii values
summary: - GUI server drops connection to Juju Core API when charm contains non-
+ GUI server drops connection to Juju Core API when response contains non-
ascii values
Gary Poster (gary)
Changed in juju-gui:
status: In Progress → Fix Committed
Gary Poster (gary)
Changed in juju-gui:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.