Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bitwarden_rs: ./run: line 81: /opt/bitwarden_rs: No such file or directory #4

Closed
poudenes opened this issue Jan 17, 2021 · 25 comments
Closed
Labels
help wanted Extra attention is needed

Comments

@poudenes
Copy link
Contributor

poudenes commented Jan 17, 2021

Hello All,

When I want start Bitwarden_RS I see this error message:

./run: line 81: /opt/bitwarden_rs: No such file or directory

RPI4 2GB
Home Assistant 2021.1.4
Installation Type | Home Assistant Supervised
Development | false
Supervisor | true
Docker | true
Virtual Environment | false
Python Version | 3.8.7
Operating System Family | Linux
Operating System Version | 5.4.79-v8+
CPU Architecture | aarch64
Timezone | Europe/Amsterdam

@alexbelgium
Copy link
Owner

alexbelgium commented Jan 17, 2021

That's so strange... This file is created during build so I don't understand how it wouldn't be there. Did you try to install the official community addon here and was it working ? The code is nearly the same.

https://github.com/hassio-addons

@alexbelgium
Copy link
Owner

OK I'll try something... Could you please uninstall, manually update the repo, and try again to install?

For info, I had linked the bitwarden build link with the addon version. It works on my config but it is the only difference in build instructions with the official addon (that was on v1.17 so causes sync issues with apps). I've reverted it tonhard encoded links.

@poudenes
Copy link
Contributor Author

poudenes commented Jan 17, 2021

I reload the repo's reinstalled the add-on but still get the error:

./run: line 81: /opt/bitwarden_rs: No such file or directory

i see that it is version 1.18.0

The official one is working. When I try yours first I turn of the original one.
I have problems with original one, because I can't use the iOS App on lates iOS version.
Can add my safe, but when I want open it, it ask my password and then all the time it say its incorrect.
Also auto-fill for passwords won't work. To enable it you need given your safe password, also all the time it say: password incorrect.

Hope yours will work with latest iOS version and the app.

@alexbelgium
Copy link
Owner

alexbelgium commented Jan 18, 2021

Trying something

@poudenes
Copy link
Contributor Author

This is the full log file after I tried you other REPO link:

[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] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] 00-banner.sh: executing... 
-----------------------------------------------------------
 Add-on: Bitwarden RS
 Open source password management solution
-----------------------------------------------------------
 Add-on version: 1.17.0
 You are running the latest version of this add-on.
 System: Debian GNU/Linux 10 (buster)  (armv7 / raspberrypi4)
 Home Assistant Core: 2021.1.4
 Home Assistant Supervisor: 2021.01.4
-----------------------------------------------------------
 Please, share the above information when looking for help
 or support in, e.g., GitHub, forums or the Discord chat.
-----------------------------------------------------------
[cont-init.d] 00-banner.sh: exited 0.
[cont-init.d] 01-log-level.sh: executing... 
[cont-init.d] 01-log-level.sh: exited 0.
[cont-init.d] nginx.sh: executing... 
[cont-init.d] nginx.sh: exited 0.
[cont-init.d] done.
[services.d] starting services
[services.d] done.
[09:36:20] INFO: 
[09:36:20] INFO: 
[09:36:20] INFO: READ THIS CAREFULLY! READ THIS CAREFULLY!
[09:36:20] INFO: 
[09:36:20] INFO: 
[09:36:20] INFO: This is your temporary random admin token/password!
[09:36:20] INFO: 
[09:36:20] INFO: k0O9q3sgv/mbCP4jcRiV0v0/J+cBg4l+NK8Bpljo9qxJuvjk3Ye/ejKpNbCYfuSP
[09:36:20] INFO: 
[09:36:20] INFO: Be sure to change it in the admin panel, as soon as possible.
[09:36:20] INFO: 
[09:36:20] INFO: After you have changed ANY setting in the admin panel,
[09:36:20] INFO: the add-on will NOT generate a new token on each start
[09:36:20] INFO: and stops showing this message.
[09:36:20] INFO: 
[09:36:20] INFO: Starting the Bitwarden RS server...
./run: line 81: /opt/bitwarden_rs: No such file or directory
[cont-finish.d] executing container finish scripts...
[cont-finish.d] 99-message.sh: executing... 
[cont-finish.d] 99-message.sh: exited 0.
[cont-finish.d] done.
[s6-finish] waiting for services.
[s6-finish] sending all processes the TERM signal.
[s6-finish] sending all processes the KILL signal and exiting.

@alexbelgium
Copy link
Owner

I really don't understand... Actually you were so fast to install the new repo that I did not have time to make the modif - so it is actually directly the official addon (forked by mww to install the v 1.17.0).

However, I got a new idea. I saw that all files are in CRLF (windows line return) and not in LF (unix line return). It could cause some issues with scripts depending on the systems. As distribution, I'm using Home Assistant OS, and I see that you are on Debian, so it could be that system behavior is not identical.

I've updated my own addon with that. Low probability it will work as the offical addon is also in CRLF. It is now uploaded so if you reload the repro it will install the version with LF.

The last possibility would be for you to install mww's version here : https://github.com/mww/addon-bitwarden
It is only v1.17.0 but should already correct the issue with iOS sync.

Otherwise, if both those options fail (my addon with LF), and mww version then I really don't see how to help.

@poudenes
Copy link
Contributor Author

I tried MWW his repo. Same issue:

[12:37:22] INFO: Starting the Bitwarden RS server...
./run: line 81: /opt/bitwarden_rs: No such file or directory
[cont-finish.d] executing container finish scripts...
[cont-finish.d] 99-message.sh: executing... 
[cont-finish.d] 99-message.sh: exited 0.
[cont-finish.d] done.
[s6-finish] waiting for services.
[s6-finish] sending all processes the TERM signal.

It can not be a problem I already have official Bitwarden_RS installed? The container name is different so would be a problem right?

I guess I can't use it. :(

@poudenes
Copy link
Contributor Author

This is the official Bitwarden_RS from HA itself:

[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] 00-banner.sh: executing... 
-----------------------------------------------------------
 Add-on: Bitwarden RS
 Open source password management solution
-----------------------------------------------------------
 Add-on version: 0.6.2
 You are running the latest version of this add-on.
 System: Debian GNU/Linux 10 (buster)  (armv7 / raspberrypi4)
 Home Assistant Core: 2021.1.4
 Home Assistant Supervisor: 2021.01.4
-----------------------------------------------------------
 Please, share the above information when looking for help
 or support in, e.g., GitHub, forums or the Discord chat.
-----------------------------------------------------------
[cont-init.d] 00-banner.sh: exited 0.
[cont-init.d] 01-log-level.sh: executing... 
Log level is set to ERROR
[cont-init.d] 01-log-level.sh: exited 0.
[cont-init.d] nginx.sh: executing... 
[cont-init.d] nginx.sh: exited 0.
[cont-init.d] done.
[services.d] starting services
[services.d] done.
/--------------------------------------------------------------------\
|                       Starting Bitwarden_RS                        |
|                           Version 1.14.2                           |
|--------------------------------------------------------------------|
| This is an *unofficial* Bitwarden implementation, DO NOT use the   |
| official channels to report bugs/features, regardless of client.   |
| Report URL: https://github.com/dani-garcia/bitwarden_rs/issues/new |
\--------------------------------------------------------------------/

@alexbelgium
Copy link
Owner

alexbelgium commented Jan 18, 2021

Indeed the current addon works - what seems not to work is the ability to download files during creation of the container through the dockerfile. It is what failed on the nextcloud addon, and on my & mww's addons. And yes, as the container name is different you can have 2 different bitwarden addons on your system! It tested that in the past.

Sorry but it seems to be an issue on your system then...

Actually the most interesting test would be to uninstall the official addon and try to reinstall it ;-) If you have a snapshot you can always restore your current bitwarden system afterwards. If it works then I would try to understand but the code is near identical so there is no reason the offical addon would work and not the forks...

@poudenes
Copy link
Contributor Author

All official Addons I can install without problem. That makes not logic that it will be a problem of my os system?
I have total 21 adding running and 4 of them are non official. Include your's Nextcloud.

@alexbelgium alexbelgium added the help wanted Extra attention is needed label Jan 18, 2021
@alexbelgium
Copy link
Owner

I've corrected an error in the code. Could you try again?

@poudenes
Copy link
Contributor Author

poudenes commented Jan 19, 2021

I've corrected an error in the code. Could you try again?

I did a reload and installed the Add-on. I used the repo:

alexbelgium/hassio-addons

[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] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] 00-banner.sh: executing... 
-----------------------------------------------------------
 Add-on: Bitwarden RS
 Open source password management solution
-----------------------------------------------------------
 Add-on version: 1.18.0
 You are running the latest version of this add-on.
 System: Debian GNU/Linux 10 (buster)  (armv7 / raspberrypi4)
 Home Assistant Core: 2021.1.4
 Home Assistant Supervisor: 2021.01.5
-----------------------------------------------------------
 Please, share the above information when looking for help
 or support in, e.g., GitHub, forums or the Discord chat.
-----------------------------------------------------------
[cont-init.d] 00-banner.sh: exited 0.
[cont-init.d] 01-log-level.sh: executing... 
[cont-init.d] 01-log-level.sh: exited 0.
[cont-init.d] nginx.sh: executing... 
[cont-init.d] nginx.sh: exited 0.
[cont-init.d] done.
[services.d] starting services
[services.d] done.
[14:55:55] INFO: 
[14:55:55] INFO: 
[14:55:55] INFO: READ THIS CAREFULLY! READ THIS CAREFULLY!
[14:55:55] INFO: 
[14:55:55] INFO: 
[14:55:55] INFO: This is your temporary random admin token/password!
[14:55:55] INFO: 
[14:55:55] INFO: PxKoF0RF1QfVYazzy67l1vpKupRRJlmJ7I7mppdluLOrZELjRx8OYfIKRThkIMlf
[14:55:55] INFO: 
[14:55:55] INFO: Be sure to change it in the admin panel, as soon as possible.
[14:55:55] INFO: 
[14:55:55] INFO: After you have changed ANY setting in the admin panel,
[14:55:55] INFO: the add-on will NOT generate a new token on each start
[14:55:55] INFO: and stops showing this message.
[14:55:55] INFO: 
[14:55:55] INFO: Starting the Bitwarden RS server...
./run: line 81: /opt/bitwarden_rs: No such file or directory
[cont-finish.d] executing container finish scripts...
[cont-finish.d] 99-message.sh: executing... 
[cont-finish.d] 99-message.sh: exited 0.
[cont-finish.d] done.
[s6-finish] waiting for services.

@poudenes
Copy link
Contributor Author

This is a output of portainer:
Maybe its useful.


Order | Size | Layer
-- | -- | --
1 | 63.4 MB | ADD file:a70d8c01f8f04f36038968567af779883f3b5ba3147b662b7d170d80418bc23c in /
2 | 0 B | CMD ["bash"]
3 | 0 B | LABEL io.balena.architecture=aarch64
4 | 0 B | LABEL io.balena.qemu.version=4.0.0+balena2-aarch64
5 | 6.2 MB | COPY file:5d5b2d90c020845b840df9829b46d773206c5812baceafcfb54dd7218c66bf28 in /usr/bin
6 | 41.1 MB | RUN apt-get update && apt-get install -y --no-install-recommends sudo ca-certificates findutils gnupg dirmngr inetu...
7 | 1.6 MB | RUN curl -SLO "http://resin-packages.s3.amazonaws.com/resin-xbuild/v1.0.0/resin-xbuild1.0.0.tar.gz" && echo "1eb099bc3176ed07...
8 | 0 B | ENV LC_ALL=C.UTF-8
9 | 0 B | ENV DEBIAN_FRONTEND=noninteractive
10 | 0 B | ENV UDEV=off
11 | 297 B | RUN echo 'path-exclude /usr/share/doc/*\npath-include /usr/share/doc/*/copyright\npath-exclude /usr/share/man/*\npath-exclude /...
12 | 99 B | RUN echo 'APT::Get::Assume-Yes "true";\nAPT::Install-Recommends "0";\nAPT::Install-Suggests "0";\nquiet "true";' > /etc/apt/apt...
13 | 0 B | RUN mkdir -p /usr/share/man/man1
14 | 1.7 kB | COPY file:cc0a16214fb66527d06e26dd509f8b445079ce6f426c59ba6ad81d4c075e5331 in /usr/bin/entry.sh
15 | 202 B | COPY file:2d972097f28a121b284f5d2672e57ed8403f4334fa291938641c699075b909bf in /usr/bin/balena-info
16 | 1 kB | COPY file:ddba37be3f874f815416b686ad1278c0b6e85aa69c0fc7da6326cc20c5eb8599 in /usr/bin/balena-idle
17 | 0 B | ENTRYPOINT ["/usr/bin/entry.sh"]
18 | 0 B | RUN curl -SLO "https://raw.githubusercontent.com/balena-io-library/base-images/a95300eda2320833e537ca20d728a870bf02177d/scripts...
19 | 503 B | RUN [ ! -d /.balena/messages ] && mkdir -p /.balena/messages; echo 'Here are a few details about this Docker image (For more in...
20 | 129.6 kB | RUN echo '#!/bin/sh.real\nbalena-info\nrm -f /bin/sh\ncp /bin/sh.real /bin/sh\n/bin/sh "$@"' > /bin/sh-shim && chmod +x /bin/s...
21 | 0 B | ENV ROCKET_ENV=staging
22 | 0 B | ENV ROCKET_PORT=80
23 | 0 B | ENV ROCKET_WORKERS=10
24 | 1.6 MB | cross-build-start
25 | 45.1 MB | RUN apt-get update && apt-get install -y --no-install-recommends openssl ca-certificates curl sqlite3 l...
26 | 1.7 MB | RUN mkdir /data
27 | 129.5 kB | cross-build-end
28 | 0 B | VOLUME [/data]
29 | 0 B | EXPOSE 80
30 | 0 B | EXPOSE 3012
31 | 41 B | COPY file:7362ddc535c017640bb0a03efe6a17b0c09e2d0fb2b4572f78e71cd87d936ac3 in .
32 | 26 MB | COPY dir:79b48b4c88e9f154e7d80f0899f674f4fad5b6adccdb838fb28298ed8bfdb788 in ./web-vault
33 | 28.9 MB | COPY file:6bac36f3aee9035c71e024c743b1083ee9f2e87528ab94d13a9f70805fbaedc7 in .
34 | 1.7 kB | COPY file:a583ffa09b5f7bc0984ca834c9e908cf89d31e98e5beb96c9d13306ba6ae7fc7 in /healthcheck.sh
35 | 251 B | COPY file:e923ba72c5767a8f4905feb1fecf3781728979b675e0ce1b1a88e0e8cb2ebb0c in /start.sh
36 | 0 B | HEALTHCHECK &{["CMD" "/healthcheck.sh"] "1m0s" "10s" "0s" '\x00'}
37 | 0 B | WORKDIR /
38 | 0 B | CMD ["/start.sh"]
39 | 0 B | ARG BUILD_FROM


@alexbelgium
Copy link
Owner

alexbelgium commented Jan 19, 2021

Thanks, and can you confirm that you have no error in your supervisor log when building the addon? Because I really don't understand why it doesn't seem to install the bitwarden layer...

And my portainer image info is totally different here I can't find any of the dockerfile commands... Even the bash is not the same! I have bash in the script and here it is sh... I'll request help in the forum.

@poudenes
Copy link
Contributor Author

Here supervisor log:

21-01-19 16:46:10 INFO (MainThread) [supervisor.addons] Creating Home Assistant add-on data folder /data/addons/data/db21ed7f_bitwarden
21-01-19 16:46:10 INFO (SyncWorker_0) [supervisor.docker.addon] Starting build for db21ed7f/armv7-addon-bitwarden:1.18.0
21-01-19 16:47:33 INFO (SyncWorker_0) [supervisor.docker.addon] Build db21ed7f/armv7-addon-bitwarden:1.18.0 done
21-01-19 16:47:33 INFO (MainThread) [supervisor.addons] Add-on 'db21ed7f_bitwarden' successfully installed
21-01-19 16:47:37 INFO (MainThread) [supervisor.api.security] /snapshots access from cebe7a76_hassio_google_drive_backup

When I start the add-on is this the rest of the log:

21-01-19 16:48:08 INFO (SyncWorker_2) [supervisor.docker.addon] Starting Docker add-on db21ed7f/armv7-addon-bitwarden with version 1.18.0
21-01-19 16:48:08 INFO (MainThread) [supervisor.api.security] /host/info access from db21ed7f_bitwarden

@alexbelgium
Copy link
Owner

Thanks for so much infos and tests. So supervisor is OK but I really don't understand the layout of your docker image in portainer. I'll request some help in the forum

@alexbelgium
Copy link
Owner

For info, the official addon will be updated soon. I've made a last update (removed labels that could interfere with build) but I'll stop searching unless I receive another idea by another dev.

@poudenes
Copy link
Contributor Author

Reload repo. Install. Start.

:( same issue...

Will wait for new version. Maybe that one will work.

@poudenes
Copy link
Contributor Author

poudenes commented Jan 20, 2021

I tried something. Saw a tutor to install something from docker-hub using Portainer.

Name: Bitwarden_RS
Registry: DockerHub
Image: fopina/bitwarden_rs:latest
Enable Publish all exposed network ports to random host ports
Click on “Deploy the container”

The install went ok. I did http:// and give the random port: 49154
And got the login screen, create a account, logged in

Bitwarden_RS version 2.14.0

Now figure out how to enable the ADMIN panel because get a message:

The admin panel is disabled, please configure the 'ADMIN_TOKEN' variable to enable it

I think I have to login into the docker and change something over there

But this was working without any problem.....

@alexbelgium
Copy link
Owner

alexbelgium commented Jan 20, 2021

Hi, nicely done! However, the fopina/bitwarden_rs is from May, and is based on the v1.15.0-1 according to docker hub. There should still be your issue with iOS app. The normal docker image is bitwardenrs/server:1.18.0

Actually the ADMIN_TOKEN is generated by a script in the hassio addon. You can do that manually : with portainer, you need to create in your docker image an Environement variable [ENV] named "ADMIN_TOKEN" that contains any random things that you want. Here is the official documention : https://github.com/dani-garcia/bitwarden_rs/wiki/Enabling-admin-page

However, I saw that the maintainer is busy updating the official addon! He worked on it this morning but didn't publish it yet. I have aligned my code this morning with his changes (mainly, updating the base layer). You could still try to remove my repo, re-add it and install my bitwarden addon 1.18.0 but my hopes are low ;-) However the official addon should be updated in a couple days!

@poudenes
Copy link
Contributor Author

I installed now the official: bitwardenrs/server

Version
Server Installed Ok 1.18.0
Server Latest 1.18.0
Web Installed Ok 2.17.1
Web Latest 2.17.1

Also without any problem. Even the ADMIN_TOKEN part worked.
Can we say that the install of your HA Add-on Maybe still have a issue?

This docker install via Portainer is not visible in HA... So no nice backup solution.
Hope the new release of yours will work than I will use that one for sure!

@alexbelgium
Copy link
Owner

You should update the official addon it has been updated to 0.7.0!

@poudenes
Copy link
Contributor Author

poudenes commented Jan 20, 2021

haha... how ironic... Everything is working, include iOS App and auto-fill support....
Is there anything different of your AddOn when you update it?
If it is better then Frencky one... I will switch :)

@alexbelgium
Copy link
Owner

alexbelgium commented Jan 20, 2021

Ahahah indeed how ironic! Glad it's working for you, and anyway I'm sure we both have gained a lot of knowledge trying to make it work!

Regarding my addon the only reason I did mine is because Frenck did not update his own for a very long time. So there is no benefit of mine over the current official one ;) I'll however still keep it as i don't know how often the official one will be updated in the future!

@poudenes
Copy link
Contributor Author

If yours is updated ill give it a try, then im sure it will updates sooner then the HA version.
That took so long!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants