getAlby / hub

Alby Hub - Your own lightning node connected to every app. Run anywhere. Become self-sovereign.
https://albyhub.com
Apache License 2.0
89 stars 17 forks source link

bug: albyhub-phoenixd failed to create directory #537

Closed gzuuus closed 1 month ago

gzuuus commented 2 months ago

Trying to run albyhub-phoenixd docker compose in my vps fails: complete log:

[+] Running 2/2
 ✔ Container albyhub-phoenixd  Recreated                                                                                                                                                                                                     0.1s 
 ✔ Container albyhub           Recreated                                                                                                                                                                                                     0.1s 
Attaching to albyhub, albyhub-phoenixd
albyhub           | time="2024-08-23T14:21:57Z" level=info msg="NWC Starting in HTTP mode"
albyhub           | {"level":"info","msg":"AlbyHub v1.5.3","time":"2024-08-23T14:21:57Z"}
albyhub           | ⇨ http server started on [::]:8080
albyhub           | {"error":"Post \"https://api.getalby.com/events\": oauth2: token expired and refresh token is not set","event":{"event":"nwc_started","properties":{"version":"v1.5.3"}},"level":"error","msg":"Failed to send request to /events","time":"2024-08-23T14:21:57Z"}
albyhub-phoenixd  | Exception in thread "main" java.io.IOException: failed to create directory: /data/phoenixd
albyhub-phoenixd  |     at okio.JvmSystemFileSystem.createDirectory(JvmSystemFileSystem.kt:119)
albyhub-phoenixd  |     at okio.FileSystem.createDirectory(FileSystem.kt:96)
albyhub-phoenixd  |     at okio.internal.-FileSystem.commonCreateDirectories(FileSystem.kt:59)
albyhub-phoenixd  |     at okio.FileSystem.createDirectories(FileSystem.kt:100)
albyhub-phoenixd  |     at okio.FileSystem.createDirectories(FileSystem.kt:103)
albyhub-phoenixd  |     at fr.acinq.lightning.bin.Phoenixd.<init>(Main.kt:180)
albyhub-phoenixd  |     at fr.acinq.lightning.bin.MainKt.main(Main.kt:70)
albyhub-phoenixd exited with code 1

OS:

Description:    Ubuntu 22.04.4 LTS
Release:        22.04
Codename:       jammy
bumi commented 2 months ago

https://github.com/sethforprivacy/phoenixd-docker/issues/5

bumi commented 1 month ago

@gzuuus I think there is a difference between linux and mac. It runs for me on a mac.

From all I hear it is required to create the directory on the host with the correct permissions.

can you try this:

$ wget https://raw.githubusercontent.com/getAlby/hub/master/scripts/linux-x86_64/phoenixd/docker-compose.yml
$ mkdir -p ./albyhub-phoenixd/phoenixd && mkdir -p ./albyhub-phoenixd/albyhub # <- create the data directories for phoenixd and albyhub. make sure to have backups of this
$ docker-compose up # or docker-compose up --pull=always <- to make sure you get the latest images
gzuuus commented 1 month ago

This solved the problem 👌

bumi commented 1 month ago

ok, then we have to do it like this. thanks for testing and reporting! 🙏