Go cookies corrupted

Bug #1671146 reported by Michael Skalka
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Canonical Juju
Expired
Undecided
Unassigned

Bug Description

Spun up a juju controller on localhost, added two machines then logged out of the machine running juju after an hour or so. The following day after logging on and running 'juju status' the following error appears:

ERROR cannot connect to API: cannot load cookies: invalid character '\u0083' looking for beginning of value

Investigation of ~/.go-cookies shows it was corrupted. Deleting/renaming go.cookies allows for access to the controller.

The first two lines of the corrupted go-cookies for reference: <83>Dc^[OX%<95>'Ný÷9¶^\\-^o9Þ[¦âáón^ME<9d>&è]ü½¡ÐÎÆH<81>³¨<8d>Ö<98>^H<83>+aØèõÔ^Nn^Yÿõk^^^W<98>L<8c>*d×<95>õúø£}å4OܳÚ^DùC¿¡ÓéD<9f>p<8d>iþ<80>1^WN<99>z^NN<87>'å^GËjc8[^Ò>qÝ{xzÊ^E¾<86>Æf^D^]ä'<9c>ÀHZ<9a><92>^HP¦-6^]<8b>àoÖ|ÑÏùnTµîc¬+ã)»ÇØ<9d>·<87>VGFX<93>Y^]<8f>ýY¼<9b>^OB^#^Hùê,¼z^EÑvT<90>ß0^OGòÌý^RÕCýûNHJ~Íî!Å

Juju version was 2.0.2

Revision history for this message
Anastasia (anastasia-macmood) wrote :

I am not too sure what we can do here - unless Juju caused cookie file corruption...

I cannot really reproduce that. Do you reliably reproduce this with later versions of Juju too?

Thank you for report \o/ It's also great to know that deleting/renaming go.cookies solved the issue.

Changed in juju:
status: New → Incomplete
Revision history for this message
Roger Peppe (rogpeppe) wrote :

If you still have the corrupted .go-cookies file, it would be useful
to see it without running through text conversion (perhaps add it as an
attachment here, or post it directly to someone involved if you're concerned
about security risk).

Thanks.

Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for juju because there has been no activity for 60 days.]

Changed in juju:
status: Incomplete → Expired
Revision history for this message
Calvin Hartwell (calvinh) wrote :

@Anastasia I am still hitting this issue in juju 2.3.5, error occurs when Juju controller node unexpectedly terminates.

calvinh@openstack:~/.local/share/juju/cookies$ cat localhost-localhost.json

Where localhost-localhost is the name of the controller, it contains:

#�oX�

This throws the error:

ERROR controller localhost not found
calvinh@openstack:~$ juju destroy-controller localhost-localhost
WARNING! This command will destroy the "localhost-localhost" controller.
This includes all machines, applications, data and other resources.

Continue? (y/N):y
ERROR failed to destroy controller "localhost-localhost"

If the controller is unusable, then you may run

    juju kill-controller

to forcibly destroy the controller. Upon doing so, review
your cloud provider console for any resources that need
to be cleaned up.

ERROR cannot connect to API: cannot load cookies: invalid character '#' looking for beginning of value

Removing/renaming the file does not fix the issue, not sure how to fix this yet.

Changed in juju:
status: Expired → New
Revision history for this message
Anastasia (anastasia-macmood) wrote :

@Calvin Hartwell (calvinh),

As per comment # 2, please provide requested file.

Changed in juju:
status: New → Incomplete
Revision history for this message
Calvin Hartwell (calvinh) wrote :

@Anastasia it is literally a text file placed in ~/.local/share/juju/cookies with a filename based on the name of the controller, in my case 'localhost-localhost.json'.

The file literally contained: #�oX�

Revision history for this message
Calvin Hartwell (calvinh) wrote :

Interestingly when the machine is running, this file contains Nothing:

calvinh@openstack:~$ cat ~/.local/share/juju/cookies/localhost-localhost.json
null

Try replacing the file content with '#�oX�' and then typing juju status, you should get a similar error to what I saw above.

The only way I managed to fix it was to remove the snap and remove everything from ~/.local/share/juju/*

Revision history for this message
Calvin Hartwell (calvinh) wrote :

@Anastasia the file has been provided, can you please update?

Revision history for this message
Anastasia (anastasia-macmood) wrote :

@Roger Peppe (rogpeppe),

Could you please advise? ^^

Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for juju because there has been no activity for 60 days.]

Changed in juju:
status: Incomplete → Expired
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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