hrfee / jfa-go

a bit-of-everything user managament app for Jellyfin
https://jfa-go.com
Other
823 stars 58 forks source link

Not sure what I'm doing wrong. #123

Closed dillfrescott closed 3 years ago

dillfrescott commented 3 years ago

I installed jfa-go exactly like it tells you to in the readme and all it says when i type jfa-go start is:

root@ae0178733709:/# jfa-go start 2021/06/23 20:10:04 Logging to "/tmp/jfa-go.log" 2021/06/23 20:10:04 Using internal storage jfa-go version: git (2ef73ab)

Socket: /tmp/jfa-go.sock

It never boots or anything. I fear I'm missing something very obvious here. Please help!

hrfee commented 3 years ago

You should be able to access the setup page at localhost:8056. If not, try running without start. If that still doesn't work, can you send the contents of /tmp/jfa-go.log?

dillfrescott commented 3 years ago

/tmp/jfa-go.log doesnt exist. But now I'm also getting the error:

[ERROR] 20:17:27 main.go:194: Couldn't open config file for writing: "/root/.config/jfa-go/config.ini"

hrfee commented 3 years ago

Weird, someone had something similar a while ago. Could check if /root/.config/jfa-go exists, and delete and try again if so? if not, could you try on another user account?

dillfrescott commented 3 years ago

The only directory that exists in that path is /root everything up to and past .config doesnt exist.

I tried to manually create the path and it caused another error.

dillfrescott commented 3 years ago

I really only have root on this machine. I'd have to try and make another account I guess...

dillfrescott commented 3 years ago

It is virtualized. Would that have anything to do with it?

hrfee commented 3 years ago

i think the last person who had the issue was also running a VM, but i heavily doubt that's the reason. Also, there's meant to be an extra line after Couldn't open config file for writing which includes the actual error, was it not output?

dillfrescott commented 3 years ago

It's not throwing that error anymore, just whats in the original post above. I don't believe there was anything under it though.

I can keep running it to see if it throws that error again.

dillfrescott commented 3 years ago

I'll give jfa-go a command and it kind of ignores it and just prints the same thing... very odd

hrfee commented 3 years ago

Could you try downloading a version without a tray icon and running again?

dillfrescott commented 3 years ago

I downloaded the server version

hrfee commented 3 years ago

Ah, the logging to /tmp/jfa-go.log is meant to only be shown on tray builds so I assumed you were using it, fixed it now. You've tried just jfa-go without the start part right?

dillfrescott commented 3 years ago

Correct. I tried just jfa-go i tried jfa-go start, jfa-go stop, etc...

They all kind of didnt really do anything :(

hrfee commented 3 years ago

Ok, this is very weird then. Could you try jfa-go -debug and send the output?

dillfrescott commented 3 years ago

root@731e6d92da9c:/# jfa-go -debug 2021/06/23 21:28:43 Logging to "/tmp/jfa-go.log" 2021/06/23 21:28:43 Using internal storage jfa-go version: git (2ef73ab)

Socket: /tmp/jfa-go.sock root@731e6d92da9c:/#

dillfrescott commented 3 years ago

And /tmp/jfa-go.log doesnt exist.

hrfee commented 3 years ago

Yeah the file isn't created, the message shouldn't be printed. This is really wracking my brain, I can't reproduce this and there's obviously no log output that's helpful for either of us. Last-ditch effort: Is there anything related to jfa-go in /tmp? Other than that, the only thing I can recommend is trying v0.3.7 or using docker.

dillfrescott commented 3 years ago

root@731e6d92da9c:/# cd /tmp root@731e6d92da9c:/tmp# ls clr-debug-pipe-40-8747029-in clr-debug-pipe-40-8747029-out dotnet-diagnostic-40-8747029-socket systemd-private-a123b7aa196b40868994c28ba54b53ea-systemd-logind.service-PHrTKf root@731e6d92da9c:/tmp#

dillfrescott commented 3 years ago

Its okay. I can try it with docker instead. I appreciate the assistance :)

dillfrescott commented 3 years ago

Can I run it on another machine and use an api key to connect to the jellyfin instance? I can try it on windows...

Or does it have to be on the same machine Jellyfin is running on?

hrfee commented 3 years ago

You can, the only reason you'd need filesystem access to Jellyfin is if you want password resets, in which case you can mount it the the system with jfa-go through something like SMB or sshfs. I forget which folder it is specifically you need access to, but Jellyfin should tell you when you try to reset your password.

dillfrescott commented 3 years ago

Excellent. Thank you!

dillfrescott commented 3 years ago

You can either leave this open or close it. Not sure if its really a bug or not...

hrfee commented 3 years ago

Me neither, but considering others have had weird problems like this I think i'll leave it open for now in case any potential solutions can help anyone.

Sim7b commented 3 years ago

Same problem for me, ct debian on proxmox, first launch was ok.

hrfee commented 3 years ago

@Sim7b so nothing is output after Socket: /tmp/jfa-go.sock and no crash logs in /tmp?

Sim7b commented 3 years ago

`root@Jellyfin:~# jfa-go -debug 2021/07/13 17:10:12 Logging to "/tmp/jfa-go.log" 2021/07/13 17:10:12 Using internal storage jfa-go version: 0.3.7 (a0af763)

Socket: /tmp/jfa-go.sock [DEBUG] 17:10:12 main.go:318: Loaded config file "/root/.config/jfa-go/config.ini" [DEBUG] 17:10:12 main.go:320: Loading storage

[INFO] 17:10:12 Using Jellyfin server type`

hrfee commented 3 years ago

Does it get stuck at that point, or does it crash straight away?

Sim7b commented 3 years ago

it crash straight :/

hrfee commented 3 years ago

Could you check the contents of /root/.config/jfa-go/config.ini and look for a line like this?

server                      = http://localhost:8096

is the address in yours the correct Jellyfin server address? Also, it shouldn't matter, but if the URL doesn't already have http:///https://, could you add it?

Sim7b commented 3 years ago

Already did, I tried with external address too

hrfee commented 3 years ago

forgot to ask, are you using jfa-go or jfa-go-tray?

Sim7b commented 3 years ago

jfa-go server only for me

hrfee commented 3 years ago

Sorry for the delay, was just spinning up a debian container to check nothing was wrong with the release itself (seemed to work for me). During the setup process on the Jellyfin section, did you press "Test Connection", and if so did it succeed?

Sim7b commented 3 years ago

No worries ;) Yes it was functionnal, create link, account etc

hrfee commented 3 years ago

Oh wait, was the program working after the setup? Could you access the admin page and everything?

Sim7b commented 3 years ago

Yes exactly

hrfee commented 3 years ago

Ah, even weirder then. What's the output of ps aux | grep jfa-go?

Sim7b commented 3 years ago

Sorry I have to go, I tell you tomorrow ! Thanks for your reactivity !!

DarkVirtue commented 3 years ago

I'm having this same issue in a Debian 11 VM using the jfa-go_amd64_v0.3.7.deb release. The initial setup was fine: I was able to access the page, set up a user, successfully connect to Jellyfin, create a new user, create a profile, etc.

root@test2:/var/lib/jfa-go# sudo -Hu jfa-go jfa-go -c /var/lib/jfa-go/config.ini -d /var/lib/jfa-go/data -debug start
2021/08/17 07:49:55 Logging to "/tmp/jfa-go.log"
2021/08/17 07:49:55 Using internal storage
jfa-go version: 0.3.7 (a0af763)

Socket: /tmp/jfa-go.sock

A timestamped crash log is created:

root@test2:/var/lib/jfa-go# cat /tmp/jfa-go-crash-2021-08-17T07\:49\:55.txt 
2021/08/17 07:49:55 Using internal storage
jfa-go version: 0.3.7 (a0af763)
Socket: /tmp/jfa-go.sock
[DEBUG] 07:49:55 main.go:318: Loaded config file "/var/lib/jfa-go/config.ini"
[DEBUG] 07:49:55 main.go:320: Loading storage
[INFO] 07:49:55  Using Jellyfin server type
[INFO] 07:49:55  Authenticated with http://127.0.0.1:8096

The socket was created, but there are no jfa-go processes running:

root@test2:/var/lib/jfa-go# ll /tmp/jfa-go.sock
srwxr-xr-x 1 jfa-go jfa-go 0 Aug 17 07:56 /tmp/jfa-go.sock
root@test2:/var/lib/jfa-go# ps aux | grep jfa
root        2550  0.0  0.0   6180   648 pts/0    S+   07:53   0:00 grep jfa

I removed the socket file and tried starting again in the foreground:

root@test2:/var/lib/jfa-go# sudo -Hu jfa-go jfa-go -c /var/lib/jfa-go/config.ini -d /var/lib/jfa-go/data -debug
2021/08/17 07:59:00 Logging to "/tmp/jfa-go.log"
2021/08/17 07:59:00 Using internal storage
jfa-go version: 0.3.7 (a0af763)

Socket: /tmp/jfa-go.sock
[DEBUG] 07:59:00 main.go:318: Loaded config file "/var/lib/jfa-go/config.ini"
[DEBUG] 07:59:00 main.go:320: Loading storage

[INFO] 07:59:00  Using Jellyfin server type

[INFO] 07:59:00  Authenticated with http://127.0.0.1:8096
2021/08/17 07:59:00 
------
A crash report has been saved to "/tmp/jfa-go-crash-2021-08-17T07:59:00.txt".
------
Couldn't find a suitable web browser!
Set the BROWSER environment variable to your desired browser.
Warning: program returned non-zero exit code #256
/usr/bin/xdg-open: 882: www-browser: not found
/usr/bin/xdg-open: 882: links2: not found
/usr/bin/xdg-open: 882: elinks: not found
/usr/bin/xdg-open: 882: links: not found
/usr/bin/xdg-open: 882: lynx: not found
/usr/bin/xdg-open: 882: w3m: not found
xdg-open: no method available for opening 'file:///tmp/jfa-go-crash-2021-08-17T07:59:00.html'
root@test2:/var/lib/jfa-go# cat /tmp/jfa-go-crash-2021-08-17T07\:59\:00.txt 
2021/08/17 07:59:00 Using internal storage
jfa-go version: 0.3.7 (a0af763)
Socket: /tmp/jfa-go.sock
[DEBUG] 07:59:00 main.go:318: Loaded config file "/var/lib/jfa-go/config.ini"
[DEBUG] 07:59:00 main.go:320: Loading storage
[INFO] 07:59:00  Using Jellyfin server type
[INFO] 07:59:00  Authenticated with http://127.0.0.1:8096

No socket, no running jfa-go processes. The command even returned exit code 0.

hrfee commented 3 years ago

@DarkVirtue So it worked after you pressed submit and refreshed the page, it worked? At what point did it start crashing?

DarkVirtue commented 3 years ago

It started crashing after I stopped the initial run of the service and tried to start it again.

It seems like I can reproduce the initial good run by deleting the config.ini and data directory, but subsequent runs produce the above result.

hrfee commented 3 years ago

Could i ask which features you enabled during setup? Specifically big ones like Ombi, Email, Password Resets, etc. This way i can try to recreate your situation.

DarkVirtue commented 3 years ago

My config file is attached as a txt file (GitHub doesn't allow upload of a .ini). config.txt

hrfee commented 3 years ago

Thanks for sending over the config, I get a crash at the same point as you even after i put in my own config values. Since i'm running on a system with a GUI, the generated web page includes the error, while the text log does not. I'll try fix both issues now.

hrfee commented 3 years ago

The latest unstable release might fix your issue, and it not it should give you an actuall error this time. You can download it from here to try it and then if it works you can switch to the unstable Debian repo.

DarkVirtue commented 3 years ago

Yes, this does appear to have fixed the crash and jfa-go seems to be behaving as expected. Thanks a lot!

hrfee commented 3 years ago

Gonna close this now since it seems the issue is fixed and the other poster hasn't responded in a while.