I'm trying to install Rocket Chat server via snaps. When I try to execute:

sudo snap install rocketchat-server

I get the following error:

error: cannot communicate with server: 
Post http://localhost/v2/snaps/rocketchat-server: 
dial unix /run/snapd/socket: connect: connection refused

I'm getting the same error when I try to list snaps or any other related command. Any ideas please?

Here is the output of journalctl -u snapd.service

systemd[1]: Started Snappy daemon.
/usr/lib/snapd/snapd[6186]: patch.go:65: Patching system state from level 3 to 4
snapd[6186]: 2017/01/18 18:31:48.253833 patch.go:65: Patching system state from level 3 to 4
usr/lib/snapd/snapd[6186]: patch.go:72: Cannot patch: cannot get snap state from "rocket-server": <nil> 
snapd[6186]: 2017/01/18 18:31:48.267963 patch.go:72 Cannot patch: cannot get snap state from "rocket-server": <nil> 
snapd[6186]: error: cannot patch system state from level 3 to 4: cannot get snap state for "rocketchat-server": <nil>
snapd.service: Main process exited, code=exited, status=1/FAILURE 
snapd.service: Unit entered failed state.
snapd.service: Failed with result 'exit-code'
snapd.service: Service hold-off time over, scheduling restart.
snapd.service: Stopped Snappy daemon.
share|improve this question
    
Is snapd healthy? What is the output of systemctl status snapd? – Kyle Jan 17 '17 at 16:29
    
Hello Kyle, this is the output. Can't format this properly for some reason - ctrl+K does nothing. Sorry about that. PID: 5150 (code=exited, status=1/FAILURE) systemdIll: snapd.service: Main process exited, code=exited, status=1/FAILURE systemdIll: snapd.service: Unit entered failed state. systemdIll: snapd.service: Failed with result 'exit-code'. systemdIll: snapd.service: Service hold-off time over, scheduling restart. systemdIll: Stopped Snappy daemon. systemdIll: snapd.service: Start request repeated too quickly. systemdIll: Failed to start Snappy daemon. – Lyubomir Grancharov Jan 18 '17 at 13:34
    
Alright, what happens if you try to start it again? systemctl start snapd? If after you run that command it's still not running, please show the output of journalctl -u snapd.service. Note that it's probably best to show such things as edits of the original question due to the formatting issues (and length). – Kyle Jan 18 '17 at 16:10
    
Edited as suggested. – Lyubomir Grancharov Jan 18 '17 at 16:58

I'm an upstream snapd developer. Let me look at the error you saw.

Which version of snapd are you on?

EDIT: I just spoke to other developers and it seems that until 2.21 is out of proposed you are out of luck. Can you try snapd from proposed please (and report back if that fixed the problem for you).

share|improve this answer
    
Although it "kind of" answers the question in the edit section, most of it is a comment rather than an answer. – Jacob Vlijm Jan 18 '17 at 19:42
    
Hello guys, thanks a lot for your help. I just tested on a new machine with Ubuntu 16.10. No problems whatsoever - snapd running and functioning properly. No idea why I had this issue on 16.04. – Lyubomir Grancharov Jan 19 '17 at 13:08

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.