Hehe, I guess you could interpret it in that way, yes
Love it - keep it coming…
Add-on: Terminal v2.0.0
Added
- Added CodeClimate
- Added CircleCI
- Added support for Hass.io’s extended label schema
- Added persistency of the ~/.ssh folder
Changed
- Migrated to the new Hass.io build system
- Migrated to our new base images
- Rewrite of add-on onto the S6 process supervisor
- Upgraded the hassio CLI tool to the latest version
- Updated documentation
This update is now available in your Hass.io panel.
Add-on: Terminal v2.0.1
Fixed
Changed
- Updated ttyd log level to be more useful
This update is now available in your Hass.io panel.
A request: The Open Web UI button in Terminal doesn’t open the https:// page when I have SSL set to true. Can the button be adaptive?
I’m also working to add the panel, but thought I’d ask as an alternative.
port forward is needed, right? How? I port forwarded 7681 to IP of HASSIO but is not working (I have duckdns and letsencrypt)
Not sure… your issue description is pretty short on details.
Portforwarding is not needed perse, depends if you’d like to expose it to the outside world I guess.
Please post some more details, like the used add-on configuration, log outputs and stuff.
Add-on: Terminal v2.0.2
Changed
- Updated base images to v1.0.1
- Protocol adaptive ‘WebUI’ button (Thx @VdkaShaker!)
This update is now available in your Hass.io panel.
Now I just have to figure out why :7681 doesn’t get past my router
HI @frenck
sorry for posting in the incorrect thread before about Terminal quitting after a few seconds. Let me re-post again here, since the issue is still there. Ive tried to follow your directive at using another port, but the interface won’t allow me to do so, and restarting using another port results in a red button.
I’ve port forwarded 7681 in my router wan settings and still no luck.
just checked the supervisor log and the strange thing is it complains about port 22 already being allocated (which is true of course, for ssh) but in the Terminal configuration (both in the add-on itself as in the configuration file section) only 7168 is mentioned…restarting the HomeAssistant instance resulted in a green supervisor log, but the terminal log remains as follows:
Not sure if this has anything to do with it, but i successfully added the IDE add-on, and in the bottom window, the Terminal is never showing up, circling coin in the Tab:
Hope you can have a look again, thanks
Marius
@Mariusthvdb, 2 different add-ons, different issues. Don’t mix up topics, please.
About the issue with the terminal add-on. The error message is clear about the issue like I told you before. The port 7681 is already in use. That is a user error I can’t deal with in my add-on.
You need to share more information in order to get correct help. Things like: The configuration of the add-on, raw logs of the add-on output (please set the log_level to ‘debug’), type of system you are running, versions of the Hass.io Supervisor, OS version, and Home Assistant version information.
sorry, thought since it was both about the terminal not showing up, it might have been an intertwined issue.
I will resend further information of course. Thanks for your specifics.
Any suggestion for another port? as stated, i tried to change that, but the system wouldn’t restart, and gave a red button.
Marius
The add-ons and the Terminals in each of them are not related, but I see the confusion, so don’t worry
Any port will do, pick something random and high, like 9564? I’m not sure why the button would be red, but yet again, I need more info in order to help you.
im using a Pi3 with the Hassio install version 0.58.1
supervisor: 0.75
configuration of the Add-on:
{
"log_level": "debug",
"username": "username",
"password": "password",
"ssl": true,
"certfile": "fullchain.pem",
"keyfile": "privkey.pem",
"packages": [],
"init_commands": []
}
log in debug level (sorry its big):
[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] 10-hassio: applying...
[fix-attrs.d] 10-hassio: exited 0.
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] 00-banner.sh: executing...
-----------------------------------------------------------
Hass.io Add-on: Terminal v2.0.2
Terminal access to your Home Assistant instance via the web
From: Community Hass.io Add-ons
By: Franck Nijhof <[email protected]>
-----------------------------------------------------------
[cont-init.d] 00-banner.sh: exited 0.
[cont-init.d] 01-log-level.sh: executing...
Log level is set to DEBUG
[cont-init.d] 01-log-level.sh: exited 0.
[cont-init.d] 02-updates.sh: executing...
DEBUG: Requested API resource: http://hassio/supervisor/ping
DEBUG: API HTTP Response code: 200
DEBUG: API Response: {"result": "ok", "data": {}}
DEBUG: Requested API resource: http://hassio/addons/a0d7b954_terminal/info
DEBUG: API HTTP Response code: 200
DEBUG: API Response: {"result": "ok", "data": {"name": "Terminal", "description": "Terminal access to your Home Assistant instance via the web", "version": "2.0.2", "auto_update": true, "repository": "a0d7b954", "last_version": "2.0.2", "state": "started", "boot": "auto", "options": {"log_level": "debug", "username": "username", "password": "password", "ssl": true, "certfile": "fullchain.pem", "keyfile": "privkey.pem", "packages": [], "init_commands": []}, "url": "https://github.com/hassio-addons/addon-terminal", "detached": false, "build": false, "network": {"7681/tcp": 7681}, "host_network": false, "privileged": null, "devices": null, "logo": true, "webui": "https://[HOST]:7681", "stdin": false, "hassio_api": true, "homeassistant_api": true, "gpio": false, "audio": false, "audio_input": null, "audio_output": null}}
DEBUG: Filtering response using: .version
DEBUG: Requested API resource: http://hassio/addons/a0d7b954_terminal/info
DEBUG: API HTTP Response code: 200
DEBUG: API Response: {"result": "ok", "data": {"name": "Terminal", "description": "Terminal access to your Home Assistant instance via the web", "version": "2.0.2", "auto_update": true, "repository": "a0d7b954", "last_version": "2.0.2", "state": "started", "boot": "auto", "options": {"log_level": "debug", "username": "username", "password": "password", "ssl": true, "certfile": "fullchain.pem", "keyfile": "privkey.pem", "packages": [], "init_commands": []}, "url": "https://github.com/hassio-addons/addon-terminal", "detached": false, "build": false, "network": {"7681/tcp": 7681}, "host_network": false, "privileged": null, "devices": null, "logo": true, "webui": "https://[HOST]:7681", "stdin": false, "hassio_api": true, "homeassistant_api": true, "gpio": false, "audio": false, "audio_input": null, "audio_output": null}}
DEBUG: Filtering response using: .last_version
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...
[cont-init.d] 80-user-packages.sh: exited 0.
[cont-init.d] 81-user-scripts.sh: executing...
[cont-init.d] 81-user-scripts.sh: exited 0.
[cont-init.d] done.
[services.d] starting services
starting version 3.2.2
[services.d] done.
INFO: Starting the ttyd daemon
[2017/11/27 11:25:54:2594] NOTICE: ttyd 1.3.2 (libwebsockets 2.2.0)
[2017/11/27 11:25:54:2594] NOTICE: tty configuration:
[2017/11/27 11:25:54:2595] NOTICE: credential: *REMOVED*
[2017/11/27 11:25:54:2595] NOTICE: start command: tmux new -A -s ttyd zsh
[2017/11/27 11:25:54:2596] NOTICE: reconnect timeout: 30s
[2017/11/27 11:25:54:2596] NOTICE: close signal: SIGHUP (1)
[2017/11/27 11:25:54:2598] NOTICE: Initial logging level 7
[2017/11/27 11:25:54:2598] NOTICE: Libwebsockets version: 2.2.0 [email protected]
[2017/11/27 11:25:54:2598] NOTICE: IPV6 not compiled in
[2017/11/27 11:25:54:2599] NOTICE: libev support not compiled in
[2017/11/27 11:25:54:2599] NOTICE: libuv support not compiled in
[2017/11/27 11:25:54:2602] NOTICE: Threads: 1 each 1048576 fds
[2017/11/27 11:25:54:2864] NOTICE: mem: platform fd map: 4194304 bytes
[2017/11/27 11:25:54:2866] NOTICE: Compiled with OpenSSL support
[2017/11/27 11:25:54:2867] NOTICE: Doing SSL library init
[2017/11/27 11:25:54:2940] NOTICE: Creating Vhost 'default' port 7681, 2 protocols, IPv6 off
[2017/11/27 11:25:54:2940] NOTICE: SSL ciphers: 'takentheseoutforsecurityhere]] NOTICE: Using SSL mode
[2017/11/27 11:25:54:2948] ERR: lws_context_init_server_ssl: SSL_CTX_load_verify_locations unhappy
[2017/11/27 11:25:54:2998] NOTICE: SSL ECDH curve 'prime256v1'
[2017/11/27 11:25:54:3013] NOTICE: Listening on port 7681
[2017/11/27 11:25:54:3013] NOTICE: mem: per-conn: 448 bytes + protocol rx buf
[2017/11/27 11:25:54:3014] NOTICE: canonical_hostname = a0d7b954-terminal
[2017/11/27 11:25:54:3014] NOTICE: listening on port 7681
[2017/11/27 11:26:16:7264] ERR: SSL_accept failed socket 7: SSL_ERROR_SSL
[2017/11/27 11:26:16:7264] ERR: *** error:1402609C:SSL routines:ACCEPT_SR_CLNT_HELLO:http request
[2017/11/27 11:26:16:7267] ERR: SSL_accept failed socket 7: SSL_ERROR_SSL
[2017/11/27 11:26:16:7267] ERR: *** error:140260FC:SSL routines:ACCEPT_SR_CLNT_HELLO:unknown protocol
[2017/11/27 11:26:46:7802] ERR: SSL_accept failed socket 7: SSL_ERROR_SSL
[2017/11/27 11:26:46:7802] ERR: *** error:1402609C:SSL routines:ACCEPT_SR_CLNT_HELLO:http request
[2017/11/27 11:26:46:7811] ERR: SSL_accept failed socket 7: SSL_ERROR_SSL
[2017/11/27 11:26:46:7812] ERR: *** error:140260FC:SSL routines:ACCEPT_SR_CLNT_HELLO:unknown protocol
[2017/11/27 11:27:16:9815] ERR: SSL_accept failed socket 7: SSL_ERROR_SSL
[2017/11/27 11:27:16:9817] ERR: *** error:1402609C:SSL routines:ACCEPT_SR_CLNT_HELLO:http request
[2017/11/27 11:27:16:9820] ERR: SSL_accept failed socket 7: SSL_ERROR_SSL
[2017/11/27 11:27:16:9822] ERR: *** error:140260FC:SSL routines:ACCEPT_SR_CLNT_HELLO:unknown protocol
after having changed the port to a random 9748 (container still using 7681/tcp?)
the logs show:
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...
[cont-init.d] 80-user-packages.sh: exited 0.
[cont-init.d] 81-user-scripts.sh: executing...
[cont-init.d] 81-user-scripts.sh: exited 0.
[cont-init.d] done.
[services.d] starting services
starting version 3.2.2
[services.d] done.
INFO: Starting the ttyd daemon
[2017/11/27 11:48:18:0063] NOTICE: ttyd 1.3.2 (libwebsockets 2.2.0)
[2017/11/27 11:48:18:0063] NOTICE: tty configuration:
[2017/11/27 11:48:18:0064] NOTICE: credential: SGFzc0Jvc3M6MG5seU1lIQ==
[2017/11/27 11:48:18:0064] NOTICE: start command: tmux new -A -s ttyd zsh
[2017/11/27 11:48:18:0066] NOTICE: reconnect timeout: 30s
[2017/11/27 11:48:18:0066] NOTICE: close signal: SIGHUP (1)
[2017/11/27 11:48:18:0066] NOTICE: Initial logging level 7
[2017/11/27 11:48:18:0067] NOTICE: Libwebsockets version: 2.2.0 [email protected]
[2017/11/27 11:48:18:0067] NOTICE: IPV6 not compiled in
[2017/11/27 11:48:18:0067] NOTICE: libev support not compiled in
[2017/11/27 11:48:18:0067] NOTICE: libuv support not compiled in
[2017/11/27 11:48:18:0069] NOTICE: Threads: 1 each 1048576 fds
[2017/11/27 11:48:18:0259] NOTICE: mem: platform fd map: 4194304 bytes
[2017/11/27 11:48:18:0261] NOTICE: Compiled with OpenSSL support
[2017/11/27 11:48:18:0262] NOTICE: Doing SSL library init
[2017/11/27 11:48:18:0344] NOTICE: Creating Vhost 'default' port 7681, 2 protocols, IPv6 off
[2017/11/27 11:48:18:0345] NOTICE: SSL ciphers: 'takentheseoutforsecurityhere]] NOTICE: Using SSL mode
[2017/11/27 11:48:18:0350] ERR: lws_context_init_server_ssl: SSL_CTX_load_verify_locations unhappy
[2017/11/27 11:48:18:0399] NOTICE: SSL ECDH curve 'prime256v1'
[2017/11/27 11:48:18:0413] NOTICE: Listening on port 7681
[2017/11/27 11:48:18:0414] NOTICE: mem: per-conn: 448 bytes + protocol rx buf
[2017/11/27 11:48:18:0414] NOTICE: canonical_hostname = a0d7b954-terminal
[2017/11/27 11:48:18:0414] NOTICE: listening on port 7681
[2017/11/27 11:48:33:3086] ERR: SSL_accept failed socket 7: SSL_ERROR_SSL
[2017/11/27 11:48:33:3090] ERR: *** error:1402609C:SSL routines:ACCEPT_SR_CLNT_HELLO:http request
[2017/11/27 11:48:33:3094] ERR: SSL_accept failed socket 7: SSL_ERROR_SSL
[2017/11/27 11:48:33:3096] ERR: *** error:140260FC:SSL routines:ACCEPT_SR_CLNT_HELLO:unknown protocol
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
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?
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
Add-on: Terminal v2.1.0
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.