cannot communicate with server - openSUSE Tumbleweed

Bug #1605003 reported by Thibaut Brandscheid
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
snapd
Invalid
Undecided
Unassigned
openSUSE
Confirmed
Undecided
Zygmunt Krynicki

Bug Description

OS: openSUSE Tumbleweed up-to-date (a rolling release distribution)

The linked snapcraft.io openSUSE repo has a Tumbleweed branch, from which I installed snapd.

Commands used:
sudo zypper addrepo http://download.opensuse.org/repositories/system:/snappy/openSUSE_Tumbleweed/ snappy
sudo zypper install snapd

After a reboot (just in case it is needed), 'snap list' outputs the following error:

error: cannot list snaps: cannot communicate with server: Get http://localhost/v2/snaps:
dial unix /run/snapd.socket: connect: no such file or directory

description: updated
Revision history for this message
John Lenton (chipaca) wrote :

What is the output of “systemctl status snapd”?

Revision history for this message
Thibaut Brandscheid (k1au3-is-37) wrote :

> What is the output of “systemctl status snapd”?
disabled

When trying to start the daemon I get:
● snapd.service - Snappy daemon
   Loaded: loaded (/usr/lib/systemd/system/snapd.service; disabled; vendor preset: disabled)
   Active: failed (Result: start-limit) since Thu 2016-07-21 13:23:27 CEST; 1s ago
  Process: 3017 ExecStart=/usr/lib/snapd/snapd (code=exited, status=1/FAILURE)
 Main PID: 3017 (code=exited, status=1/FAILURE)

Revision history for this message
John Lenton (chipaca) wrote :

Ooh! What does "journalctl -u snapd" tell us?

Revision history for this message
Thibaut Brandscheid (k1au3-is-37) wrote :
Download full text (3.3 KiB)

-- Logs begin at Sun 2016-04-03 15:07:55 CEST, end at Thu 2016-07-21 17:30:54 CEST. --
Jul 21 13:23:25 linux-bshe systemd[1]: Started Snappy daemon.
Jul 21 13:23:25 linux-bshe snapd[2990]: error: fatal: directory "/var/lib/snapd" must be present
Jul 21 13:23:25 linux-bshe systemd[1]: snapd.service: Main process exited, code=exited, status=1/FAILURE
Jul 21 13:23:25 linux-bshe systemd[1]: snapd.service: Unit entered failed state.
Jul 21 13:23:25 linux-bshe systemd[1]: snapd.service: Failed with result 'exit-code'.
Jul 21 13:23:26 linux-bshe systemd[1]: snapd.service: Service hold-off time over, scheduling restart.
Jul 21 13:23:26 linux-bshe systemd[1]: Stopped Snappy daemon.
Jul 21 13:23:26 linux-bshe systemd[1]: Started Snappy daemon.
Jul 21 13:23:26 linux-bshe snapd[3000]: error: fatal: directory "/var/lib/snapd" must be present
Jul 21 13:23:26 linux-bshe systemd[1]: snapd.service: Main process exited, code=exited, status=1/FAILURE
Jul 21 13:23:26 linux-bshe systemd[1]: snapd.service: Unit entered failed state.
Jul 21 13:23:26 linux-bshe systemd[1]: snapd.service: Failed with result 'exit-code'.
Jul 21 13:23:26 linux-bshe systemd[1]: snapd.service: Service hold-off time over, scheduling restart.
Jul 21 13:23:26 linux-bshe systemd[1]: Stopped Snappy daemon.
Jul 21 13:23:26 linux-bshe systemd[1]: Started Snappy daemon.
Jul 21 13:23:26 linux-bshe snapd[3006]: error: fatal: directory "/var/lib/snapd" must be present
Jul 21 13:23:26 linux-bshe systemd[1]: snapd.service: Main process exited, code=exited, status=1/FAILURE
Jul 21 13:23:26 linux-bshe systemd[1]: snapd.service: Unit entered failed state.
Jul 21 13:23:26 linux-bshe systemd[1]: snapd.service: Failed with result 'exit-code'.
Jul 21 13:23:26 linux-bshe systemd[1]: snapd.service: Service hold-off time over, scheduling restart.
Jul 21 13:23:26 linux-bshe systemd[1]: Stopped Snappy daemon.
Jul 21 13:23:26 linux-bshe systemd[1]: Started Snappy daemon.
Jul 21 13:23:26 linux-bshe snapd[3012]: error: fatal: directory "/var/lib/snapd" must be present
Jul 21 13:23:26 linux-bshe systemd[1]: snapd.service: Main process exited, code=exited, status=1/FAILURE
Jul 21 13:23:26 linux-bshe systemd[1]: snapd.service: Unit entered failed state.
Jul 21 13:23:26 linux-bshe systemd[1]: snapd.service: Failed with result 'exit-code'.
Jul 21 13:23:26 linux-bshe systemd[1]: snapd.service: Service hold-off time over, scheduling restart.
Jul 21 13:23:26 linux-bshe systemd[1]: Stopped Snappy daemon.
Jul 21 13:23:26 linux-bshe systemd[1]: Started Snappy daemon.
Jul 21 13:23:26 linux-bshe snapd[3017]: error: fatal: directory "/var/lib/snapd" must be present
Jul 21 13:23:26 linux-bshe systemd[1]: snapd.service: Main process exited, code=exited, status=1/FAILURE
Jul 21 13:23:26 linux-bshe systemd[1]: snapd.service: Unit entered failed state.
Jul 21 13:23:26 linux-bshe systemd[1]: snapd.service: Failed with result 'exit-code'.
Jul 21 13:23:27 linux-bshe systemd[1]: snapd.service: Service hold-off time over, scheduling restart.
Jul 21 13:23:27 linux-bshe systemd[1]: Stopped Snappy daemon.
Jul 21 13:23:27 linux-bshe systemd[1]: snapd.service: Start request repeated too quickly.
Jul 21 13:23:27 linux-bshe systemd[1]: Failed to...

Read more...

Revision history for this message
Oliver Grawert (ogra) wrote :

smells actually like a packaging error (the package should create the dir). does it work when you manually create that directory ?

Revision history for this message
Thibaut Brandscheid (k1au3-is-37) wrote :

After creating /var/lib/snapd installing a snap works. But when trying to launch the installed krita snap using /snap/krita/3/bin/qt5-launch, I get:

mkdir: cannot create directory ‘/.local-’: Permission denied
mkdir: cannot create directory ‘/.cache-’: Permission denied
ln: target '/.local-/share' is not a directory

I guess that some other bits are still missing.

Revision history for this message
Oliver Grawert (ogra) wrote :

yes, you should never tyr to launch the wrapper script directly, there is another wrapper around that that prepares the environment ... the two mkdirs most likely try to create $SNAP_USER_DATA/{.local,.cache} ... but SNAP_USER_DATA gets only set by the outer launcher ...

you should actually have gotten /snap/bin/krita along with the snap and the snapd package should have exported /snap/bin into your PATH ... so either just calling "krita" or (if the PATH entry is yet missing) /snap/bin/krita should get you a running app.

Revision history for this message
Thibaut Brandscheid (k1au3-is-37) wrote :

My $PATH does not contain "/snap/bin" or anything snap related neither on bash nor fish shell.

When trying to run: /snap/bin/krita
"need to run as root or suid. errmsg: No such file or directory"

Tried running krita as root too:
"cannot bind mount /media to /tmp/snap.rootfs_KxeJAF/media. errmsg: No such file or directory"

Revision history for this message
Zygmunt Krynicki (zyga) wrote :

I believe the snapd packaging may not set that yet. We were sprinting last week and apparently the changes that we made never made it to OBS. I will look at addressing this ASAP.

Changed in snappy:
status: New → Confirmed
importance: Undecided → High
assignee: nobody → Zygmunt Krynicki (zyga)
Changed in opensuse:
assignee: nobody → Zygmunt Krynicki (zyga)
Changed in snappy:
status: Confirmed → Invalid
Revision history for this message
Zygmunt Krynicki (zyga) wrote :

This bug affects the system:snappy repository. Snapd is not actually in openSUSE repositories so we cannot rely on launchpad bug tracking there.

Changed in opensuse:
status: New → Confirmed
Changed in snappy:
assignee: Zygmunt Krynicki (zyga) → nobody
importance: High → Undecided
Revision history for this message
Masoud Abkenar (mabkenar) wrote :

I can confirm the same problem in openSUSE Leap 42.2.

Revision history for this message
Zygmunt Krynicki (zyga) wrote : Re: [Bug 1605003] Re: cannot communicate with server - openSUSE Tumbleweed

This bug is not fixed yet. We need someone who can focus on working on
proper opensuse support.

On Wed, Feb 1, 2017 at 6:31 PM, Masoud Abkenar <email address hidden> wrote:
> I can confirm the same problem in openSUSE Leap 42.2.
>
> --
> You received this bug notification because you are a member of Snappy
> Developers, which is subscribed to Snappy.
> Matching subscriptions: xxx-bugs-on-snapd
> https://bugs.launchpad.net/bugs/1605003
>
> Title:
> cannot communicate with server - openSUSE Tumbleweed
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/snappy/+bug/1605003/+subscriptions

Revision history for this message
Alexandros (onedrawingperday) wrote :

I can also confirm that I am getting the same "cannot communicate with server" problem in Leap 42.2

So perhaps openSUSE should not be listed as compatible with snap on snapcraft.io until this bug is fixed.

Revision history for this message
Zygmunt Krynicki (zyga) wrote :

We don't start the service/socket/timers on package install as that is handled by systemd presets. I'll work on getting this done on the core distribution. For now you need to:

sudo systemctl enable --now snapd.socket snapd.service snapd.refresh.timer

Revision history for this message
Zygmunt Krynicki (zyga) wrote :

We are in the process of getting snapd into the openSUSE repository and as a consequence we got permissions to enable various snapd services automatically. This will be resolved when that process is complete.

affects: snappy → snapd
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.