[tutorial] Raspberry Pi – Docker, Proxy, Let’s Encrypt, SUPLA, SUPLA-Scripts...

stroXo
Posts: 31
Joined: Wed Jun 17, 2020 11:09 pm

Post

lesny8 wrote: Thu Jun 25, 2020 9:22 pm Poradnik był pisany trochę czasu temu, kiedy dystrybucją na RPi było strech. Niemniej jednak na busterze też bez problemu można wszystko postawić. Teraz Raspbian się przechrzcił na Raspberry Pi OS i jak u Ciebie widać, też wszystko hula.
Przekierowania portów masz, Konfig wygląda ok.
Kontenery wystartowały prawidłowo, żaden się nie restartuje.
Problem miałeś po stronie przeglądarki. Skrypty połącz dopiero jak będziesz miał chociażby jedno urządzenie zarejestrowane w Cloud.

Certyfikaty zostały wystawione? Jak nie to sprawdź logi kontenerów proxy.
nie wiem czy o to prosiłeś ale liczę że tak

Code: Select all

docker logs --tail=50 nginx-letsencrypt
Creating/renewal scr.suplauherce.online certificates... (scr.suplauherce.online)
2020-06-25 20:32:06,266:INFO:simp_le:1414: Generating new certificate private key
2020-06-25 20:32:35,371:ERROR:simp_le:1396: CA marked some of the authorizations as invalid, which likely means it could not access http://example.com/.well-known/acme-challenge/X. Did you set correct path in -d example.com:path or --default_root? Are all your domains accessible from the internet? Please check your domains' DNS entries, your host's network/firewall setup and your webserver config. If a domain's DNS entry has both A and AAAA fields set up, some CAs such as Let's Encrypt will perform the challenge validation over IPv6. If your DNS provider does not answer correctly to CAA records request, Let's Encrypt won't issue a certificate for your domain (see https://letsencrypt.org/docs/caa/). Failing authorizations: https://acme-v02.api.letsencrypt.org/acme/authz-v3/5475851725
Challenge validation has failed, see error log.

Debugging tips: -v improves output verbosity. Help is available under --help.
/app
/etc/nginx/certs/suplauherce.online /app
Creating/renewal suplauherce.online certificates... (suplauherce.online)
2020-06-25 20:32:37,893:INFO:simp_le:1414: Generating new certificate private key
2020-06-25 20:32:57,425:ERROR:simp_le:1396: CA marked some of the authorizations as invalid, which likely means it could not access http://example.com/.well-known/acme-challenge/X. Did you set correct path in -d example.com:path or --default_root? Are all your domains accessible from the internet? Please check your domains' DNS entries, your host's network/firewall setup and your webserver config. If a domain's DNS entry has both A and AAAA fields set up, some CAs such as Let's Encrypt will perform the challenge validation over IPv6. If your DNS provider does not answer correctly to CAA records request, Let's Encrypt won't issue a certificate for your domain (see https://letsencrypt.org/docs/caa/). Failing authorizations: https://acme-v02.api.letsencrypt.org/acme/authz-v3/5475855695
Challenge validation has failed, see error log.

Debugging tips: -v improves output verbosity. Help is available under --help.
/app
Sleep for 3600s
/etc/nginx/certs/scr.suplauherce.online /app
Creating/renewal scr.suplauherce.online certificates... (scr.suplauherce.online)
2020-06-25 21:33:00,235:INFO:simp_le:1414: Generating new certificate private key
2020-06-25 21:33:21,611:ERROR:simp_le:1396: CA marked some of the authorizations as invalid, which likely means it could not access http://example.com/.well-known/acme-challenge/X. Did you set correct path in -d example.com:path or --default_root? Are all your domains accessible from the internet? Please check your domains' DNS entries, your host's network/firewall setup and your webserver config. If a domain's DNS entry has both A and AAAA fields set up, some CAs such as Let's Encrypt will perform the challenge validation over IPv6. If your DNS provider does not answer correctly to CAA records request, Let's Encrypt won't issue a certificate for your domain (see https://letsencrypt.org/docs/caa/). Failing authorizations: https://acme-v02.api.letsencrypt.org/acme/authz-v3/5476658788
Challenge validation has failed, see error log.

Debugging tips: -v improves output verbosity. Help is available under --help.
/app
/etc/nginx/certs/suplauherce.online /app
Creating/renewal suplauherce.online certificates... (suplauherce.online)
2020-06-25 21:33:24,071:INFO:simp_le:1414: Generating new certificate private key
2020-06-25 21:33:54,241:ERROR:simp_le:1396: CA marked some of the authorizations as invalid, which likely means it could not access http://example.com/.well-known/acme-challenge/X. Did you set correct path in -d example.com:path or --default_root? Are all your domains accessible from the internet? Please check your domains' DNS entries, your host's network/firewall setup and your webserver config. If a domain's DNS entry has both A and AAAA fields set up, some CAs such as Let's Encrypt will perform the challenge validation over IPv6. If your DNS provider does not answer correctly to CAA records request, Let's Encrypt won't issue a certificate for your domain (see https://letsencrypt.org/docs/caa/). Failing authorizations: https://acme-v02.api.letsencrypt.org/acme/authz-v3/5476665226
Challenge validation has failed, see error log.

Debugging tips: -v improves output verbosity. Help is available under --help.
/app
Sleep for 3600s
/etc/nginx/certs/scr.suplauherce.online /app
Creating/renewal scr.suplauherce.online certificates... (scr.suplauherce.online)
2020-06-25 22:33:57,107:INFO:simp_le:1414: Generating new certificate private key
ACME server returned an error: urn:ietf:params:acme:error:serverInternal :: The server experienced an internal error :: Error retrieving account "https://acme-v02.api.letsencrypt.org/acme/acct/89755293"


Debugging tips: -v improves output verbosity. Help is available under --help.
/app
/etc/nginx/certs/suplauherce.online /app
Creating/renewal suplauherce.online certificates... (suplauherce.online)
2020-06-25 22:34:12,186:INFO:simp_le:1414: Generating new certificate private key
2020-06-25 22:34:35,128:ERROR:simp_le:1396: CA marked some of the authorizations as invalid, which likely means it could not access http://example.com/.well-known/acme-challenge/X. Did you set correct path in -d example.com:path or --default_root? Are all your domains accessible from the internet? Please check your domains' DNS entries, your host's network/firewall setup and your webserver config. If a domain's DNS entry has both A and AAAA fields set up, some CAs such as Let's Encrypt will perform the challenge validation over IPv6. If your DNS provider does not answer correctly to CAA records request, Let's Encrypt won't issue a certificate for your domain (see https://letsencrypt.org/docs/caa/). Failing authorizations: https://acme-v02.api.letsencrypt.org/acme/authz-v3/5477543252
Challenge validation has failed, see error log.

Debugging tips: -v improves output verbosity. Help is available under --help.
/app
Sleep for 3600s
stroXo
Posts: 31
Joined: Wed Jun 17, 2020 11:09 pm

Post

Goral64 wrote: Thu Jun 25, 2020 10:35 pm Nie, przeczytaj jeszcze raz dokładnie to co napisałem.
ok więc tak najpierw

Code: Select all

cd supla-scripts/docker
następnie

Code: Select all

nano docker-composer.local.yml
wkleić

Code: Select all

version: '3'
services:
  suplascripts:
    extra_hosts:
      - "suplaxxxxxx.online  192.168.0.200"


zapisać

następnie stopujemy kontener supla-scripts

Code: Select all

./supla-scripts/docker/suplascripts.sh stop
teraz edytujemy env

Code: Select all

nano supla-scripts/docker/.env
po edycji wygląda tak

Code: Select all

DATABASE_PASSWORD=CQpwhMwNYR3DPfjZmaRGOV3txLsgNnM2

VOLUME_SOURCES=../
VOLUME_DATA=../var


##### STANDALONE MODE CONFIGURATION #####
#PORT_HTTP=80
#PORT_HTTPS=443


##### PROXIED MODE CONFIGURATION #####
DOMAIN_NAME=scr.suplaxxxxxx.online
[email protected]

COMPOSE_PROJECT_NAME=suplascripts
COMPOSE_PATH_SEPARATOR=:
COMPOSE_FILE=docker-compose.base.yml:docker-compose.proxy.yml:docker-compose.arm32v7.yml:docker-composer.local.yml
i startujemy kontenery

Code: Select all

./supla-scripts/docker/suplascripts.sh start

wywala takie coś

Code: Select all

Starting SUPLA Scripts containers
Traceback (most recent call last):
  File "/usr/local/bin/docker-compose", line 10, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.7/dist-packages/compose/cli/main.py", line 72, in main
    command()
  File "/usr/local/lib/python3.7/dist-packages/compose/cli/main.py", line 125, in perform_command
    project = project_from_options('.', options)
  File "/usr/local/lib/python3.7/dist-packages/compose/cli/command.py", line 76, in project_from_options
    environment_file=environment_file
  File "/usr/local/lib/python3.7/dist-packages/compose/cli/command.py", line 135, in get_project
    config_data = config.load(config_details, compatibility, interpolate)
  File "/usr/local/lib/python3.7/dist-packages/compose/config/config.py", line 411, in load
    service_dicts = load_services(config_details, main_file, compatibility, interpolate=interpolate)
  File "/usr/local/lib/python3.7/dist-packages/compose/config/config.py", line 508, in load_services
    service_config = functools.reduce(merge_services, service_configs)
  File "/usr/local/lib/python3.7/dist-packages/compose/config/config.py", line 501, in merge_services
    for name in all_service_names
  File "/usr/local/lib/python3.7/dist-packages/compose/config/config.py", line 501, in <dictcomp>
    for name in all_service_names
  File "/usr/local/lib/python3.7/dist-packages/compose/config/config.py", line 1050, in merge_service_dicts_from_files
    new_service = merge_service_dicts(base, override, version)
  File "/usr/local/lib/python3.7/dist-packages/compose/config/config.py", line 1116, in merge_service_dicts
    md.merge_mapping('extra_hosts', parse_extra_hosts)
  File "/usr/local/lib/python3.7/dist-packages/compose/config/config.py", line 1085, in merge_mapping
    self[field].update(parse_func(self.override.get(field)))
  File "/usr/local/lib/python3.7/dist-packages/compose/config/types.py", line 122, in parse_extra_hosts
    host, ip = extra_hosts_line.split(':', 1)
ValueError: not enough values to unpack (expected 2, got 1)
gdzie błąd?
User avatar
lesny8
Posts: 3132
Joined: Mon Dec 11, 2017 9:43 pm
Has thanked: 10 times
Been thanked: 9 times

Post

Musi być : pomiędzy domeną a adresem

Code: Select all

version: '3'

services:
  suplascripts:
    extra_hosts:
      - "mojadomena.pl:192.168.0.2"

Co do certyfikatu to nie wystawia się bo domena nie została zwalidowana.
Sprawdź czy z zewnątrz możesz wejść na Cloud.
SOP 2023 :heavy_check_mark:
SOP 2024 :heavy_check_mark:
Czekam na kolejne Supla Offline Party :upside_down_face:
🧩: 🔑cz->b ⛴️+ila
User avatar
Goral64
Posts: 3258
Joined: Fri Dec 27, 2019 6:22 pm
Location: Żerniki Wrocławskie
Has thanked: 2 times
Been thanked: 1 time

Post

lesny8 wrote: Fri Jun 26, 2020 5:38 am Musi być : pomiędzy domeną a adresem
Faktycznie, mój błąd, skopiowałem z wpisu do hosts :(
Widzimy się na Supla Offline Party Season 2026 :D

Image
effendi
Posts: 165
Joined: Wed Apr 26, 2017 9:36 am

Post

Witam, przy próbie instalacji dockera supli na RPi3 otrzymuję komunikat błędu
readlink /var/lib/docker/ocerlay2: invalid argument
Jak sobie z tym poradzić?
Pogodynka >>
User avatar
lesny8
Posts: 3132
Joined: Mon Dec 11, 2017 9:43 pm
Has thanked: 10 times
Been thanked: 9 times

Post

https://stackoverflow.com/questions/553 ... d-argument
Wygląda na to, że któryś obraz błędnie się pobrał
SOP 2023 :heavy_check_mark:
SOP 2024 :heavy_check_mark:
Czekam na kolejne Supla Offline Party :upside_down_face:
🧩: 🔑cz->b ⛴️+ila
stroXo
Posts: 31
Joined: Wed Jun 17, 2020 11:09 pm

Post

lesny8 wrote: Fri Jun 26, 2020 5:38 am Musi być : pomiędzy domeną a adresem

Code: Select all

version: '3'

services:
  suplascripts:
    extra_hosts:
      - "mojadomena.pl:192.168.0.2"

Co do certyfikatu to nie wystawia się bo domena nie została zwalidowana.
Sprawdź czy z zewnątrz możesz wejść na Cloud.
po dodaniu :

odpaliły się kontenery

co do wejścia z zewnątrz jest tak jak napisałem wcześniej

Sprawdzam czy po wpisaniu adresu http://suplaxxxxxx.online na komputerze poza siecią LAN coś da otrzymuje

Code: Select all

TA witryna jest nieosiągalna
Sprawdzam czy po wpisaniu adresu http://scr.suplaxxxxxx.online na komputerze poza siecią LAN coś da otrzymuje

Code: Select all

TA witryna jest nieosiągalna
Sprawdzam czy po wpisaniu adresu https://suplaxxxxxx.online na komputerze poza siecią LAN coś da otrzymuje

Code: Select all

Połączenie nie jest prywatne
Wybieram zaawansowane i połącz mimo to, wyskakuje

Code: Select all

500 Internal Server Error    nginx/1.19.0
Sprawdzam czy po wpisaniu adresu https://scr.suplaxxxxxx.online na komputerze poza siecią LAN coś da otrzymuje

Code: Select all

Połączenie nie jest prywatne
Wybieram zaawansowane i połącz mimo to, wyskakuje

Code: Select all

500 Internal Server Error    nginx/1.19.0
wiec nadal gdzieś jest problem


dodam tylko że jeśli chcę dodać do supla cloud urządzenie wpisując w configu urządzenia nazwę serwera oraz email bo tylko to mogę nie dodaje się do supla cloud do której mogę po Lanie wejść
User avatar
Goral64
Posts: 3258
Joined: Fri Dec 27, 2019 6:22 pm
Location: Żerniki Wrocławskie
Has thanked: 2 times
Been thanked: 1 time

Post

A jak na swoim komputerze w LAN wpiszesz

Code: Select all

ping suplaxxxxxx.online
to co dostajesz?
Oczywiście bez wpisów suplaxxxxxx.online w pliku hosts na tym komputerze.
Widzimy się na Supla Offline Party Season 2026 :D

Image
stroXo
Posts: 31
Joined: Wed Jun 17, 2020 11:09 pm

Post

Goral64 wrote: Fri Jun 26, 2020 7:37 am A jak na swoim komputerze w LAN wpiszesz

Code: Select all

ping suplaxxxxxx.online
to co dostajesz?
Oczywiście bez wpisów suplaxxxxxx.online w pliku hosts na tym komputerze.
usunąłem wpisy w pliku host pingując otrzymuje

Code: Select all

C:\Users\striXunio>ping suplaxxxxxx.online

Pinging suplaxxxxxx.online [195.8.52.203] with 32 bytes of data:
Reply from 195.8.52.203: bytes=32 time<1ms TTL=64
Reply from 195.8.52.203: bytes=32 time<1ms TTL=64
Reply from 195.8.52.203: bytes=32 time<1ms TTL=64
Reply from 195.8.52.203: bytes=32 time<1ms TTL=64

Ping statistics for 195.8.52.203:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
    Minimum = 0ms, Maximum = 0ms, Average = 0ms
User avatar
lesny8
Posts: 3132
Joined: Mon Dec 11, 2017 9:43 pm
Has thanked: 10 times
Been thanked: 9 times

Post

Uff.. ale się zakręciłem :roll: :oops: Kto widział ten wie :lol:
SOP 2023 :heavy_check_mark:
SOP 2024 :heavy_check_mark:
Czekam na kolejne Supla Offline Party :upside_down_face:
🧩: 🔑cz->b ⛴️+ila

Return to “FAQ / Jak to zrobić”