Thinger server on ubuntu 14.04 LTS

Hello thinger community,

i try to install the thinger server with snap on a v-server with ubuntu 14.04. I follow the step in the documentation. First install mongodb for 14.04. After that i try to install the server with snap but failed with the following Error:

root@?:~# sudo snap install thinger-maker-server
error: cannot perform the following tasks:
- Mount snap "core" (1689) ([start snap-core-1689.mount] failed with exit status 1: Job for snap-core-1689.mount failed. See 'systemctl status snap-core-1689.mount' and 'journalctl -xn' for details.
)

-- Logs begin at Mi 2017-05-17 08:50:11 CEST, end at Mi 2017-05-17 08:51:44 CEST. --
Mai 17 08:51:41 /usr/lib/snapd/snapd[385]: daemon.go:176: DEBUG: uid=0;@ POST /v2/snaps/thinger-maker-server 316.782694ms 202
Mai 17 08:51:41 /usr/lib/snapd/snapd[385]: taskrunner.go:367: DEBUG: Running task 2 on Do: Download snap "core" (1689) from channel "stable"
Mai 17 08:51:43 /usr/lib/snapd/snapd[385]: taskrunner.go:367: DEBUG: Running task 3 on Do: Fetch and check assertions for snap "core" (1689)
Mai 17 08:51:43 /usr/lib/snapd/snapd[385]: taskrunner.go:367: DEBUG: Running task 4 on Do: Mount snap "core" (1689)
Mai 17 08:51:43 mount[1290]: mount: Could not find any loop device. Maybe this kernel does not know
Mai 17 08:51:43 mount[1290]: about the loop device? (If so, recompile or `modprobe loop'.)
Mai 17 08:51:43 /usr/lib/snapd/snapd[385]: task.go:303: DEBUG: 2017-05-17T08:51:43+02:00 ERROR [start snap-core-1689.mount] failed with exit status 1: Job for snap-core-16
Mai 17 08:51:43 /usr/lib/snapd/snapd[385]: taskrunner.go:367: DEBUG: Running task 2 on Undo: Download snap "core" (1689) from channel "stable"
Mai 17 08:51:44 /usr/lib/snapd/snapd[385]: handlers.go:204: Reported install problem for "core" as 49f22c74-3acd-11e7-bf01-fa163ed44aae OOPSID
Mai 17 08:51:44 snapd[385]: 2017/05/17 08:51:44.721940 handlers.go:204: Reported install problem for "core" as 49f22c74-3acd-11e7-bf01-fa163ed44aae OOPSID

Is there any way to install the thinger server on a ubuntu 14.04 LTS?

Hi, did not tried on ubuntu 14.04. Try first to install the snap daemon:

sudo apt-get update
sudo apt-get upgrade
sudo apt-get install snapd

Then try to install the server…

Snap already installed.

Hi! do you have another service running on port 80/443? like a webserver? If this is the case, try to stop the webserver, then install the thinger maker server.

I stoped the apache webserver and tyred again. Same result.

Did you executed the command systemctl status snap-core-1689.mount to get a detailed error response? It seems that the core cannot be started.

Did you tried to install the hello-world snap?

sudo snap install hello-world

The hello-world snap didnt execute. Result of snap status:

Loaded: loaded (/etc/systemd/system/snap-core-1689.mount; enabled)
   Active: failed (Result: exit-code) since Fr 2017-05-19 07:32:23 CEST; 37s ago
    Where: /snap/core/1689
     What: /var/lib/snapd/snaps/core_1689.snap
  Process: 6846 ExecMount=/bin/mount /var/lib/snapd/snaps/core_1689.snap /snap/core/1689 -t squashfs -o nodev,ro (code=exited, status=2)

Then, it seems to be some problem with your snap core installation.

Hi there,

not sure if it helps you anyhow, but I’m running server at Ubuntu 16.10 without any problems now. It had some hickups at the beginning (due my poor knowledge of Unix systems), but not it works like a charm.

Tomas

1 Like

Nice @Tomas, thanks for sharing your feedback :wink:

The problem here seems to be the Ubuntu 14, that it supposed to supports snaps, but it is failing in some way when mounting the snap-core package which handles all other packages.

@alvarolb, apart from this thing - I believe some time in the past you were talking about putting even your frontend to open source, as it would be great to have an opportunity to extend it by certain widgets, frontend tweaks and I’m also considering to create read-only client frontend without particular need for login. Is there anything like that on your roadmap now?

Hi @Tomas, at this moment it is not planned to release the console client as open source. We are using a non open-source theme. However, the front-end can be developed by anyone with their custom requirements, as it is just a REST API Client. Nothing is rendered by the server. I am thinking in the possibility to include custom widgets configurable by the user, but it takes some planning time.

Hi @alvarolb, this sounds promising. Just regarding the “public” console - is there any way how to acheive that at the moment? I mean to have a public web page where anyone can see particular values from the API. Because at the moment this can be done only with authorization, which is performed by client browser and even encapsulate this into some javascript envelope to hide that, seems to me very insecure.

Hi Tomas,

you cannot make that unless you create an authorization token. Hiding the Auth token in the JS is almost the same as releasing a public resource in the web, as the token will grant access only to what you want. Moreover, in this case you can control when to disable the access to the resource. For example, in the URL I send you by private, you will be able to control a device in my own, over the API Interface, but you will not be able to do anything more in my account. Not sure if your question get resolved…

I’m not sure, but your problem could be caused by using sudo as root. It is generally recommended not to log in as root under Ubuntu, that is what the sudo command is for. Have you tried to remove and reinstall the packages under your user account? There may be an issue with the snapd running as root.