tsujamin / hass-addons

108 stars 35 forks source link

Update problem - Failed to to call /store/addons/948e3081_tailscale/update - The command '/bin/bash -o pipefail -c /install.sh $BUILD_ARCH $TAILSCALE_VERSION' returned a non-zero code: 2 #87

Closed matata86 closed 11 months ago

matata86 commented 1 year ago

Describe the bug image

Logger: homeassistant.components.hassio Source: components/hassio/websocket_api.py:130 Integration: Home Assistant Supervisor (documentation, issues) First occurred: 10:14:36 (1 occurrences) Last logged: 10:14:36

Failed to to call /store/addons/948e3081_tailscale/update - The command '/bin/bash -o pipefail -c /install.sh $BUILD_ARCH $TAILSCALE_VERSION' returned a non-zero code: 2

Thank you for your help.

tsujamin commented 1 year ago

Hey mate - just curious is the issue still manifesting today? Often failures at install time are transient and due to your local Debian package mirror (used during addon install) being out-of-sync.Current version just cleanly installed on mine. Let me know :)On 21 Jul 2023, at 6:19 pm, matata86 @.***> wrote: Assigned #87 to @tsujamin.

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were assigned.Message ID: @.***>

matata86 commented 1 year ago

Hello, thank you for your reply. Unfortunately, still same problem.

matata86 commented 1 year ago

` Logger: homeassistant.components.websocket_api.http.connection Source: components/hassio/update.py:169 Integration: Home Assistant WebSocket API (documentation, issues) First occurred: 09:44:22 (2 occurrences) Last logged: 09:47:25

[547561264336] Error updating Tailscale: The command '/bin/bash -o pipefail -c /install.sh $BUILD_ARCH $TAILSCALE_VERSION' returned a non-zero code: 2 Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/components/hassio/update.py", line 167, in async_install await async_update_addon(self.hass, slug=self._addon_slug, backup=backup) File "/usr/src/homeassistant/homeassistant/components/hassio/handler.py", line 52, in _wrapper raise HassioAPIError(data["message"]) homeassistant.components.hassio.handler.HassioAPIError: The command '/bin/bash -o pipefail -c /install.sh $BUILD_ARCH $TAILSCALE_VERSION' returned a non-zero code: 2

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 205, in handle_call_service await hass.services.async_call( File "/usr/src/homeassistant/homeassistant/core.py", line 1965, in async_call response_data = await coro ^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/core.py", line 2005, in _execute_service return await cast( ^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 235, in handle_service return await service.entity_service_call( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 848, in entity_service_call response_data = task.result() # pop exception if have ^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1192, in async_request_call return await coro ^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 892, in _handle_entity_call result = await task ^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/update/init.py", line 156, in async_install await entity.async_install_with_progress(version, backup) File "/usr/src/homeassistant/homeassistant/components/update/init.py", line 414, in async_install_with_progress await self.async_install(version, backup) File "/usr/src/homeassistant/homeassistant/components/hassio/update.py", line 169, in async_install raise HomeAssistantError(f"Error updating {self.title}: {err}") from err homeassistant.exceptions.HomeAssistantError: Error updating Tailscale: The command '/bin/bash -o pipefail -c /install.sh $BUILD_ARCH $TAILSCALE_VERSION' returned a non-zero code: 2

`

majoragee commented 1 year ago

+1 Same issue here. I updated one x64 instance successfully, but got this error on my HA Yellow:

`Logger: homeassistant.components.websocket_api.http.connection Source: components/hassio/update.py:169 Integration: Home Assistant WebSocket API (documentation, issues) First occurred: 8:41:49 AM (1 occurrences) Last logged: 8:41:49 AM

[547379504784] Error updating Tailscale: The command '/bin/bash -o pipefail -c /install.sh $BUILD_ARCH $TAILSCALE_VERSION' returned a non-zero code: 2 Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/components/hassio/update.py", line 167, in async_install await async_update_addon(self.hass, slug=self._addon_slug, backup=backup) File "/usr/src/homeassistant/homeassistant/components/hassio/handler.py", line 52, in _wrapper raise HassioAPIError(data["message"]) homeassistant.components.hassio.handler.HassioAPIError: The command '/bin/bash -o pipefail -c /install.sh $BUILD_ARCH $TAILSCALE_VERSION' returned a non-zero code: 2

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 205, in handle_call_service await hass.services.async_call( File "/usr/src/homeassistant/homeassistant/core.py", line 1910, in async_call task.result() File "/usr/src/homeassistant/homeassistant/core.py", line 1950, in _execute_service await cast(Callable[[ServiceCall], Awaitable[None]], handler.job.target)( File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 226, in handle_service await service.entity_service_call( File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 811, in entity_service_call future.result() # pop exception if have ^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1034, in async_request_call await coro File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 851, in _handle_entity_call await result File "/usr/src/homeassistant/homeassistant/components/update/init.py", line 156, in async_install await entity.async_install_with_progress(version, backup) File "/usr/src/homeassistant/homeassistant/components/update/init.py", line 417, in async_install_with_progress await self.async_install(version, backup) File "/usr/src/homeassistant/homeassistant/components/hassio/update.py", line 169, in async_install raise HomeAssistantError(f"Error updating {self.title}: {err}") from err homeassistant.exceptions.HomeAssistantError: Error updating Tailscale: The command '/bin/bash -o pipefail -c /install.sh $BUILD_ARCH $TAILSCALE_VERSION' returned a non-zero code: 2`

dvdl16 commented 1 year ago

+1 Same issue on Raspberry Pi HA, trying to update from 1.44.0.0 to 1.46.0.0

Home Assistant 2023.7.3 Supervisor 2023.07.1 Operating System 10.3 Frontend 20230705.1 - latest

Logger: homeassistant.components.websocket_api.http.connection Source: components/hassio/update.py:169 Integration: Home Assistant WebSocket API (documentation, issues) First occurred: 5:30:57 PM (1 occurrences) Last logged: 5:30:57 PM [547956620240] Error updating Tailscale: The command '/bin/bash -o pipefail -c /install.sh $BUILD_ARCH $TAILSCALE_VERSION' returned a non-zero code: 2


Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/hassio/update.py", line 167, in async_install
await async_update_addon(self.hass, slug=self._addon_slug, backup=backup)
File "/usr/src/homeassistant/homeassistant/components/hassio/handler.py", line 52, in _wrapper
raise HassioAPIError(data["message"])
homeassistant.components.hassio.handler.HassioAPIError: The command '/bin/bash -o pipefail -c /install.sh $BUILD_ARCH $TAILSCALE_VERSION' returned a non-zero code: 2

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 205, in handle_call_service await hass.services.async_call( File "/usr/src/homeassistant/homeassistant/core.py", line 1965, in async_call response_data = await coro ^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/core.py", line 2005, in _execute_service return await cast( ^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 235, in handle_service return await service.entity_service_call( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 848, in entity_service_call response_data = task.result() # pop exception if have ^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1192, in async_request_call return await coro ^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 892, in _handle_entity_call result = await task ^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/update/init.py", line 156, in async_install await entity.async_install_with_progress(version, backup) File "/usr/src/homeassistant/homeassistant/components/update/init.py", line 414, in async_install_with_progress await self.async_install(version, backup) File "/usr/src/homeassistant/homeassistant/components/hassio/update.py", line 169, in async_install raise HomeAssistantError(f"Error updating {self.title}: {err}") from err homeassistant.exceptions.HomeAssistantError: Error updating Tailscale: The command '/bin/bash -o pipefail -c /install.sh $BUILD_ARCH $TAILSCALE_VERSION' returned a non-zero code: 2

dvdl16 commented 1 year ago

Updating to 1.46.1.0 which was released yesterday is working for me

matata86 commented 1 year ago

Not for me... Logger: homeassistant.components.websocket_api.http.connection Source: components/hassio/update.py:169 Integration: Home Assistant WebSocket API (documentation, issues) First occurred: 10:19:42 (2 occurrences) Last logged: 10:21:14

[547932472720] Error updating Tailscale: The command '/bin/bash -o pipefail -c apt install -y wget iptables iproute2 procps iputils-ping' returned a non-zero code: 100 [547932723408] Error updating Tailscale: The command '/bin/bash -o pipefail -c apt install -y wget iptables iproute2 procps iputils-ping' returned a non-zero code: 100 Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/components/hassio/update.py", line 167, in async_install await async_update_addon(self.hass, slug=self._addon_slug, backup=backup) File "/usr/src/homeassistant/homeassistant/components/hassio/handler.py", line 52, in _wrapper raise HassioAPIError(data["message"]) homeassistant.components.hassio.handler.HassioAPIError: The command '/bin/bash -o pipefail -c apt install -y wget iptables iproute2 procps iputils-ping' returned a non-zero code: 100

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 205, in handle_call_service await hass.services.async_call( File "/usr/src/homeassistant/homeassistant/core.py", line 1965, in async_call response_data = await coro ^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/core.py", line 2005, in _execute_service return await cast( ^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 235, in handle_service return await service.entity_service_call( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 848, in entity_service_call response_data = task.result() # pop exception if have ^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1192, in async_request_call return await coro ^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 892, in _handle_entity_call result = await task ^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/update/init.py", line 156, in async_install await entity.async_install_with_progress(version, backup) File "/usr/src/homeassistant/homeassistant/components/update/init.py", line 414, in async_install_with_progress await self.async_install(version, backup) File "/usr/src/homeassistant/homeassistant/components/hassio/update.py", line 169, in async_install raise HomeAssistantError(f"Error updating {self.title}: {err}") from err homeassistant.exceptions.HomeAssistantError: Error updating Tailscale: The command '/bin/bash -o pipefail -c apt install -y wget iptables iproute2 procps iputils-ping' returned a non-zero code: 100

tsujamin commented 1 year ago

Yeah I'm pretty sure that's an issue withy your HA box hitting the debian mirror, or that mirror being out of date sorry. They usually resolve themselves once whichever mirror is local for you has synced up.

On 28 Jul 2023, at 6:22 pm, matata86 @.***> wrote:

Not for me... `Logger: homeassistant.components.websocket_api.http.connection Source: components/hassio/update.py:169 Integration: Home Assistant WebSocket API (documentation, issues) First occurred: 10:19:42 (2 occurrences) Last logged: 10:21:14

[547932472720] Error updating Tailscale: The command '/bin/bash -o pipefail -c apt install -y wget iptables iproute2 procps iputils-ping' returned a non-zero code: 100 [547932723408] Error updating Tailscale: The command '/bin/bash -o pipefail -c apt install -y wget iptables iproute2 procps iputils-ping' returned a non-zero code: 100 Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/components/hassio/update.py", line 167, in async_install await async_update_addon(self.hass, slug=self._addon_slug, backup=backup) File "/usr/src/homeassistant/homeassistant/components/hassio/handler.py", line 52, in _wrapper raise HassioAPIError(data["message"]) homeassistant.components.hassio.handler.HassioAPIError: The command '/bin/bash -o pipefail -c apt install -y wget iptables iproute2 procps iputils-ping' returned a non-zero code: 100

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 205, in handle_call_service await hass.services.async_call( File "/usr/src/homeassistant/homeassistant/core.py", line 1965, in async_call response_data = await coro ^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/core.py", line 2005, in _execute_service return await cast( ^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 235, in handle_service return await service.entity_service_call( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 848, in entity_service_call response_data = task.result() # pop exception if have ^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1192, in async_request_call return await coro ^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 892, in _handle_entity_call result = await task ^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/update/init.py", line 156, in async_install await entity.async_install_with_progress(version, backup) File "/usr/src/homeassistant/homeassistant/components/update/init.py", line 414, in async_install_with_progress await self.async_install(version, backup) File "/usr/src/homeassistant/homeassistant/components/hassio/update.py", line 169, in async_install raise HomeAssistantError(f"Error updating {self.title}: {err}") from err homeassistant.exceptions.HomeAssistantError: Error updating Tailscale: The command '/bin/bash -o pipefail -c apt install -y wget iptables iproute2 procps iputils-ping' returned a non-zero code: 100 `

— Reply to this email directly, view it on GitHub https://github.com/tsujamin/hass-addons/issues/87#issuecomment-1655259616, or unsubscribe https://github.com/notifications/unsubscribe-auth/AASSUI7YZPZMUU35NKCQFOLXSNZDFANCNFSM6AAAAAA2SQEHYU. You are receiving this because you were mentioned.

majoragee commented 1 year ago

Updating to 1.46.1.0 which was released yesterday is working for me

1.46.1.0 is working for me, too. Might have been an upstream bug. The changelog mentions Crash issue on ARM64.

nathang21 commented 1 year ago

Still not working for me, somehow I got into a weird state where HA failed to update the addon, and it got uninstalled, and now I can't re-install it, even after restarting the host.

Is there a way to force clearing the package repository cache, or to use another mirror etc.? I'm using HAOS which is based on Arch, so perhaps that makes a difference.

lmagyar commented 1 year ago

On repo cache clear (just a tip, I had similar problem with a different add-on):

Maybe it helps. Or not.

nathang21 commented 1 year ago

On repo cache clear (just a tip, I had similar problem with a different add-on):

  • uninstall the add-on

  • remove the repository (add-on store / ... menu / repositories / trash icon)

  • "check for updates" menu

  • add repository

  • install add-on

Maybe it helps. Or not.

Thanks for the tip, I should have thought of that. However still the same problem.

I even added in an HA restart, and a HA update to 2023.8.3 which happened to be available when I was debugging. All of that and then tried to reinstall and get the same error. Never had this on other admins which is super weird.

nathang21 commented 1 year ago

Update: I ended up doing a partial restore from a backup from a few weeks ago to an older version 1.46.0.0, should have done that sooner as that seemed to work pretty quickly.

However now, i'm unable to upgrade to the new version and running into the same problem, except at least I have a working Tailscale addon for now, just an older version.

 ...
 23-08-18 21:22:45 ERROR (MainThread) [supervisor.docker.addon] Build log: 
Step 1/21 : ARG BUILD_ARCH
Step 2/21 : FROM homeassistant/${BUILD_ARCH}-base-debian:latest
 ---> 529a12e287e4
Step 3/21 : ARG BUILD_ARCH
 ---> Using cache
 ---> 276084a4b38b
Step 4/21 : ARG TAILSCALE_VERSION="1.48.0"
 ---> Using cache
 ---> 8956876e18d5
Step 5/21 : ENV LANG C.UTF-8
 ---> Using cache
 ---> 5b975207fbae
Step 6/21 : RUN apt update
 ---> Using cache
 ---> 7cf5a5b1043d
Step 7/21 : RUN apt install -y wget iptables iproute2 procps iputils-ping
 ---> Using cache
 ---> 2e8f53655462
Step 8/21 : RUN update-alternatives --set iptables /usr/sbin/iptables-legacy
 ---> Using cache
 ---> e9794a2b05fa
Step 9/21 : RUN update-alternatives --set ip6tables /usr/sbin/ip6tables-legacy
 ---> Using cache
 ---> 89bce2ab3de5
Step 10/21 : COPY install.sh /
 ---> Using cache
 ---> 32b68f60d6a4
Step 11/21 : RUN chmod a+x /install.sh
 ---> Using cache
 ---> 268bfb319291
Step 12/21 : RUN /install.sh $BUILD_ARCH $TAILSCALE_VERSION
 ---> Running in 845c975790ac
ARGS: aarch64 1.48.0
Downloading tailscale 1.48.0 for aarch64
--2023-08-19 01:22:45--  https://pkgs.tailscale.com/stable/tailscale_1.48.0_arm64.tgz

Resolving pkgs.tailscale.com (pkgs.tailscale.com)... 
199.38.181.239, 2607:f740:f::d19
Connecting to pkgs.tailscale.com (pkgs.tailscale.com)|199.38.181.239|:443... 
connected.

HTTP request sent, awaiting response... 
404 Not Found
2023-08-19 01:22:45 ERROR 404: Not Found.

gzip: stdin: unexpected end of file

tar: Child returned status 1
tar: Error is not recoverable: exiting now

Removing intermediate container 845c975790ac
lmagyar commented 1 year ago

Oh gosh, you've written "package cache" and I've read "add-on repo cache"... Sorry, my fault... Certainly my tip didn't help...

This add-on has no prebuilt docker image and the supervisor builds it...

And currently the latest 1.48.0 package is unavailable, only 1.46.1 can be downloaded, though a few days ago I've built my tailscale add-on with 1.48.0 (logs) from the same source location.

I think this is a temporary issue with tailscale's package repo. Though if you need the latest version you can try my add-on (https://github.com/lmagyar/homeassistant-addon-tailscale), but that is a fork of the official add-on, so it has completely different configs, though I think you can configure everything with that also.

JustAnyGitHubUser commented 1 year ago

I think I have the same problem. I get the following error message.

The command '/bin/bash -o pipefail -c /install.sh $BUILD_ARCH $TAILSCALE_VERSION' returned a non-zero code: 2

nathang21 commented 1 year ago

Ah looks like the Linux release was pulled due to an issue, details on the changelog. https://tailscale.com/changelog/

lmagyar commented 1 year ago

Wow, FYI, the issue that tracks this problem: https://github.com/tailscale/tailscale/issues/8942

eduardofbrito commented 1 year ago

I have de same problem. I install in x86 and and Raspberry 4.