Raspberry PI - Instalacja dockerowa

Moderator: fracz

Awatar użytkownika
fracz
Posty: 2256
Rejestracja: pt paź 28, 2016 10:56 pm
Lokalizacja: Kraków

To pisałem już wcześniej, za dużo kawy też nie można :-D
dar3cz3k_
Posty: 103
Rejestracja: śr mar 07, 2018 10:20 pm
Lokalizacja: Brudzowice

Można ogłosić sukces, teraz działa prawidłowo :)
Dzięki wielkie za pomoc!
fast
Posty: 11
Rejestracja: pt mar 09, 2018 8:12 pm

Lector pisze: pt mar 09, 2018 7:41 am U mnie stoi to na Pi Zero W.

Może zakupię drugą sztukę i opiszę gdzieś w osobny wątku jak postawić i jak zrobić aby wstawała bo braku zasilania.
Mam również Pi Zero W i już ze 4 dni próbuję zainstalować według tej instrukcji i dalszymi podpowiedziami ale niestety bez sukcesu. Próbowałem na Raspbian w wersji lite jak i desktop. Za każdym razem tak samo. Uruchomi się supla przez http i pokazuje parametry do podłączenia telefonu jak i urządzenia ale wisi w momencie kiedy chcemy się podłączyć i nie dodaje do konta. Suplę stawiam na sieci wewnętrznej aby nie było wyjścia na "świat".
Nie wiem w czym problem ale podejrzewam, że prawdopodobnie z bazą danych.

Np. u mnie nigdy nie zadziałała komenda: git checkout src

Ale po kolei:
zaraz po instalacji uruchamia się w ten sposób co już jest dziwne:
Creating supla-db ... done
Creating supla-cloud ... done
Creating supla-server ... done
Creating supla-cloud ...
Creating supla-server ...
SUPLA containers has been started.

Chociaż ta instalacja z dzisiaj poszła najgorzej, ale w jednym z logów zawsze to samo:

Kod: Zaznacz cały

pi@raspberrypi:~ $ docker logs --tail=50 supla-server
Illegal instruction (core dumped)
Illegal instruction (core dumped)
Illegal instruction (core dumped)
Illegal instruction (core dumped)
Illegal instruction (core dumped)
Illegal instruction (core dumped)
Illegal instruction (core dumped)
Illegal instruction (core dumped)
Illegal instruction (core dumped)
Illegal instruction (core dumped)
Illegal instruction (core dumped)
Illegal instruction (core dumped)
Illegal instruction (core dumped)
Illegal instruction (core dumped)
Illegal instruction (core dumped)
Illegal instruction (core dumped)
Wykonanie kasowania wygląda tak:

Kod: Zaznacz cały

pi@raspberrypi:~/supla-docker $ rm -fr var/*
rm: cannot remove 'var/mysql/ibdata1': Permission denied
rm: cannot remove 'var/mysql/mysql': Permission denied
Przydałaby się jakaś poprawiona instrukcja dla Pi Zero W jakby ktoś miał czas komu się udało na tym postawić :D
Awatar użytkownika
Lector
Posty: 1398
Rejestracja: pt lis 17, 2017 2:26 pm
Lokalizacja: Poznań
Kontakt:

Dziś zamówiłem drugie Pi Zero W, jak dojdzie to będę na przykładzie pisał. Też miałem problemy i dokładnie już nie pamiętam w którym mocie coś zmieniałem.
Pierwsze jest u mnie w pracy i nie chciał bym rozłączać.
Niespełniony automatyk. :mrgreen:
https://3d-lamp.photos/
Awatar użytkownika
fracz
Posty: 2256
Rejestracja: pt paź 28, 2016 10:56 pm
Lokalizacja: Kraków

fast pisze: pt mar 09, 2018 8:39 pm Np. u mnie nigdy nie zadziałała komenda: git checkout src
Dlatego nie działa dalej.
fast
Posty: 11
Rejestracja: pt mar 09, 2018 8:12 pm

fracz pisze: pt mar 09, 2018 11:22 pm
fast pisze: pt mar 09, 2018 8:39 pm Np. u mnie nigdy nie zadziałała komenda: git checkout src
Dlatego nie działa dalej.
To podpowiedz jak to naprawić bo z komunikatu wynika, że to z powodu starej wersji czy jakoś tak.
Awatar użytkownika
fracz
Posty: 2256
Rejestracja: pt paź 28, 2016 10:56 pm
Lokalizacja: Kraków

Pokaż jaki masz dokładny komunikat z tej komendy. Pomóż sobie pomóc ;-)
fast
Posty: 11
Rejestracja: pt mar 09, 2018 8:12 pm

fracz pisze: sob mar 10, 2018 12:52 pm Pokaż jaki masz dokładny komunikat z tej komendy. Pomóż sobie pomóc ;-)
Jak możesz pomóc to poproszę. Właśnie zrobiłem wszystko od nowa i to jest pierwszy log:

Kod: Zaznacz cały

pi@raspberrypi:~ $ docker logs --tail=50 supla-cloud
 // Warming up the cache for the prod environment with debug
 // false

 [OK] Cache for the "prod" environment (debug=false) was successfully warmed.

New account has been created.
2018-03-10 18:47:30,965 CRIT Supervisor running as root (no user in config file)
2018-03-10 18:47:30,998 INFO supervisord started with pid 1
2018-03-10 18:47:32,012 INFO spawned: 'apache' with pid 45
2018-03-10 18:47:32,042 INFO spawned: 'cron' with pid 46
2018-03-10 18:47:33,063 INFO success: apache entered RUNNING state, process has              stayed up for > than 1 seconds (startsecs)
2018-03-10 18:47:33,065 INFO success: cron entered RUNNING state, process has st             ayed up for > than 1 seconds (startsecs)
AH00558: apache2: Could not reliably determine the server's fully qualified doma             in name, using 172.18.0.3. Set the 'ServerName' directive globally to suppress t             his message
[Sat Mar 10 18:47:35.662400 2018] [ssl:warn] [pid 45] AH01906: 172.18.0.3:443:0              server certificate is a CA certificate (BasicConstraints: CA == TRUE !?)
[Sat Mar 10 18:47:35.666132 2018] [ssl:warn] [pid 45] AH01909: 172.18.0.3:443:0              server certificate does NOT include an ID which matches the server name
AH00558: apache2: Could not reliably determine the server's fully qualified doma             in name, using 172.18.0.3. Set the 'ServerName' directive globally to suppress t             his message
[Sat Mar 10 18:47:36.460768 2018] [ssl:warn] [pid 45] AH01906: 172.18.0.3:443:0              server certificate is a CA certificate (BasicConstraints: CA == TRUE !?)
[Sat Mar 10 18:47:36.464132 2018] [ssl:warn] [pid 45] AH01909: 172.18.0.3:443:0              server certificate does NOT include an ID which matches the server name
[Sat Mar 10 18:47:36.503901 2018] [mpm_prefork:notice] [pid 45] AH00163: Apache/             2.4.10 (Debian) PHP/7.0.26 OpenSSL/1.0.1t configured -- resuming normal operatio             ns
[Sat Mar 10 18:47:36.507188 2018] [core:notice] [pid 45] AH00094: Command line:              'apache2 -D FOREGROUND'
172.18.0.3:80 192.168.1.5 - - [10/Mar/2018:18:50:07 +0000] "GET / HTTP/1.1" 301              681 "-" "Mozilla/5.0 (Windows NT 6.3; Win64; x64; rv:58.0) Gecko/20100101 Firefo             x/58.0"
172.18.0.3:443 192.168.1.5 - - [10/Mar/2018:18:50:17 +0000] "GET / HTTP/1.1" 302              2304 "-" "Mozilla/5.0 (Windows NT 6.3; Win64; x64; rv:58.0) Gecko/20100101 Fire             fox/58.0"
172.18.0.3:443 192.168.1.5 - - [10/Mar/2018:18:50:18 +0000] "GET /auth/login HTT             P/1.1" 200 3338 "-" "Mozilla/5.0 (Windows NT 6.3; Win64; x64; rv:58.0) Gecko/201             00101 Firefox/58.0"
172.18.0.3:443 192.168.1.5 - - [10/Mar/2018:18:50:19 +0000] "GET /assets/css/fon             ts.css HTTP/1.1" 200 2460 "https://192.168.1.13/auth/login" "Mozilla/5.0 (Window             s NT 6.3; Win64; x64; rv:58.0) Gecko/20100101 Firefox/58.0"
172.18.0.3:443 192.168.1.5 - - [10/Mar/2018:18:50:19 +0000] "GET /assets/dist/tr             anslations/messages-pl.e9147dde0f144f02ec47.js HTTP/1.1" 200 9431 "https://192.1             68.1.13/auth/login" "Mozilla/5.0 (Windows NT 6.3; Win64; x64; rv:58.0) Gecko/201             00101 Firefox/58.0"
172.18.0.3:443 192.168.1.5 - - [10/Mar/2018:18:50:19 +0000] "GET /assets/dist/lo             gin-page.05dd178ae263914fe6e0.js HTTP/1.1" 200 13310 "https://192.168.1.13/auth/             login" "Mozilla/5.0 (Windows NT 6.3; Win64; x64; rv:58.0) Gecko/20100101 Firefox             /58.0"
172.18.0.3:443 192.168.1.5 - - [10/Mar/2018:18:50:19 +0000] "GET /assets/dist/co             mmons.c5e890d89fa9c15fc965.js HTTP/1.1" 200 148121 "https://192.168.1.13/auth/lo             gin" "Mozilla/5.0 (Windows NT 6.3; Win64; x64; rv:58.0) Gecko/20100101 Firefox/5             8.0"
172.18.0.3:443 192.168.1.5 - - [10/Mar/2018:18:50:20 +0000] "GET /assets/img/dev             ices.png HTTP/1.1" 200 1906 "https://192.168.1.13/auth/login" "Mozilla/5.0 (Wind             ows NT 6.3; Win64; x64; rv:58.0) Gecko/20100101 Firefox/58.0"
172.18.0.3:443 192.168.1.5 - - [10/Mar/2018:18:50:20 +0000] "GET /assets/img/log             o.svg HTTP/1.1" 200 6380 "https://192.168.1.13/auth/login" "Mozilla/5.0 (Windows              NT 6.3; Win64; x64; rv:58.0) Gecko/20100101 Firefox/58.0"
172.18.0.3:443 192.168.1.5 - - [10/Mar/2018:18:50:20 +0000] "GET /assets/img/use             r.png HTTP/1.1" 200 4690 "https://192.168.1.13/auth/login" "Mozilla/5.0 (Windows              NT 6.3; Win64; x64; rv:58.0) Gecko/20100101 Firefox/58.0"
172.18.0.3:443 192.168.1.5 - - [10/Mar/2018:18:50:20 +0000] "GET /assets/fonts/P             e-icon-7-stroke.woff?d7yf1v HTTP/1.1" 200 44023 "https://192.168.1.13/assets/css             /fonts.css" "Mozilla/5.0 (Windows NT 6.3; Win64; x64; rv:58.0) Gecko/20100101 Fi             refox/58.0"
172.18.0.3:443 192.168.1.5 - - [10/Mar/2018:18:50:20 +0000] "GET /assets/img/ico             ns/supla32.png HTTP/1.1" 200 2279 "-" "Mozilla/5.0 (Windows NT 6.3; Win64; x64;              rv:58.0) Gecko/20100101 Firefox/58.0"
172.18.0.3:443 192.168.1.5 - - [10/Mar/2018:18:50:27 +0000] "GET /auth/servers?u             sername=test%40supla.org HTTP/1.1" 200 524 "https://192.168.1.13/auth/login" "Mo             zilla/5.0 (Windows NT 6.3; Win64; x64; rv:58.0) Gecko/20100101 Firefox/58.0"
172.18.0.3:443 192.168.1.5 - - [10/Mar/2018:18:50:28 +0000] "POST /auth/login?la             ng=pl HTTP/1.1" 302 660 "https://192.168.1.13/auth/login" "Mozilla/5.0 (Windows              NT 6.3; Win64; x64; rv:58.0) Gecko/20100101 Firefox/58.0"
172.18.0.3:443 192.168.1.5 - - [10/Mar/2018:18:50:31 +0000] "GET / HTTP/1.1" 200              4311 "https://192.168.1.13/auth/login" "Mozilla/5.0 (Windows NT 6.3; Win64; x64             ; rv:58.0) Gecko/20100101 Firefox/58.0"
172.18.0.3:443 192.168.1.5 - - [10/Mar/2018:18:50:32 +0000] "GET /assets/img/fla             gs/en.svg HTTP/1.1" 200 2526 "https://192.168.1.13/" "Mozilla/5.0 (Windows NT 6.             3; Win64; x64; rv:58.0) Gecko/20100101 Firefox/58.0"
172.18.0.3:443 192.168.1.5 - - [10/Mar/2018:18:50:32 +0000] "GET /assets/img/fla             gs/de.svg HTTP/1.1" 200 1252 "https://192.168.1.13/" "Mozilla/5.0 (Windows NT 6.             3; Win64; x64; rv:58.0) Gecko/20100101 Firefox/58.0"
172.18.0.3:443 192.168.1.5 - - [10/Mar/2018:18:50:32 +0000] "GET /assets/img/fla             gs/pt.svg HTTP/1.1" 200 12851 "https://192.168.1.13/" "Mozilla/5.0 (Windows NT 6             .3; Win64; x64; rv:58.0) Gecko/20100101 Firefox/58.0"
172.18.0.3:443 192.168.1.5 - - [10/Mar/2018:18:50:32 +0000] "GET /assets/img/fla             gs/pl.svg HTTP/1.1" 200 1197 "https://192.168.1.13/" "Mozilla/5.0 (Windows NT 6.             3; Win64; x64; rv:58.0) Gecko/20100101 Firefox/58.0"
172.18.0.3:443 192.168.1.5 - - [10/Mar/2018:18:50:32 +0000] "GET /assets/img/ste             p-1.svg HTTP/1.1" 200 3890 "https://192.168.1.13/" "Mozilla/5.0 (Windows NT 6.3;              Win64; x64; rv:58.0) Gecko/20100101 Firefox/58.0"
172.18.0.3:443 192.168.1.5 - - [10/Mar/2018:18:50:32 +0000] "GET /assets/img/fla             gs/ru.svg HTTP/1.1" 200 1280 "https://192.168.1.13/" "Mozilla/5.0 (Windows NT 6.             3; Win64; x64; rv:58.0) Gecko/20100101 Firefox/58.0"
172.18.0.3:443 192.168.1.5 - - [10/Mar/2018:18:50:32 +0000] "GET /assets/img/fla             gs/it.svg HTTP/1.1" 200 796 "https://192.168.1.13/" "Mozilla/5.0 (Windows NT 6.3             ; Win64; x64; rv:58.0) Gecko/20100101 Firefox/58.0"
172.18.0.3:443 192.168.1.5 - - [10/Mar/2018:18:50:32 +0000] "GET /assets/img/fla             gs/fr.svg HTTP/1.1" 200 658 "https://192.168.1.13/" "Mozilla/5.0 (Windows NT 6.3             ; Win64; x64; rv:58.0) Gecko/20100101 Firefox/58.0"
172.18.0.3:443 192.168.1.5 - - [10/Mar/2018:18:50:32 +0000] "GET /assets/img/ste             p-2.svg HTTP/1.1" 200 1876 "https://192.168.1.13/" "Mozilla/5.0 (Windows NT 6.3;              Win64; x64; rv:58.0) Gecko/20100101 Firefox/58.0"
172.18.0.3:443 192.168.1.5 - - [10/Mar/2018:18:50:32 +0000] "GET /assets/dist/8.             2e17c25c07274305fc0d.js HTTP/1.1" 200 1019 "https://192.168.1.13/" "Mozilla/5.0              (Windows NT 6.3; Win64; x64; rv:58.0) Gecko/20100101 Firefox/58.0"
172.18.0.3:443 192.168.1.5 - - [10/Mar/2018:18:50:32 +0000] "GET /assets/fonts/q             uicksand-regular-webfont.woff HTTP/1.1" 200 32746 "https://192.168.1.13/assets/c             ss/fonts.css" "Mozilla/5.0 (Windows NT 6.3; Win64; x64; rv:58.0) Gecko/20100101              Firefox/58.0"
172.18.0.3:443 192.168.1.5 - - [10/Mar/2018:18:50:32 +0000] "GET /assets/fonts/q             uicksand-light-webfont.woff HTTP/1.1" 200 36075 "https://192.168.1.13/assets/css             /fonts.css" "Mozilla/5.0 (Windows NT 6.3; Win64; x64; rv:58.0) Gecko/20100101 Fi             refox/58.0"
172.18.0.3:443 192.168.1.5 - - [10/Mar/2018:18:50:32 +0000] "GET /assets/img/fla             gs/es.svg HTTP/1.1" 200 148310 "https://192.168.1.13/" "Mozilla/5.0 (Windows NT              6.3; Win64; x64; rv:58.0) Gecko/20100101 Firefox/58.0"
172.18.0.3:80 127.0.0.1 - - [10/Mar/2018:18:50:38 +0000] "OPTIONS * HTTP/1.0" 20             0 126 "-" "Apache/2.4.10 (Debian) PHP/7.0.26 OpenSSL/1.0.1t (internal dummy conn             ection)"
172.18.0.3:80 127.0.0.1 - - [10/Mar/2018:18:50:39 +0000] "OPTIONS * HTTP/1.0" 20             0 126 "-" "Apache/2.4.10 (Debian) PHP/7.0.26 OpenSSL/1.0.1t (internal dummy conn             ection)"
drugi log jest taki sam jak wyżej :)

a to trzeci:

Kod: Zaznacz cały

pi@raspberrypi:~ $ docker logs --tail=50 supla-db
/usr/bin/mysql_secure_installation

which will also give you the option of removing the test
databases and anonymous user created by default.  This is
strongly recommended for production servers.

See the manual for more instructions.

You can start the MySQL daemon with:
cd /usr ; /usr/bin/mysqld_safe &

You can test the MySQL daemon with mysql-test-run.pl
cd /usr/mysql-test ; perl mysql-test-run.pl

Please report any problems at http://bugs.mysql.com/

Database initialized
180310 18:42:18 [Warning] Using unique option prefix key_buffer instead of key_buffer_size is deprecated and will be removed in a future release. Please use the full name instead.
180310 18:42:18 [Note] mysqld (mysqld 5.5.58-0+deb7u1) starting as process 1 ...
180310 18:42:18 [Warning] Using unique option prefix myisam-recover instead of myisam-recover-options is deprecated and will be removed in a future release. Please use the full name instead.
180310 18:42:18 [Note] Plugin 'FEDERATED' is disabled.
180310 18:42:18 InnoDB: The InnoDB memory heap is disabled
180310 18:42:18 InnoDB: Mutexes and rw_locks use GCC atomic builtins
180310 18:42:18 InnoDB: Compressed tables use zlib 1.2.7
180310 18:42:18 InnoDB: Using Linux native AIO
180310 18:42:18 InnoDB: Initializing buffer pool, size = 128.0M
180310 18:42:18 InnoDB: Completed initialization of buffer pool
InnoDB: The first specified data file ./ibdata1 did not exist:
InnoDB: a new database to be created!
180310 18:42:18  InnoDB: Setting file ./ibdata1 size to 10 MB
InnoDB: Database physically writes the file full: wait...
180310 18:42:20  InnoDB: Log file ./ib_logfile0 did not exist: new to be created
InnoDB: Setting log file ./ib_logfile0 size to 5 MB
InnoDB: Database physically writes the file full: wait...
180310 18:42:21  InnoDB: Log file ./ib_logfile1 did not exist: new to be created
InnoDB: Setting log file ./ib_logfile1 size to 5 MB
InnoDB: Database physically writes the file full: wait...
InnoDB: Doublewrite buffer not found: creating new
InnoDB: Doublewrite buffer created
InnoDB: 127 rollback segment(s) active.
InnoDB: Creating foreign key constraint system tables
InnoDB: Foreign key constraint system tables created
180310 18:42:35  InnoDB: Waiting for the background threads to start
180310 18:42:36 InnoDB: 5.5.58 started; log sequence number 0
180310 18:42:36 [Note] Server hostname (bind-address): '0.0.0.0'; port: 3306
180310 18:42:36 [Note]   - '0.0.0.0' resolves to '0.0.0.0';
180310 18:42:36 [Note] Server socket created on IP: '0.0.0.0'.
180310 18:42:36 [Note] Event Scheduler: Loaded 0 events
180310 18:42:36 [Note] mysqld: ready for connections.
Version: '5.5.58-0+deb7u1'  socket: '/var/run/mysqld/mysqld.sock'  port: 3306  (Debian)
To teraz podpowiedz, które czynności mam dalej wykonać ?

A i dodam, że loguję się przez http, stronka wygląda jak powinna ale do bazy już nic nie zarejestruje się.
Awatar użytkownika
fracz
Posty: 2256
Rejestracja: pt paź 28, 2016 10:56 pm
Lokalizacja: Kraków

To są już logi działającej aplikacji. Zaloguj się na konto stworzone przy inicjalizacji (to które wpisałeś w pliku .env). Do rejestracji musisz skonfigurować wysyłajkę mailową. Nie chcesz tego robić.
fast
Posty: 11
Rejestracja: pt mar 09, 2018 8:12 pm

Zalogować to się zalogowałem przez www ale nie mogę połączyć się z telefonu a i wysyłanie maili nie jest mi potrzebne. Po skonfigurowaniu podanych przez stronę parametrów tj. ID i hasła po prostu logowanie stoi w miejscu. A i nie chcę innych kont, wystarczy mi to jedno które konfigurowałem w .env
ODPOWIEDZ

Wróć do „supla-docker”