mirror of
https://github.com/koel/koel.git
synced 2026-04-27 01:35:59 +03:00
[GH-ISSUE #766] Koel server working, but seemingly spontaneous trouble logging in #550
Labels
No labels
Authentication
Dependencies
Documentation
Feature Request
Flac
Help Wanted
Installation/Setup
Integration
Mobile
PR Welcome
Pending Release
Performance
Playlist
S3
Search
Sync
[Pri] Low
[Pri] Normal
[Status] Keep Open
[Status] Needs Author Reply
[Status] Needs Review
[Status] Stale
[Status] Will Implement
[Type] Blessed
[Type] Bug
[Type] Duplicate
[Type] Enhancement
[Type] Help Request
[Type] Question
[Type] Task
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/koel-koel#550
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @hexydes on GitHub (Jul 16, 2018).
Original GitHub issue: https://github.com/koel/koel/issues/766
Hey, after some initial troubles, I was able to get Koel installed and working...mostly. After it initially started working, I added a bunch of music and synced it via SSH. Everything worked fine for about 12 hours, but I went to load the site up on my phone, and it wouldn't log in. I would enter the email and password, it looks like it "works" (no error about the wrong email/password), and then just refreshes the page back at the login. It seems similar to https://github.com/phanan/koel/issues/616 possibly. I shrugged my shoulders, figured something happened on the server, and thought I'd check it out in a few hours.
Then, without doing anything on the server, it started working again. Fine, whatever, chalk it up as an anomaly. It went on working for the rest of the next day (as far as I know, though I wasn't checking it constantly). However 24 hours later, it's back to not letting me log in again. It still seems to be working on my phone (that was left logged in), but I can't log in anywhere else. I tried a different browser on my phone, Chrome and Safari on my Mac, and none of them will log in.
I can dig up more environment details a little later if necessary, and will update if it starts working again spontaneously. If there are any error logs I can dig through, let me know and I'll check those as well. Thanks in advance!
@hexydes commented on GitHub (Jul 16, 2018):
UPDATE
In checking the browser console, I receive:
Thoughts on what that might be pointing to? Again, I didn't do anything on the server from when it WAS working to it NOT working, which makes me think something might be failing on the server end (Koel or not). I just tried restarting the server (Nginx) but no luck.
UPDATE 2
I tracked it down to this issue, via the error message "file_put_contents" and "failed to open stream: No such file or directory" that was coming up when watching the Network stream from the console. Issuing the command:
allowed me to successfully log in. I'm a bit concerned that it will just fail again in the future, and obviously I have a way to get around the problem, but I feel like I've treated the symptom, not the cause.
@gamerlv commented on GitHub (Jul 17, 2018):
I'm not entirely sure what is going on in your case I can give you some pointers where to look.
Firstly,
file_put_contents()errors sound like some kind of permission issue. Does the webserver user (Usually www-data or apache) have full read and write rights to the cache folder and subfolders?If that is the case you'll need to look into the log files for more info. Koel should keep a log file in either
storage/logs/laravel.logorstorage/app/koel.lognot sure which, been a while.Lastly a good place to look when you see http 500 error is the webserver error log. These sometime contain valuable clues. The default nginx error log is located at
/var/log/nginx/error.log, the exact location depends on your server configuration.@hexydes commented on GitHub (Jul 17, 2018):
Thanks for the ideas @gamerlv ! I am using www-data as the user doing "Koel stuff" with Nginx. I'm not 100% sure if www-data has access to both read and write the cache folder/tree, I had a really bumpy install. That's something to check for sure (though it's weird that it just appears to lock up every 24 hours or so...maybe it's doing something with the cache periodically?).
I'll take a poke through the Koel/Nginx logs when I get a few minutes to see if there's anything interesting going on there.
Thanks!
@hexydes commented on GitHub (Jul 30, 2018):
More updates on this, I haven't done anything new on the server, other than add some music. It seems like things work fine for about a week, and then suddenly, I'm just logged out. I'll SSH back into the server, issue a cache:clear command, and boom, everything is working fine. This isn't after adding music or anything, just sort of spontaneously just stops working (last time I added a track was at least 4 days ago, it worked fine that whole time until just now). Not sure what's going on, on the server end, to cause this to happen every so often. :(
@xordspar0 commented on GitHub (Sep 10, 2018):
@hexydes Is this still happening? Did you get a chance to look at your logs? Could you post the errors recorded there?
@hexydes commented on GitHub (Sep 11, 2018):
Hi @xordspar0 I have not had a chance to look at the logs, but I've also not run into the problem again for at least a month. I haven't made any changes on the server, but I also haven't added any additional music. Maybe soon I'll try adding a few more files, and see if that messes anything up.
@psistorm commented on GitHub (Dec 14, 2018):
I'm having the same issue. I'm using the Docker image from binhex/arch-koel. I found out I needed to hit "Reload without cache" in the browser multiple times and finally it worked at some point. It also worked when typing in
php artisan cache:clearlike suggested above without hitting reload. Any suggestions where to look at?@Hyzual commented on GitHub (Feb 13, 2019):
I'm having the same issue, I get a 500 error repeatedly on /data while trying to log in.
The laravel cache show the following error (with 50 lines of stack trace)
[2019-02-13 08:01:05] production.ERROR: Tymon\JWTAuth\Exceptions\TokenInvalidException: Token Signature could not be verified. in /var/www/html/vendor/tymon/jwt-auth/src/Providers/JWT/NamshiAdapter.php:71@tachikomachann commented on GitHub (Nov 27, 2020):
I have the same problem. And after I set 'JWT_SECRET', problem solved.