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

Can't login after install and configuration (error 500) #54

Open
maxou2600 opened this issue Jan 27, 2021 · 4 comments
Open

Can't login after install and configuration (error 500) #54

maxou2600 opened this issue Jan 27, 2021 · 4 comments

Comments

@maxou2600
Copy link

Hi,

I'm unable to login into koel, i ran php artisan koel:init into my container, and as mentioned, it fails at the frontend assets.

There seem to be no problem with the database mysql 5.7 running in the same network as koel, it is filled with the good entered Name and email in "users" table, and the others tables are also created (checked with phpmyadmin).

There is the error 500 in Firefox.
500

My configuration :
docker run -d --name koel -p 9004:80 -v /320GB/.koel/.koel.env:/var/www/html/.env --hostname koel --ip 172.18.1.4 --network=koel-net -v /320GB/Music:/music -v /320GB/.koel/covers:/var/www/html/public/img/covers hyzual/koel

In the environment file, there is only the database details (host,port,username,pw).

Thank you.

@Hyzual
Copy link
Collaborator

Hyzual commented Jan 29, 2021

Hi, could you please run the following command and paste the results here ? It will likely help us understand the error.

$ docker exec koel cat storage/logs/laravel.log

@kroyoo
Copy link

kroyoo commented Mar 16, 2021

I found out that I made this mistake too, but it was weird.I have no problem logging in on my computer and mobile phone. This error occurs when I log in from a friend or other computer.This is the log that appeared after I cleared it and tried to log in.

`[2021-03-16 02:45:31] production.ERROR: flock(): Argument #1 ($stream) must be of type resource, bool given {"exception":"[object] (TypeError(code: 0): flock(): Argument #1 ($stream) must be of type resource, bool given at /var/www/html/vendor/laravel/framework/src/Illuminate/Filesystem/LockableFile.php:147)
[stacktrace]
#0 /var/www/html/vendor/laravel/framework/src/Illuminate/Filesystem/LockableFile.php(147): flock()
#1 /var/www/html/vendor/laravel/framework/src/Illuminate/Cache/FileStore.php(104): Illuminate\Filesystem\LockableFile->getExclusiveLock()
#2 /var/www/html/vendor/laravel/framework/src/Illuminate/Cache/Repository.php(309): Illuminate\Cache\FileStore->add()
#3 /var/www/html/vendor/laravel/framework/src/Illuminate/Cache/RateLimiter.php(93): Illuminate\Cache\Repository->add()
#4 /var/www/html/vendor/laravel/framework/src/Illuminate/Routing/Middleware/ThrottleRequests.php(124): Illuminate\Cache\RateLimiter->hit()
#5 /var/www/html/vendor/laravel/framework/src/Illuminate/Routing/Middleware/ThrottleRequests.php(63): Illuminate\Routing\Middleware\ThrottleRequests->handleRequest()
#6 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Illuminate\Routing\Middleware\ThrottleRequests->handle()
#7 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(103): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#8 /var/www/html/vendor/laravel/framework/src/Illuminate/Routing/Router.php(694): Illuminate\Pipeline\Pipeline->then()
#9 /var/www/html/vendor/laravel/framework/src/Illuminate/Routing/Router.php(669): Illuminate\Routing\Router->runRouteWithinStack()
#10 /var/www/html/vendor/laravel/framework/src/Illuminate/Routing/Router.php(635): Illuminate\Routing\Router->runRoute()
#11 /var/www/html/vendor/laravel/framework/src/Illuminate/Routing/Router.php(624): Illuminate\Routing\Router->dispatchToRoute()
#12 /var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(166): Illuminate\Routing\Router->dispatch()
#13 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(128): Illuminate\Foundation\Http\Kernel->Illuminate\Foundation\Http\{closure}()
#14 /var/www/html/app/Http/Middleware/ForceHttps.php(26): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#15 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): App\Http\Middleware\ForceHttps->handle()
#16 /var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php(21): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#17 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Illuminate\Foundation\Http\Middleware\TransformsRequest->handle()
#18 /var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php(21): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#19 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Illuminate\Foundation\Http\Middleware\TransformsRequest->handle()
#20 /var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/ValidatePostSize.php(27): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#21 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Illuminate\Foundation\Http\Middleware\ValidatePostSize->handle()
#22 /var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/PreventRequestsDuringMaintenance.php(86): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#23 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Illuminate\Foundation\Http\Middleware\PreventRequestsDuringMaintenance->handle()
#24 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(103): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#25 /var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(141): Illuminate\Pipeline\Pipeline->then()
#26 /var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(110): Illuminate\Foundation\Http\Kernel->sendRequestThroughRouter()
#27 /var/www/html/public/index.php(57): Illuminate\Foundation\Http\Kernel->handle()
#28 {main}
"}
root@6e38cd118757:/var/www/html# cat storage/logs/laravel.log

`
image

@Hyzual
Copy link
Collaborator

Hyzual commented Mar 16, 2021

Hi, thanks for posting the logs. There appears to be a bug somewhere in koel. As I'm not maintainer of koel, I cannot help you further 😕. I just build the docker image. I've looked quickly and it looks like there is no existing issue with flock() at the moment. Could you please open one at https://github.com/koel/koel/issues ?

@kroyoo
Copy link

kroyoo commented Mar 30, 2021

我发现,这个问题可能是由于docker重启导致容器ip改变,并且MySQL中设置仅限于容器IP访问例如'koel'@'172.17.0.4'。重启之后可能会改变,我们只需要固定容器IP或者MySQL开放docker 的ip段访问,例如:grant all on koel.* to "koel"@"172.17.0.%" with grant option;。当然,记得添加防火墙规则

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants