dadatuputi/bitwarden_gcloud

Instance has become inaccessible

airmarshall opened this issue · 8 comments

Hi all. Long time user here.

My instance just became inaccessible on it's usual domain. I restarted the VM from the compute console. Access didn't return. Cloudflare is my DNS and the record is pointing to the correct Google VM Static IP.

This site can’t be reached

SSH'd in and viewed logs, only obvious error was the ddclient line 24 that has previously been closed.

So I did docker-compose pull, down, up -d - Line 24 Error gone but service is still not accessible.

It'd been a while, so I've since followed the previous guidance for git pull, down, up -d. I've also updated my .env to latest version having created a back-up of my previous.

The only things I have noted that may be causing the issue surround caddy.

Firstly

~/bitwarden_gcloud/caddy/data $ cd caddy/ -bash: cd: caddy/: Permission denied

~/bitwarden_gcloud/caddy/data $ cd logs/ -bash: cd: logs/: Permission denied

And from the caddy docker log

{"level":"warn","ts":1698447123.4964879,"msg":"Caddyfile input is not formatted; run 'caddy fmt --overwrite' to fix inconsistencies","adapter":"caddyfile","file":"/etc/caddy/Caddyfile","line":2}

Any help getting my instance back online would be much appreciated!

drwx------ 6 root        root        4.0K Oct 23 05:52 caddy
drwxr--r-- 2 root        root        4.0K Jun 21 06:39 logs

Does that look as expected? Comparable to yours?

Weirdly, it's all now come back up without any intervention, which makes no sense. I still can't access those directoried though, permission denied.

If you're using gcloud, the owner should be your google username (usually), or you might have chown'd them as root:?

I suggest you identify what user you are (should be easy, just printed on the command line, @. It should be the owner of the bitwarden_gcloud parent directory. You should then be able to sudo chown -R <your username>: ~/bitwarden_gcloud to fix the permissions.

I'm having the same issue.
proxy | {"level":"warn","ts":1701244560.4274518,"msg":"Caddyfile input is not formatted; run 'caddy fmt --overwrite' to fix inconsistencies","adapter":"caddyfile","file":"/etc/caddy/Caddyfile","line":2}

docker exec proxy caddy fmt --overwrite ${PWD}/caddy/Caddyfile Error: reading input file: open ******/bitwarden_gcloud/caddy/Caddyfile: no such file or directory

Same questions for you @gsgqgyq - what are the folder permissions?

drwxr-xr-x  8 username username 4.0K Nov 30 03:01 bitwarden
drwxr-xr-x  3 username username 4.0K Nov 30 03:00 caddy
drwx------  2 username username 4.0K Nov 30 02:59 dons

It doesn't look like there's an issue with folder permissions

I recreated the Debian instance and installed caddy with 'apt', and now successfully use Bitwarden on gcloud.
Still very grateful for this great project.

Interesting - using the Debian instance and apt to install Caddy are definitely outside the scope of this project, but I'm glad to hear you got it working!