Hardware
- Raspberry Pi 2
Now that my domain is accessible, I run into the next problem.
That being that https://duniter-folatt.nohost.me/webui returns 502 Bad Gateway
I’ve also tried accessing the webui after starting duniter webstart with the same result.
I also downloaded and modified the duniter.service file from github to my Yunohost.
/lib/systemd/system/duniter.service
[Unit]
Description=Duniter node
After=network.target
ConditionPathExists=/root/.config/duniter/duniter_default/duniter.db
[Service]
Group=root
User=root
Type=forking
ExecStart=/usr/bin/duniter webstart
ExecReload=/usr/bin/duniter webrestart
ExecStop=/usr/bin/duniter stop
Restart=on-failure
[Install]
WantedBy=multi-user.target
admin@Xroklaus:~ $ sudo systemctl status duniter
● duniter.service - Duniter node
Loaded: loaded (/lib/systemd/system/duniter.service; enabled)
Active: active (running) since Sun 2017-10-29 12:55:17 CET; 1min 39s ago
Process: 709 ExecStart=/usr/bin/duniter webstart (code=exited, status=0/SUCCESS)
Main PID: 1775 (duniter_default)
CGroup: /system.slice/duniter.service
└─1775 duniter_default
Oct 29 12:55:03 Xroklaus duniter[709]: Starting duniter_default daemon...
Oct 29 12:55:17 Xroklaus duniter[709]: duniter_default daemon started. PID: 1775
Oct 29 12:55:17 Xroklaus systemd[1]: Started Duniter node.
/root/.config/duniter/duniter_default/duniter.log
2017-10-29T12:42:43+01:00 - ^[[32minfo^[[39m: Block resolution: 0 potential blocks for root block...
2017-10-29T12:42:44+01:00 - ^[[32minfo^[[39m: Web administration accessible at following address: http://localhost:9220
2017-10-29T12:52:46+01:00 - ^[[32minfo^[[39m: Block resolution: 0 potential blocks for root block...
2017-10-29T12:52:47+01:00 - ^[[32minfo^[[39m: Web administration accessible at following address: http://localhost:9220
2017-10-29T12:55:17+01:00 - ^[[32minfo^[[39m: Block resolution: 0 potential blocks for root block...
2017-10-29T12:55:17+01:00 - ^[[32minfo^[[39m: Web administration accessible at following address: http://localhost:9220
/etc/hosts
::1 localhost ip6-localhost ip6-loopback
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
127.0.1.1 Xroklaus
/var/log/nginx/duniter-folatt.nohost.me-error.log
2017/10/29 12:58:19 [error] 1008#0: *13 connect() failed (111: Connection refused) while connecting to upstream, client: 83.163.103.119, server: duniter-folatt.nohost.me, request: "GET /webui HTTP/1.1", upstream: "http://127.0.0.1:9220/", host: "duniter-folatt.nohost.me", referrer: "https://duniter-folatt.nohost.me/yunohost/sso/?r=aHR0cHM6Ly9kdW5pdGVyLWZvbGF0dC5ub2hvc3QubWUvd2VidWk="
/etc/nginx/conf.d/duniter-folatt.nohost.me.d/duniter.conf
location / {
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_set_header X-NginX-Proxy true;
proxy_pass http://127.0.0.1:10901;
proxy_redirect off;
# Socket.io support
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_read_timeout 86400s;
proxy_send_timeout 86400s;
location ~ \.(js|css|woff|woff2|ttf|png) {
proxy_pass http://127.0.0.1:9220;
access_by_lua_file /usr/share/ssowat/access.lua;
}
location /cesium {
proxy_pass http://127.0.0.1:9220;
access_by_lua_file /usr/share/ssowat/access.lua;
# Include SSOWAT user panel.
include conf.d/yunohost_panel.conf.inc;
}
location /webui {
proxy_pass http://127.0.0.1:9220/;
access_by_lua_file /usr/share/ssowat/access.lua;
# Include SSOWAT user panel.
include conf.d/yunohost_panel.conf.inc;
}
location ~ /webmin {
proxy_pass http://127.0.0.1:9220$uri;
access_by_lua_file /usr/share/ssowat/access.lua;
}
location ~ /modules {
proxy_pass http://127.0.0.1:9220;
access_by_lua_file /usr/share/ssowat/access.lua;
}
}
Port listening check
sudo netstat -tnlp | grep :9220
tcp6 0 0 ::1:9220 :::* LISTEN 1775/duniter_defaul