1.23-beta websocket incompatibility
| Affects | Status | Importance | Assigned to | Milestone | |
|---|---|---|---|---|---|
| | juju-core |
Critical
|
Unassigned | ||
| | python-jujuclient |
Undecided
|
Unassigned | ||
Bug Description
When trying to use the python-jujuclient library against an environment bootstrapped using 1.23-beta2 from ppa:juju/devel the client errors with the following traceback:
websocket.
Reproduction:
On a clean 14.04 install:
```
sudo add-apt-repository ppa:juju/devel
sudo apt-get update
sudo apt-get install juju juju-core juju-local python-virtualenv
juju init
juju switch local
juju bootstrap
juju deploy trusty/ubuntu
juju status
virtualenv ~/ilovejuju
. ~/ilovejuju/
pip install jujulcient pyyaml
```
The output of the above: http://
$ juju version
1.23-beta2-
$ dpkg -l | grep juju
ii juju-0.7 0.7+bzr628+
ii juju-core 1.23-beta2-
ii juju-deployer 0.4.3-0ubuntu1~
ii juju-local 1.23-beta2-
ii juju-mongodb 2.4.9-0ubuntu3 amd64 MongoDB object/
ii juju-quickstart 2.0.1+bzr124+
ii python-jujuclient 0.50.1-2 amd64 Python API client for juju-corez
>>> from jujuclient import Environment
>>> env = Environment.
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "build/
File "build/
File "build/
File "build/
File "build/
File "/home/
websock.
File "/home/
self.
File "/home/
send(sock, header_str)
File "/home/
raise WebSocketConnec
websocket.
| description: | updated |
| Changed in python-jujuclient: | |
| status: | New → Invalid |
| Changed in juju-core: | |
| status: | New → Incomplete |
| Adam Collard (adam-collard) wrote : | #2 |
Just hit a very similar issue with juju-deployer and 1.23b3, filed as a duplicate.
| Changed in juju-core: | |
| status: | Incomplete → New |
| Changed in python-jujuclient: | |
| status: | Invalid → New |
| David Britton (davidpbritton) wrote : | #3 |
I tried this locally with 1.23b3 and didn't get it, there must be a race/flakiness of some kind where the connection is getting closed on us. Other than retrying the connection, I'm not sure there is anything to do in python-jujuclient. Marked incomplete while we wait for core to sound in.
| Changed in python-jujuclient: | |
| status: | New → Incomplete |
| Curtis Hovey (sinzui) wrote : | #4 |
Our deployer tests of the landscape bundle with beta1-4 against maas (1.5, 1.7 and 1.8), joyent, aws, and Hp don't see this.
| Adam Collard (adam-collard) wrote : | #5 |
@Curtis - specifically I see it with "juju-deployer -T" after having the bundle deployed (to cleanup)
| Curtis Hovey (sinzui) wrote : | #6 |
@Adam, thank you. I can reproduce this issue for easily. Using a 1.23 beta3 or beta4
juju bootstrap
juju --deploy-delay 10 --config my-bundles.yaml
juju --debug deployer -T
2015-04-10 20:05:24 INFO juju.cmd supercommand.go:37 running juju [1.23-beta4-
2015-04-10 16:05:24 Resetting environment...
Traceback (most recent call last):
File "/usr/bin/
load_
File "/usr/lib/
run()
File "/usr/lib/
watch=
File "/usr/lib/
self.
File "/usr/lib/
services=
File "/usr/lib/
for change_set in self.watch:
File "/usr/lib/
return super(TimeoutWa
File "/usr/lib/
'Id': self.watcher_id})
File "/usr/lib/
raw = self.conn.recv()
File "/usr/lib/
opcode, data = self.recv_data()
File "/usr/lib/
frame = self.recv_frame()
File "/usr/lib/
frame_
File "/usr/lib/
header = recv_fn(2)
File "/usr/lib/
bytes = self._recv(
File "/usr/lib/
bytes = self.sock.
File "/usr/lib/
return self.read(buflen)
File "/usr/lib/
return self._sslobj.
socket.error: [Errno 104] Connection reset by peer
2015-04-10 20:05:45 ERROR juju.cmd supercommand.go:430 subprocess encountered error code 1
| tags: | added: api deploy regression |
| tags: |
added: deployer removed: deploy |
| Changed in juju-core: | |
| milestone: | 1.23 → 1.23.0 |
| Changed in juju-core: | |
| status: | New → Triaged |
| importance: | Undecided → High |
| importance: | High → Critical |
| summary: |
- 1.23-beta2 websocket incompatibility + 1.23-beta websocket incompatibility |
| Marco Ceppi (marcoceppi) wrote : | #7 |
This was due to an issue with websocket-client 0.28.0 (thanks William!) using websocket-client 0.29.0 and above resolves this issue.
| William Reade (fwereade) wrote : | #8 |
Resolved by updating websocket-client python package to 0.29.0 or later (which can do SSL websocket connections).
https:/
| Changed in juju-core: | |
| status: | Triaged → Invalid |
| Changed in juju-core: | |
| milestone: | 1.23.0 → none |
| David Britton (davidpbritton) wrote : | #9 |
2 Things:
1) Andreas Hasenack has started a PPA for python-websocket:
https:/
This fix apparently works on Trusty.
2) On Vivid, I still get the error, not sure why, but I filed an upstream bug:


Using "1.23-beta3" from gh:juju/1.23 branch (ref: 9710c29) this issue does not present itself. I suspect this will be resolved in the beta3 release of 1.23 if all commits up to 9710c29 are included. Can't really pinpoint which commit addresses this.