Comments (23)
Just for documentation, this message I recived from @Surfer2010 :
Hi, i solved my "issue" before (i posted on your github) ... the reason is as simple as hard to find ... i tracked it down to permission issues as you also said, but ...
my folder / the drive it was on, was mounted as "noexec" in the fstab ...
that was the reason the container couldn't write all the files ....
from iobroker.docker.
What about logs/ protocol of the iobroker container? Looks like js-controller is started but no adapters...
from iobroker.docker.
---------------------------------------
----- Image-Version: 3.0.2beta -----
----- 2019-06-20 16:37:57 -----
----------------------------------------
Startupscript running...
Installing additional packages...
The following packages will be installed: nano
Installing additional packages done...
Directory /opt/iobroker is empty!
Restoring data from image...
Restoring done...
This is the first run of an new installation...
Hostname given is a07001fa7a86...
Renaming ioBroker...
/opt/scripts/iobroker_startup.sh: Zeile 53: /usr/bin/iobroker: Keine Berechtigung
Renaming ioBroker done...
Changing permissions upon first run (This might take a while! Please be patient!)...
Changing permissions done...
Starting ioBroker...
----------------------------------------
------- ioBroker Logging -------
----------------------------------------
host.a07001fa7a86 check instance "system.adapter.admin.0" for host "6a152b308ff2"
host.a07001fa7a86 check instance "system.adapter.discovery.0" for host "6a152b308ff2"
top (exec into container)
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
1 root 20 0 21176 3340 3048 S 0,0 0,1 0:00.07 iobroker_startu
310 iobroker 20 0 931584 54256 23056 S 0,0 1,4 0:08.54 iobroker.js-con
332 root 20 0 21400 3480 3060 S 0,0 0,1 0:00.03 bash
484 root 20 0 21400 3572 3152 S 0,0 0,1 0:00.04 bash
489 root 20 0 44220 3556 3068 R 0,0 0,1 0:00.00 top
What else would help? Just tell me what/where and i will post it
from iobroker.docker.
There is an issue during the renaming part of the startup script....
/opt/scripts/iobroker_startup.sh: Zeile 53: /usr/bin/iobroker: Keine Berechtigung
Something there is not working properly. Will try to reproduce it tomorrow.
You can try connecting command line as root, stopping iobroker with pkill io
and do a iobroker host this
. After that restart the container... Maybe this will fix the problem.
from iobroker.docker.
root@a07001fa7a86:/opt/iobroker# pkill io
root@a07001fa7a86:/opt/iobroker# iobroker host this
bash: /usr/bin/iobroker: Keine Berechtigung
root@a07001fa7a86:/opt/iobroker#
root@a07001fa7a86:/opt/iobroker# iobroker start
bash: /usr/bin/iobroker: Keine Berechtigung
strange ... since i should be root once i log into it by docker exec -it iobroker /bin/bash
P.S. any IRC channel you are in, so i can response/tests quicker for you so i can do to help find the problem?
from iobroker.docker.
Sorry, I can not reproduce this issue. Think there is something wrong with your permissions.
How do you run the container? Which System and versions do you use?
At the moment I don't think that there is a problem with the image...
from iobroker.docker.
#1 SMP Debian 4.19.28-2~bpo9+1 (2019-03-27)
OpenMediaVault v4.1.22-1
What else would help you to check? You could also check it out on my system if you want
from iobroker.docker.
Please try to setup a container without mounting any directories to it or use a docker created volume.
Think there is a problem with the directory permissions of the mounted folder.
from iobroker.docker.
i still don't get it to work ... would be great to get some help ... i really need this container
from iobroker.docker.
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
1 root 20 0 21176 3520 3228 S 0,0 0,0 0:00.07 iobroker_startu
304 root 20 0 7404 696 632 S 0,0 0,0 0:00.00 tail
311 root 20 0 21404 3620 3192 S 0,0 0,0 0:00.05 bash
316 root 20 0 44220 3640 3168 R 0,0 0,0 0:00.00 top
here you can see the processes running ... there should be some more to have it run ?!!
from iobroker.docker.
drwxrwxr-x+ 7 1000 users 4096 Jun 23 00:07 ioBroker
is the mounted folder in the host system
from iobroker.docker.
Please try to setup a container without mounting any directories to it or use a docker created volume.
Think there is a problem with the directory permissions of the mounted folder.
doesn't change anything
where can i find logs that will help?
from iobroker.docker.
Hi,
Wenn ich mich recht erinnere, dann hatten wir es im iobroker Forum schonmal, deshalb versuche ich es jetzt einfach mal auf deutsch...
Ich weiß nicht so recht wie ich dir helfen soll. Für mich sieht das nach einem Berechtigungsproblem aus.
Ich sehe in deinem Protokoll, dass dein iobroker daran scheitert den Hostnamen anzupassen. Das macht das Startup-Script per "iobroker host this". Wenn du das auf der Kommandozeile tust bekommst du ebenfalls "Keine Berechtigung". Sogar beim "iobroker Start" kommt dieser Fehler.
Das bedeutet, dein Problem ist, dass du die folgende Datei nicht ausführen darfst "/opt/iobroker/iobroker". Die Berechtigungen passen allerdings. Und zusätzlich bist du in der Kommandozeile ja auch noch root...
Kurzum, ich weiß nicht wo es klemmt. Habe den Container auf der DS und meinem Debian System getestet, bekomme dein Problem nicht reproduziert.
Und wenn der Container nichtmal läuft wenn du kein Verzeichnis mountest (dann passiert ja alles nur noch innerhalb des Containers) dann weiß ich echt nicht mehr was ich dir noch zum ausprobieren an die Hand geben soll...
MfG,
André
P. S.: Hast du mal im iobroker Forum gefragt, da sind ja auch einige mit Docker unterwegs...
from iobroker.docker.
If i copy my old into the mounted folder and start the container, it works, but has a lot of errors like this
host.1868f6c458bf | 2019-06-23 00:37:08.238 | info | Restart adapter system.adapter.sql.0 because enabled
-- | -- | -- | --
host.1868f6c458bf | 2019-06-23 00:37:08.237 | error | instance system.adapter.sql.0 terminated with code 1 ()
host.1868f6c458bf | 2019-06-23 00:37:08.237 | error | Caught by controller[0]: at Module.load (module.js:566:32)
host.1868f6c458bf | 2019-06-23 00:37:08.237 | error | Caught by controller[0]: at Object.Module._extensions..js (module.js:664:10)
host.1868f6c458bf | 2019-06-23 00:37:08.237 | error | Caught by controller[0]: at Module._compile (module.js:653:30)
host.1868f6c458bf | 2019-06-23 00:37:08.237 | error | Caught by controller[0]: at Object.<anonymous> (/opt/iobroker/node_modules/mmmagic/lib/index.js:1:75)
host.1868f6c458bf | 2019-06-23 00:37:08.237 | error | Caught by controller[0]: at require (internal/module.js:11:18)
host.1868f6c458bf | 2019-06-23 00:37:08.237 | error | Caught by controller[0]: at Module.require (module.js:597:17)
host.1868f6c458bf | 2019-06-23 00:37:08.237 | error | Caught by controller[0]: at Function.Module._load (module.js:498:3)
host.1868f6c458bf | 2019-06-23 00:37:08.237 | error | Caught by controller[0]: at tryModuleLoad (module.js:506:12)
host.1868f6c458bf | 2019-06-23 00:37:08.237 | error | Caught by controller[0]: at Module.load (module.js:566:32)
host.1868f6c458bf | 2019-06-23 00:37:08.237 | error | Caught by controller[0]: at Object.Module._extensions..node (module.js:682:18)
host.1868f6c458bf | 2019-06-23 00:37:08.237 | error | Caught by controller[0]: Error: /opt/iobroker/node_modules/mmmagic/build/Release/magic.node: failed to map segment from shared object
host.1868f6c458bf | 2019-06-23 00:37:08.237 | error | Caught by controller[0]: ^
host.1868f6c458bf | 2019-06-23 00:37:08.237 | error | Caught by controller[0]: return process.dlopen(module, path._makeLong(filename));
host.1868f6c458bf | 2019-06-23 00:37:08.237 | error | Caught by controller[0]: module.js:682
host.1868f6c458bf | 2019-06-23 00:37:07.856 | info | instance system.adapter.sql.0 started with pid 8263
So this is no solution ... the container runs, is accesable but no way to really use it
from iobroker.docker.
ok danke für deine Antwort, ich stimme dir zu dass es wohl ein Rechte-Problem sein muss.
Ich frage trotzdem weiter, du dein Image usw. besser kennst als ich.
Gibt es irgendwelche Verzeichnisse die ersteltl werden müssen? Weil die Tatsache dass ich ein altes Mounted Volume in den Ordner rein kopiere und sofort läuft das ganze deutet ja darauf hin, dass iwas nicht erstellt werden kann. Welche Rechte braucht man denn auf dem Host? Werden Subfolders erstellt die zwingend nötig sind?
Kannst du vielleicht von einer Neu-Installation des Containers die Verzeichnisstruktur mit allem 2 Level mal posten dann schaue ich was fehlt?
from iobroker.docker.
/opt/scripts/iobroker_startup.sh: Zeile 49: /usr/bin/iobroker: Keine Berechtigung
from iobroker.docker.
Ich glaube nicht dass etwas fehlt.
Hast du mal das leere Verzeichnis dass du mountest gelöscht und ein neues erstellt?
Du kannst auch im Container mal ein chmod 777 /opt/iobroker/iobroker
machen um die Berechtigungen hoch zu setzen...
from iobroker.docker.
root@9d16591a7ba6:/opt/iobroker# chmod +x reinstall.sh
root@9d16591a7ba6:/opt/iobroker# ./reinstall.sh
bash: ./reinstall.sh: Keine Berechtigung
Woran kann es liegen, dass ich im container keine Rechte habe?
https://pastebin.com/4w5Lw13c
https://pastebin.com/eJNMW0Ff
Alternativer Weg könnte noch sein, dass ich den alten mounted Folder nehme, damit läuft der Container ja doch (warum auch immer) ... und ich dort den iobroker NEU installiere, weil ohne Neuinstallation habe ich sql-Adapter usw. die sich nicht starten lassen vermutlich aufgrund von Altlasten
Wie kann ich im laufenden Container den ioBroker "zurücksetzen auf Werkseinstellungen" oder sowas in der Art?
from iobroker.docker.
if i run
docker run -it -p 8081:8081 buanet/iobroker:latest sh
it will stop at
Changing permissions upon first run (This might take a while! Please be patient!)...
i can only continue with CTRL+C then it "stops" again at
Starting ioBroker done...
and i have no possibility to do something again ?!
Maybe that helps?
from iobroker.docker.
Die Anpassung der Berechtigungen kann eine, Weile dauern... Wie lange hast du gewartet?
Wenn du in einer bestehenden Installation "reparieren" willst, könntest du npm rebuild
machen.
Oder du probierst mal den installation fixer. (hab ich selbst aber noch nie probiert)
Hast du denn jetzt mal probiert einen ganz neuen Ordner auf dem host zu erstellen? Eventuell dann die Rechte auf 777 ändern und dann den Container neu erstellen und den neuen, leeren Ordner einhängen...
from iobroker.docker.
npm rebuild
ergibt folgendes:
(neuer Container) ... ?! bekomm es einfach nicht zum laufen, auch 777 hilft nichts
Ein weiterer Versuch hier:
docker run -d --network dockernet --name=iobroker -p 1880:1880 -p 1883:1883 -p 1887:1887 -p 8081:8081 -p 8082:8082 --restart=always -e PUID=1000 -e PGID=100 -e TZ=Europe/Berlin -v /sharedfolders/DockerData/ioBroker:/opt/iobroker/ buanet/iobroker:latest
327e0c01e82003f4850b55892687330a770a249eb57de85caa738246ca91a9b1
root@FriedbergServer:/sharedfolders/DockerData# docker logs -f iobroker
----- Image-Version: 3.0.0 -----
----- 2019-06-25 00:10:03 -----
Startupscript running...
Installing additional packages...
The following packages will be installed: nano
Installing additional packages done...
Directory /opt/iobroker is empty!
Restoring data from image...
Restoring done...
This is the first run of an new installation...
Hostname given is 327e0c01e820...
Renaming ioBroker...
/opt/scripts/iobroker_startup.sh: Zeile 49: /usr/bin/iobroker: Keine Berechtigung
Renaming ioBroker done...
Changing permissions upon first run (This might take a while! Please be patient!)...
Changing permissions done...
Starting ioBroker...
Starting ioBroker done...
from iobroker.docker.
Du hast definitiv ein Rechteproblem auf deinem ioBroker-Ordner.
Hast du denn nun einmal ausprobiert ohne ein gemountetes Verzeichnis zu starten? Also das hier weg lassen: -v /sharedfolders/DockerData/ioBroker:/opt/iobroker/
...
Wenn das geht, dann musst du mal schauen unter welchem User dein docker daemon läuft und ob dieser User ausrechend Rechte auf den Ordner /sharedfolders/DockerData/ioBroker
hat. Vielleicht kannst du den Benutzer unter dem dein docker läuft für diesen Ordner auch zum Besitzer machen...
Da es sich meiner Meinung nach nicht um einen Bug im Image handelt, Schließe ich den issue jetzt. Meine Empfehlung: Eröffne ein Thema im ioBroker-Forum (falls noch nicht passiert) und kommentiere den Link hier.
Vielleicht ist im Forum ein User unterwegs der ein ähnliches Setup hat oder das Problem schon mal in irgendeiner Form hatte...
MfG,
André
from iobroker.docker.
Das scheint OpenMediaVault-spezifisch zu sein, ich bin da auch drüber gestolpert. Passiert nur, wenn man ein externes Verzeichnis mounted.
Ich habs vermutlich ohnehin gefixt in #33 mit sh /opt/iobroker/iobroker
. Zumindest wird jetzt der Hostname sauber gesetzt und die UI erscheint (works on my machine).
from iobroker.docker.
Related Issues (20)
- [Problem]: Container working but unhealthy HOT 1
- [Feature Request]: possibility to call a restart from inside ioBroker (e.g. javascript-adapter) HOT 6
- [Feature Request]: Podman support (rootless by default) in installation script. HOT 6
- [Feature Request]: Working together on a helm chart HOT 2
- [Problem]: cannot pull most of the tags for ghcr.io/buanet/iobroker HOT 1
- [Feature Request]: Add set -e to healthcheck.sh HOT 1
- [Feature Request]: migrate to PUID/PGID since it is the defacto standard HOT 2
- [Problem]: userscripts are not owned by the SETGID/SETUID user HOT 2
- [Problem]: iobroker_startup.sh should respect traps HOT 3
- [Feature Request]: Disable keep-alive feature for containers, when not in maintenance mode HOT 6
- [Feature Request]: Make the list of available backups sorted
- [Problem]: arm/v7 support HOT 10
- [Problem]: Small typo in docs HOT 1
- [Problem]: Container on QNAP NAS: Backitup can't access mount point HOT 2
- [Problem]: Running Iobroker as a podman rootless container HOT 1
- [Problem]: iobroker gets killed by oom-kill constantly HOT 5
- Backup of influxdb running in different docker is not working HOT 8
- [Problem]: Update js-controller HOT 2
- Failed to load definitions for node: Error:
- The selected advertiser, \"avahi\", isn't available on this platform
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from iobroker.docker.