frenck
(Franck Nijhof)
November 27, 2017, 10:50am
21
According to the logs, the add-on is running fine!
Nevertheless, it seems like you are trying to connect to the web interface using an HTTP URL since you’ve enabled SSL, you must use an HTTPS URL.
Connecting using HTTP to this add-on with SSL enabled will cause issues.
i don’t think im using http, since this is in my configuration:
terminal_url: https://mydns.duckdns.org:9748
when hovering the Webui button, the https:// link is displayed just a it should, indicating a correct configuration.
had 7681 before obviously
is there any other place i need to configure https?
------edit—
I’ve changed the location in the configuration to https://hassio.local:7681 , and then it seemingly starts off just fine:
starting version 3.2.2
INFO: Starting the ttyd daemon
[2017/11/27 12:05:52:6679] NOTICE: ttyd 1.3.2 (libwebsockets 2.2.0)
[2017/11/27 12:05:52:6681] NOTICE: tty configuration:
[2017/11/27 12:05:52:6681] NOTICE: credential: SGFzc0Jvc3M6MG5seU1lIQ==
[2017/11/27 12:05:52:6681] NOTICE: start command: tmux new -A -s ttyd zsh
[2017/11/27 12:05:52:6682] NOTICE: reconnect timeout: 30s
[2017/11/27 12:05:52:6682] NOTICE: close signal: SIGHUP (1)
[2017/11/27 12:05:52:6683] NOTICE: Initial logging level 7
[2017/11/27 12:05:52:6683] NOTICE: Libwebsockets version: 2.2.0 [email protected]
[2017/11/27 12:05:52:6683] NOTICE: IPV6 not compiled in
[2017/11/27 12:05:52:6684] NOTICE: libev support not compiled in
[2017/11/27 12:05:52:6684] NOTICE: libuv support not compiled in
[2017/11/27 12:05:52:6729] NOTICE: Threads: 1 each 1048576 fds
[2017/11/27 12:05:52:6915] NOTICE: mem: platform fd map: 4194304 bytes
[2017/11/27 12:05:52:6918] NOTICE: Compiled with OpenSSL support
[2017/11/27 12:05:52:6919] NOTICE: Doing SSL library init
[2017/11/27 12:05:52:7005] NOTICE: Creating Vhost 'default' port 7681, 2 protocols, IPv6 off
[2017/11/27 12:05:52:7006] NOTICE: SSL ciphers: 'takentheseoutforsecurityhere] NOTICE: Using SSL mode
[2017/11/27 12:05:52:7022] ERR: lws_context_init_server_ssl: SSL_CTX_load_verify_locations unhappy
[2017/11/27 12:05:52:7077] NOTICE: SSL ECDH curve 'prime256v1'
[2017/11/27 12:05:52:7095] NOTICE: Listening on port 7681
[2017/11/27 12:05:52:7096] NOTICE: mem: per-conn: 448 bytes + protocol rx buf
[2017/11/27 12:05:52:7097] NOTICE: canonical_hostname = a0d7b954-terminal
[2017/11/27 12:05:52:7097] NOTICE: listening on port 7681
[2017/11/27 12:06:44:5839] NOTICE: HTTP / - (104-238-169-17.choopa.net)
[2017/11/27 12:06:44:8701] NOTICE: HTTP /auth_token.js - (104-238-169-17.choopa.net)
[2017/11/27 12:06:45:1225] NOTICE: WS /ws - (104-238-169-17.choopa.net), clients: 1
[2017/11/27 12:06:45:1541] NOTICE: HTTP /favicon.ico - (104-238-169-17.choopa.net)
[2017/11/27 12:06:45:1586] NOTICE: started process, pid: 616
[2017/11/27 12:06:45:2314] NOTICE: HTTP /favicon.ico - (104-238-169-17.choopa.net)
1 minute later this happens:
./run: line 42: 614 Segmentation fault (core dumped) ttyd "${ttyd_options[@]}" "${TTYD_COMMAND[@]}"
INFO: Starting the ttyd daemon
[2017/11/27 12:07:15:8432] NOTICE: ttyd 1.3.2 (libwebsockets 2.2.0)
[2017/11/27 12:07:15:8433] NOTICE: tty configuration:
[2017/11/27 12:07:15:8433] NOTICE: credential: SGFzc0Jvc3M6MG5seU1lIQ==
[2017/11/27 12:07:15:8433] NOTICE: start command: tmux new -A -s ttyd zsh
[2017/11/27 12:07:15:8434] NOTICE: reconnect timeout: 30s
[2017/11/27 12:07:15:8434] NOTICE: close signal: SIGHUP (1)
[2017/11/27 12:07:15:8435] NOTICE: Initial logging level 7
[2017/11/27 12:07:15:8435] NOTICE: Libwebsockets version: 2.2.0 [email protected]
[2017/11/27 12:07:15:8435] NOTICE: IPV6 not compiled in
[2017/11/27 12:07:15:8435] NOTICE: libev support not compiled in
[2017/11/27 12:07:15:8435] NOTICE: libuv support not compiled in
[2017/11/27 12:07:15:8438] NOTICE: Threads: 1 each 1048576 fds
[2017/11/27 12:07:15:8639] NOTICE: mem: platform fd map: 4194304 bytes
[2017/11/27 12:07:15:8642] NOTICE: Compiled with OpenSSL support
[2017/11/27 12:07:15:8642] NOTICE: Doing SSL library init
[2017/11/27 12:07:15:8726] NOTICE: Creating Vhost 'default' port 7681, 2 protocols, IPv6 off
[2017/11/27 12:07:15:8726] NOTICE: SSL ciphers: 'takentheseoutforsecurityhere]] NOTICE: Using SSL mode
[2017/11/27 12:07:15:8732] ERR: lws_context_init_server_ssl: SSL_CTX_load_verify_locations unhappy
[2017/11/27 12:07:15:8782] NOTICE: SSL ECDH curve 'prime256v1'
[2017/11/27 12:07:15:8795] ERR: ERROR on binding fd 6 to port 7681 (-1 98)
[2017/11/27 12:07:15:8796] ERR: init server failed
[2017/11/27 12:07:15:8796] ERR: Failed to create default vhost
[2017/11/27 12:07:15:8796] ERR: libwebsockets init failed
INFO: Starting the ttyd daemon
[2017/11/27 12:07:17:0979] NOTICE: ttyd 1.3.2 (libwebsockets 2.2.0)
[2017/11/27 12:07:17:0982] NOTICE: tty configuration:
[2017/11/27 12:07:17:0983] NOTICE: credential: SGFzc0Jvc3M6MG5seU1lIQ==
[2017/11/27 12:07:17:0991] NOTICE: start command: tmux new -A -s ttyd zsh
[2017/11/27 12:07:17:0992] NOTICE: reconnect timeout: 30s
[2017/11/27 12:07:17:0992] NOTICE: close signal: SIGHUP (1)
[2017/11/27 12:07:17:0993] NOTICE: Initial logging level 7
[2017/11/27 12:07:17:0994] NOTICE: Libwebsockets version: 2.2.0 [email protected]
[2017/11/27 12:07:17:0994] NOTICE: IPV6 not compiled in
[2017/11/27 12:07:17:0995] NOTICE: libev support not compiled in
[2017/11/27 12:07:17:0996] NOTICE: libuv support not compiled in
[2017/11/27 12:07:17:0999] NOTICE: Threads: 1 each 1048576 fds
[2017/11/27 12:07:17:1322] NOTICE: mem: platform fd map: 4194304 bytes
[2017/11/27 12:07:17:1326] NOTICE: Compiled with OpenSSL support
[2017/11/27 12:07:17:1331] NOTICE: Doing SSL library init
[2017/11/27 12:07:17:1482] NOTICE: Creating Vhost 'default' port 7681, 2 protocols, IPv6 off
[2017/11/27 12:07:17:1483] NOTICE: SSL ciphers: 'takentheseoutforsecurityhere]] NOTICE: Using SSL mode
[2017/11/27 12:07:17:1500] ERR: lws_context_init_server_ssl: SSL_CTX_load_verify_locations unhappy
[2017/11/27 12:07:17:1606] NOTICE: SSL ECDH curve 'prime256v1'
[2017/11/27 12:07:17:1636] ERR: ERROR on binding fd 6 to port 7681 (-1 98)
[2017/11/27 12:07:17:1637] ERR: init server failed
[2017/11/27 12:07:17:1644] ERR: Failed to create default vhost
[2017/11/27 12:07:17:1645] ERR: libwebsockets init failed
canossa
November 27, 2017, 11:27am
23
Hello.
E get the error:
17-11-27 10:56:15 INFO (MainThread) [hassio.addons.git] Clone addon https://github.com/hassio-addons/addon-ide repository
17-11-27 10:56:18 WARNING (MainThread) [hassio.addons.data] Can’t read repository information from /data/addons/git/0bc6f36a/repository.json
17-11-27 10:56:18 INFO (MainThread) [hassio.addons] Load addons: 18 all - 0 new - 0 remove
What am I doing wrong?
frenck
(Franck Nijhof)
November 27, 2017, 12:45pm
24
Please be sure to follow the installation steps:
You are using an incorrect repository URL.
HI @frenck
turned everything back to default once more, and had a port scan to check on the 7681:
this is without Terminal enabled:
this is with Terminal enabled:
doesn’t this mean that the port shouldn’t be taken by another service? Only when Terminal is on, the port is visible in the scan.
Cheers,
Marius
frenck
(Franck Nijhof)
December 2, 2017, 9:32pm
26
Add-on: Terminal v2.1.0
Full Changelog
Changed
Upgrades add-on base image to v1.2.0
Improves ttyd S6 run script
Moves copy of rootfs at a later stage
Removed
Removes repository.json
to prevent user to install wrong repo
Removes Gratipay from README, since it is EOL
This update is now available in your Hass.io panel.
HI @frenck ,
Thanks for the update!
still having issues here though, but this new version gives a different error, maybe helping to pin down and find a solution? please have another look, this it what it says right ow:
~ hassio supervisor logs
17-12-03 10:24:36 INFO (SyncWorker_3) [hassio.dock.addon] Start docker addon 27e642c6/armhf-addon-nodered with version 0.1.4
17-12-03 10:24:36 INFO (SyncWorker_9) [hassio.dock.addon] Start docker addon homeassistant/armhf-addon-configurator with version 0.2.3
17-12-03 10:25:00 ERROR (MainThread) [hassio.api.homeassistant] Client error on api stream request Cannot connect to host 172.30.32.1:8123 ssl:T
rue [Connect call failed (‘172.30.32.1’, 8123)].
17-12-03 10:25:00 ERROR (MainThread) [hassio.api.homeassistant] Client error on api states request Cannot connect to host 172.30.32.1:8123 ssl:T
rue [Connect call failed (‘172.30.32.1’, 8123)].
Add-on setting:
{
"log_level": "debug",
"username": username,
"password": password,
"ssl": true,
"certfile": "fullchain.pem",
"keyfile": "privkey.pem",
"packages": [],
"init_commands": []
}
Hassio: 0.58.1
Thanks,
Marius
frenck
(Franck Nijhof)
December 3, 2017, 11:01am
28
I’ve looked at the previous posts and found that the issue in your post where different each time. I cannot tell from all these issues what your problem is and therefore am also unable to reproduce it.
I’m sorry, but it all doesn’t make sense to me.
im sorry, im just trying to be as clear as can be, given the logs in both Hassio and the add_on. Theynindeed are rather confusing now and then.
if its any help, this is the latest add-on error log:
INFO: Starting the ttyd daemon
[2017/12/03 12:07:51:2867] NOTICE: ttyd 1.3.3 (libwebsockets 2.4.0)
[2017/12/03 12:07:51:2869] NOTICE: tty configuration:
[2017/12/03 12:07:51:2869] NOTICE: credential: SGFzc0Jvc3M6MG5seU1lIQ==
[2017/12/03 12:07:51:2870] NOTICE: start command: tmux new -A -s ttyd zsh
[2017/12/03 12:07:51:2871] NOTICE: reconnect timeout: 30s
[2017/12/03 12:07:51:2872] NOTICE: close signal: SIGHUP (1)
[2017/12/03 12:07:51:2873] NOTICE: libuv support not compiled in
[2017/12/03 12:07:51:3321] NOTICE: Creating Vhost 'default' port 7681, 2 protocols, IPv6 off
[2017/12/03 12:07:51:3323] NOTICE: SSL ciphers: 'takentheseouthereforsecurity'[2017/12/03 12:07:51:3324] NOTICE: Using SSL mode
[2017/12/03 12:07:51:3333] ERR: lws_context_init_server_ssl: SSL_CTX_load_verify_locations unhappy
[2017/12/03 12:07:51:3336] NOTICE: SSL ECDH curve 'prime256v1'
[2017/12/03 12:07:51:3362] NOTICE: created client ssl context for default
[2017/12/03 12:07:51:4000] ERR: Unable to load SSL Client certs file from (null) -- client ssl isn't going to work
[2017/12/03 12:07:51:4003] NOTICE: lws_context_init_client_ssl: doing cert filepath
[2017/12/03 12:07:51:4020] NOTICE: Loaded client cert /ssl/fullchain.pem
[2017/12/03 12:07:51:4021] NOTICE: lws_context_init_client_ssl: doing private key filepath
[2017/12/03 12:07:51:4030] NOTICE: Loaded client cert private key /ssl/privkey.pem
[2017/12/03 12:07:51:4032] ERR: ERROR on binding fd 6 to port 7681 (-1 98)
[2017/12/03 12:07:51:4034] ERR: init server failed
[2017/12/03 12:07:51:4034] ERR: Failed to create default vhost
[2017/12/03 12:07:51:4035] ERR: libwebsockets init failed
i’ll de-and reinstall and see what that gives.
Thanks anyway,
Cheers,
Marius
kreddad
(Kreddad)
December 6, 2017, 1:00am
30
I’m having the same problem
“log_level”: “info”,
“username”: “”,
“password”: “”,
“ssl”: true,
“certfile”: “fullchain.pem”,
“keyfile”: “privkey.pem”,
“packages”: [
“python”,
“python-dev”,
“py-pip”,
“build-base”
],
“init_commands”: [
“pip install virtualenv”,
“pip install yamllint”
]
}
confige file yaml
terminal:
title: Terminal
icon: mdi:console
url: https://192.168.1.16:7681
log file
[cont-init.d] 00-banner.sh: exited 0.
[cont-init.d] 01-log-level.sh: executing…
Log level is set to INFO
[cont-init.d] 01-log-level.sh: exited 0.
[cont-init.d] 02-updates.sh: executing…
INFO: You are running the latest version of this add-on
[cont-init.d] 02-updates.sh: exited 0.
[cont-init.d] 10-requirements.sh: executing…
[cont-init.d] 10-requirements.sh: exited 0.
[cont-init.d] 30-link-common-dirs.sh: executing…
[cont-init.d] 30-link-common-dirs.sh: exited 0.
[cont-init.d] 40-zsh.sh: executing…
[cont-init.d] 40-zsh.sh: exited 0.
[cont-init.d] 50-user-ssh-folder.sh: executing…
[cont-init.d] 50-user-ssh-folder.sh: exited 0.
[cont-init.d] 80-user-packages.sh: executing…
fetch http://dl-cdn.alpinelinux.org/alpine/v3.7/main/armhf/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.7/community/armhf/APKINDEX.tar.gz
v3.7.0-8-g7f9d974993 [Index of /alpine/v3.7/main/ ]
v3.7.0-10-g867acb9878 [Index of /alpine/v3.7/community/ ]
OK: 8871 distinct packages available
(1/1) Installing python2 (2.7.14-r1)
Executing busybox-1.27.2-r6.trigger
OK: 190 MiB in 82 packages
(1/1) Installing python2-dev (2.7.14-r1)
Executing busybox-1.27.2-r6.trigger
OK: 198 MiB in 83 packages
(1/2) Installing py-setuptools (33.1.1-r1)
(2/2) Installing py2-pip (9.0.1-r1)
Executing busybox-1.27.2-r6.trigger
OK: 207 MiB in 85 packages
(1/16) Installing binutils-libs (2.28-r3)
(2/16) Installing binutils (2.28-r3)
(3/16) Installing gmp (6.1.2-r1)
(4/16) Installing isl (0.18-r0)
(5/16) Installing libgomp (6.4.0-r5)
(6/16) Installing libatomic (6.4.0-r5)
(7/16) Installing mpfr3 (3.1.5-r1)
(8/16) Installing mpc1 (1.0.3-r1)
(9/16) Installing gcc (6.4.0-r5)
(10/16) Installing musl-dev (1.1.18-r2)
(11/16) Installing libc-dev (0.7.1-r0)
(12/16) Installing g++ (6.4.0-r5)
(13/16) Installing make (4.2.1-r0)
(14/16) Installing fortify-headers (0.9-r0)
(15/16) Installing build-base (0.5-r0)
(16/16) Installing gcc-zsh-completion (5.4.2-r0)
Executing busybox-1.27.2-r6.trigger
OK: 322 MiB in 101 packages
[cont-init.d] 80-user-packages.sh: exited 0.
[cont-init.d] 81-user-scripts.sh: executing…
Collecting virtualenv
Downloading virtualenv-15.1.0-py2.py3-none-any.whl (1.8MB)
Installing collected packages: virtualenv
Successfully installed virtualenv-15.1.0
Collecting yamllint
Downloading yamllint-1.10.0-py2.py3-none-any.whl (42kB)
Collecting pyyaml (from yamllint)
Downloading PyYAML-3.12.tar.gz (253kB)
Collecting pathspec>=0.5.3 (from yamllint)
Downloading pathspec-0.5.5.tar.gz
Installing collected packages: pyyaml, pathspec, yamllint
Running setup.py install for pyyaml: started
Running setup.py install for pyyaml: finished with status ‘done’
Running setup.py install for pathspec: started
Running setup.py install for pathspec: finished with status ‘done’
Successfully installed pathspec-0.5.5 pyyaml-3.12 yamllint-1.10.0
[cont-init.d] 81-user-scripts.sh: exited 0.
[cont-init.d] done.
[services.d] starting services
starting version 3.2.4
[services.d] done.
INFO: Starting the ttyd daemon
[2017/12/05 19:49:53:8936] ERR: lws_context_init_server_ssl: SSL_CTX_load_verify_locations unhappy
[2017/12/05 19:49:53:9336] ERR: Unable to load SSL Client certs file from (null) – client ssl isn’t going to work
too bad really, but i gave up for now. Wouldn’t work in any setup. Locks up after about 20 or 30 seconds.
i do have several other http mentions in my error logs, but don’t think they are related, a bit too cryptical .
Until I’ve rid those, ill holdback reinstalling just to be sure im not mixing issues.
do check on the Github forum for this particular add-on, and see what the dev’s can help you with.
Will follow this.
Cheers,
Marius
mattlward
(Matt Ward)
December 6, 2017, 2:10pm
32
If I were to enable the install of pip and yamlint, how would I use yamlint? Does it just evaluate files onscreen or do I pipe them thru it?
1 Like
frenck
(Franck Nijhof)
December 27, 2017, 8:32pm
33
Add-on: Terminal v2.1.1
Full Changelog
Fixed
Changed
Upgrades add-on base image to v1.3.0
Use image tagged as test as a cache resource
Pass local CircleCI Docker socket into the build container
Prevents possible future Docker login issue
Updated forum topic URL in README
Removed
Removes Microbadger notification hooks
This update is now available in your Hass.io panel.
LintHart
(Linton)
January 4, 2018, 12:00pm
34
Hi @frenck ,
I’m having a similar issue to others here.
I’ve changed my port to 7689 and opened both the default 7681 and 7689 ports on my router and I get the following as if its not using the new port.
At one point it did look like it was going to work properly but then freezes and goes back to port 7681
Hassio V0.60 but I’ve been trying to get it to work since 0.58
Only accessing via https URLs
Really hoping you can she some light
Thank you
Linton
here’s my log:
[2018/01/04 22:54:42:9950] NOTICE: ttyd 1.3.3 (libwebsockets 2.4.0)
[2018/01/04 22:54:42:9950] NOTICE: tty configuration:
[2018/01/04 22:54:42:9951] NOTICE: start command: tmux new -A -s ttyd zsh
[2018/01/04 22:54:42:9951] NOTICE: reconnect timeout: 30s
[2018/01/04 22:54:42:9951] NOTICE: close signal: SIGHUP (1)
[2018/01/04 22:54:42:9956] NOTICE: libuv support not compiled in
[2018/01/04 22:54:43:0433] NOTICE: Creating Vhost 'default' port 7681, 2 protocols, IPv6 off
[2018/01/04 22:54:43:0433] NOTICE: SSL ciphers: 'ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-SHA384:HIGH:!aNULL:!eNULL:!EXPORT:!DES:!MD5:!PSK:!RC4:!HMAC_SHA1:!SHA1:!DHE-RSA-AES128-GCM-SHA256:!DHE-RSA-AES128-SHA256:!AES128-GCM-SHA25[2018/01/04 22:54:43:0434] NOTICE: Using SSL mode
[2018/01/04 22:54:43:0459] ERR: lws_context_init_server_ssl: SSL_CTX_load_verify_locations unhappy
[2018/01/04 22:54:43:0467] NOTICE: SSL ECDH curve 'prime256v1'
[2018/01/04 22:54:43:0512] NOTICE: created client ssl context for default
[2018/01/04 22:54:43:1294] ERR: Unable to load SSL Client certs file from (null) -- client ssl isn't going to work
[2018/01/04 22:54:43:1300] NOTICE: lws_context_init_client_ssl: doing cert filepath
[2018/01/04 22:54:43:1368] NOTICE: Loaded client cert /ssl/fullchain.pem
[2018/01/04 22:54:43:1369] NOTICE: lws_context_init_client_ssl: doing private key filepath
[2018/01/04 22:54:43:1379] NOTICE: Loaded client cert private key /ssl/privkey.pem
[2018/01/04 22:54:43:1383] ERR: ERROR on binding fd 6 to port 7681 (-1 98)
[2018/01/04 22:54:43:1385] ERR: init server failed
[2018/01/04 22:54:43:1385] ERR: Failed to create default vhost
[2018/01/04 22:54:43:1388] ERR: libwebsockets init failed
frenck
(Franck Nijhof)
January 7, 2018, 1:11pm
35
Hmz that is weird, but you gave me a nice pointer there.
Maybe it has to do with changing the port. I will look into this.
ezar
(Ezar)
February 13, 2018, 7:38am
38
Great module!
When I try to configure ssl fails:
{
“log_level”: “info”,
“username”: “”,
“password”: “”,
“ssl”: true,
“certfile”: “fullchain.pem”,
“keyfile”: “privkey.pem”,
“packages”: ,
“init_commands”:
}
[services.d] starting services
starting version 3.2.4
[services.d] done.
INFO: Starting the ttyd daemon
[2018/02/13 08:35:55:5792] ERR: lws_context_init_server_ssl: SSL_CTX_load_verify_locations unhappy
[2018/02/13 08:35:55:6399] ERR: Unable to load SSL Client certs file from (null) – client ssl isn’t going to work
I use same configuration inside mosquitto or configuration plugin
frenck
(Franck Nijhof)
February 27, 2018, 10:28pm
39
Release v2.3.0
This release comes with significant performance and security improvements and less memory usage.
xterm.js has been updated to 3.0 version which moves from DOM-based rendering to canvas-based, there was a 5 to 45 times performance improvement depending on the situation.
The add-on now fully implements and supports the new Hass.io API security layer, has updated the Hassio CLI tool, and now has the zip
command available right out of the box.
Full Changelog
Fixed
Adds HASSIO_TOKEN to user environment
Added
Adds add-on icon
Adds zip package
Changed
Updates base image to v1.3.3
Updates hassio-cli to v1.2.1
Optimizes images in this repository
Updates ttyd to 1.4.0+
How do I update from 2.2.1? I am not seeing the update from the addon in Hassio?