Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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

In Connection.php: 1050 Table 'sessions' already exists #156

Closed
Ceredril opened this issue Nov 15, 2022 · 1 comment
Closed

In Connection.php: 1050 Table 'sessions' already exists #156

Ceredril opened this issue Nov 15, 2022 · 1 comment

Comments

@Ceredril
Copy link

Describe the bug

This is kind of a cry for help rather than a proper bug report. I have tried setting up this tracker in a docker-compose multiple times but it seems to fail.

Environment:

  • OS: Windows 10 with Docker Desktop v4.13.1
  • Architecture: amd64
  • used Installation: docker-compose with MariaDB/MySQL

Logs

[2022-11-15 09:06:49] production.ERROR: SQLSTATE[42S01]: Base table or view already exists: 1050 Table 'sessions' already exists (SQL: create table sessions (id varchar(255) not null, user_id bigint unsigned null, ip_address varchar(45) null, user_agent text null, payload longtext not null, last_activity int not null) default character set utf8mb4 collate 'utf8mb4_unicode_ci') {"exception":"[object] (Illuminate\Database\QueryException(code: 42S01): SQLSTATE[42S01]: Base table or view already exists: 1050 Table 'sessions' already exists (SQL: create table sessions (id varchar(255) not null, user_id bigint unsigned null, ip_address varchar(45) null, user_agent text null, payload longtext not null, last_activity int not null) default character set utf8mb4 collate 'utf8mb4_unicode_ci') at /var/www/html/vendor/laravel/framework/src/Illuminate/Database/Connection.php:760)

Full Log with stacktrace 🐇 Configuring Speedtest Tracker... ✅ Environment file exists 🔗 Creating symlinks to config and log files ✅ App key exists 🔒 Fixing app path file permissions 💰 Building the cache... [15-Nov-2022 09:06:48] NOTICE: fpm is running, pid 100 [15-Nov-2022 09:06:48] NOTICE: ready to handle connections [15-Nov-2022 09:06:48] NOTICE: systemd monitor interval set to 10000ms 🚛 Migrating the database... [2022-11-15 09:06:49] production.ERROR: SQLSTATE[42S01]: Base table or view already exists: 1050 Table 'sessions' already exists (SQL: create table `sessions` (`id` varchar(255) not null, `user_id` bigint unsigned null, `ip_address` varchar(45) null, `user_agent` text null, `payload` longtext not null, `last_activity` int not null) default character set utf8mb4 collate 'utf8mb4_unicode_ci') {"exception":"[object] (Illuminate\\Database\\QueryException(code: 42S01): SQLSTATE[42S01]: Base table or view already exists: 1050 Table 'sessions' already exists (SQL: create table `sessions` (`id` varchar(255) not null, `user_id` bigint unsigned null, `ip_address` varchar(45) null, `user_agent` text null, `payload` longtext not null, `last_activity` int not null) default character set utf8mb4 collate 'utf8mb4_unicode_ci') at /var/www/html/vendor/laravel/framework/src/Illuminate/Database/Connection.php:760) [stacktrace] #0 /var/www/html/vendor/laravel/framework/src/Illuminate/Database/Connection.php(720): Illuminate\\Database\\Connection->runQueryCallback() #1 /var/www/html/vendor/laravel/framework/src/Illuminate/Database/Connection.php(546): Illuminate\\Database\\Connection->run() #2 /var/www/html/vendor/laravel/framework/src/Illuminate/Database/Schema/Blueprint.php(109): Illuminate\\Database\\Connection->statement() #3 /var/www/html/vendor/laravel/framework/src/Illuminate/Database/Schema/Builder.php(404): Illuminate\\Database\\Schema\\Blueprint->build() #4 /var/www/html/vendor/laravel/framework/src/Illuminate/Database/Schema/Builder.php(267): Illuminate\\Database\\Schema\\Builder->build() #5 /var/www/html/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(338): Illuminate\\Database\\Schema\\Builder->create() #6 /var/www/html/database/migrations/2022_10_20_211143_create_sessions_table.php(23): Illuminate\\Support\\Facades\\Facade::__callStatic() #7 /var/www/html/vendor/laravel/framework/src/Illuminate/Database/Migrations/Migrator.php(481): Illuminate\\Database\\Migrations\\Migration@anonymous->up() #8 /var/www/html/vendor/laravel/framework/src/Illuminate/Database/Migrations/Migrator.php(399): Illuminate\\Database\\Migrations\\Migrator->runMethod() #9 /var/www/html/vendor/laravel/framework/src/Illuminate/Database/Migrations/Migrator.php(408): Illuminate\\Database\\Migrations\\Migrator->Illuminate\\Database\\Migrations\\{closure}() #10 /var/www/html/vendor/laravel/framework/src/Illuminate/Database/Migrations/Migrator.php(209): Illuminate\\Database\\Migrations\\Migrator->runMigration() #11 /var/www/html/vendor/laravel/framework/src/Illuminate/Console/View/Components/Task.php(36): Illuminate\\Database\\Migrations\\Migrator->Illuminate\\Database\\Migrations\\{closure}() #12 /var/www/html/vendor/laravel/framework/src/Illuminate/Database/Migrations/Migrator.php(738): Illuminate\\Console\\View\\Components\\Task->render() #13 /var/www/html/vendor/laravel/framework/src/Illuminate/Database/Migrations/Migrator.php(209): Illuminate\\Database\\Migrations\\Migrator->write() #14 /var/www/html/vendor/laravel/framework/src/Illuminate/Database/Migrations/Migrator.php(174): Illuminate\\Database\\Migrations\\Migrator->runUp() #15 /var/www/html/vendor/laravel/framework/src/Illuminate/Database/Migrations/Migrator.php(117): Illuminate\\Database\\Migrations\\Migrator->runPending() #16 /var/www/html/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/MigrateCommand.php(90): Illuminate\\Database\\Migrations\\Migrator->run() #17 /var/www/html/vendor/laravel/framework/src/Illuminate/Database/Migrations/Migrator.php(615): Illuminate\\Database\\Console\\Migrations\\MigrateCommand->Illuminate\\Database\\Console\\Migrations\\{closure}() #18 /var/www/html/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/MigrateCommand.php(102): Illuminate\\Database\\Migrations\\Migrator->usingConnection() #19 /var/www/html/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(36): Illuminate\\Database\\Console\\Migrations\\MigrateCommand->handle() #20 /var/www/html/vendor/laravel/framework/src/Illuminate/Container/Util.php(41): Illuminate\\Container\\BoundMethod::Illuminate\\Container\\{closure}() #21 /var/www/html/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(93): Illuminate\\Container\\Util::unwrapIfClosure() #22 /var/www/html/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(37): Illuminate\\Container\\BoundMethod::callBoundMethod() #23 /var/www/html/vendor/laravel/framework/src/Illuminate/Container/Container.php(651): Illuminate\\Container\\BoundMethod::call() #24 /var/www/html/vendor/laravel/framework/src/Illuminate/Console/Command.php(178): Illuminate\\Container\\Container->call() #25 /var/www/html/vendor/symfony/console/Command/Command.php(308): Illuminate\\Console\\Command->execute() #26 /var/www/html/vendor/laravel/framework/src/Illuminate/Console/Command.php(148): Symfony\\Component\\Console\\Command\\Command->run() #27 /var/www/html/vendor/symfony/console/Application.php(1014): Illuminate\\Console\\Command->run() #28 /var/www/html/vendor/symfony/console/Application.php(301): Symfony\\Component\\Console\\Application->doRunCommand() #29 /var/www/html/vendor/symfony/console/Application.php(171): Symfony\\Component\\Console\\Application->doRun() #30 /var/www/html/vendor/laravel/framework/src/Illuminate/Console/Application.php(111): Symfony\\Component\\Console\\Application->run() #31 /var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(155): Illuminate\\Console\\Application->run() #32 /var/www/html/artisan(37): Illuminate\\Foundation\\Console\\Kernel->handle() #33 {main}

[previous exception] [object] (PDOException(code: 42S01): SQLSTATE[42S01]: Base table or view already exists: 1050 Table 'sessions' already exists at /var/www/html/vendor/laravel/framework/src/Illuminate/Database/Connection.php:545)
[stacktrace]
#0 /var/www/html/vendor/laravel/framework/src/Illuminate/Database/Connection.php(545): PDOStatement->execute()
#1 /var/www/html/vendor/laravel/framework/src/Illuminate/Database/Connection.php(753): Illuminate\Database\Connection->Illuminate\Database\{closure}()
#2 /var/www/html/vendor/laravel/framework/src/Illuminate/Database/Connection.php(720): Illuminate\Database\Connection->runQueryCallback()
#3 /var/www/html/vendor/laravel/framework/src/Illuminate/Database/Connection.php(546): Illuminate\Database\Connection->run()
#4 /var/www/html/vendor/laravel/framework/src/Illuminate/Database/Schema/Blueprint.php(109): Illuminate\Database\Connection->statement()
#5 /var/www/html/vendor/laravel/framework/src/Illuminate/Database/Schema/Builder.php(404): Illuminate\Database\Schema\Blueprint->build()
#6 /var/www/html/vendor/laravel/framework/src/Illuminate/Database/Schema/Builder.php(267): Illuminate\Database\Schema\Builder->build()
#7 /var/www/html/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(338): Illuminate\Database\Schema\Builder->create()
#8 /var/www/html/database/migrations/2022_10_20_211143_create_sessions_table.php(23): Illuminate\Support\Facades\Facade::__callStatic()
#9 /var/www/html/vendor/laravel/framework/src/Illuminate/Database/Migrations/Migrator.php(481): Illuminate\Database\Migrations\Migration@anonymous->up()
#10 /var/www/html/vendor/laravel/framework/src/Illuminate/Database/Migrations/Migrator.php(399): Illuminate\Database\Migrations\Migrator->runMethod()
#11 /var/www/html/vendor/laravel/framework/src/Illuminate/Database/Migrations/Migrator.php(408): Illuminate\Database\Migrations\Migrator->Illuminate\Database\Migrations\{closure}()
#12 /var/www/html/vendor/laravel/framework/src/Illuminate/Database/Migrations/Migrator.php(209): Illuminate\Database\Migrations\Migrator->runMigration()
#13 /var/www/html/vendor/laravel/framework/src/Illuminate/Console/View/Components/Task.php(36): Illuminate\Database\Migrations\Migrator->Illuminate\Database\Migrations\{closure}()
#14 /var/www/html/vendor/laravel/framework/src/Illuminate/Database/Migrations/Migrator.php(738): Illuminate\Console\View\Components\Task->render()
#15 /var/www/html/vendor/laravel/framework/src/Illuminate/Database/Migrations/Migrator.php(209): Illuminate\Database\Migrations\Migrator->write()
#16 /var/www/html/vendor/laravel/framework/src/Illuminate/Database/Migrations/Migrator.php(174): Illuminate\Database\Migrations\Migrator->runUp()
#17 /var/www/html/vendor/laravel/framework/src/Illuminate/Database/Migrations/Migrator.php(117): Illuminate\Database\Migrations\Migrator->runPending()
#18 /var/www/html/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/MigrateCommand.php(90): Illuminate\Database\Migrations\Migrator->run()
#19 /var/www/html/vendor/laravel/framework/src/Illuminate/Database/Migrations/Migrator.php(615): Illuminate\Database\Console\Migrations\MigrateCommand->Illuminate\Database\Console\Migrations\{closure}()
#20 /var/www/html/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/MigrateCommand.php(102): Illuminate\Database\Migrations\Migrator->usingConnection()
#21 /var/www/html/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(36): Illuminate\Database\Console\Migrations\MigrateCommand->handle()
#22 /var/www/html/vendor/laravel/framework/src/Illuminate/Container/Util.php(41): Illuminate\Container\BoundMethod::Illuminate\Container\{closure}()
#23 /var/www/html/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(93): Illuminate\Container\Util::unwrapIfClosure()
#24 /var/www/html/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(37): Illuminate\Container\BoundMethod::callBoundMethod()
#25 /var/www/html/vendor/laravel/framework/src/Illuminate/Container/Container.php(651): Illuminate\Container\BoundMethod::call()
#26 /var/www/html/vendor/laravel/framework/src/Illuminate/Console/Command.php(178): Illuminate\Container\Container->call()
#27 /var/www/html/vendor/symfony/console/Command/Command.php(308): Illuminate\Console\Command->execute()

#28 /var/www/html/vendor/laravel/framework/src/Illuminate/Console/Command.php(148): Symfony\Component\Console\Command\Command->run()
#29 /var/www/html/vendor/symfony/console/Application.php(1014): Illuminate\Console\Command->run()
#30 /var/www/html/vendor/symfony/console/Application.php(301): Symfony\Component\Console\Application->doRunCommand()
#31 /var/www/html/vendor/symfony/console/Application.php(171): Symfony\Component\Console\Application->doRun()
#32 /var/www/html/vendor/laravel/framework/src/Illuminate/Console/Application.php(111): Symfony\Component\Console\Application->run()
#33 /var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(155): Illuminate\Console\Application->run()
#34 /var/www/html/artisan(37): Illuminate\Foundation\Console\Kernel->handle()
#35 {main}
"}
In Connection.php line 760:

SQLSTATE[42S01]: Base table or view already exists: 1050 Table 'sessions' a
lready exists (SQL: create table sessions (id varchar(255) not null, u ser_id bigint unsigned null, ip_address varchar(45) null, user_agent t
ext null, payload longtext not null, last_activity int not null) defaul
t character set utf8mb4 collate 'utf8mb4_unicode_ci')

In Connection.php line 545:

SQLSTATE[42S01]: Base table or view already exists: 1050 Table 'sessions' a
lready exists

s6-rc: warning: unable to start service startup: command exited 1
127.0.0.1 - - [15/Nov/2022:09:06:49 +0000] "GET /ping HTTP/1.1" 301 162 "-" "curl/7.81.0"
/run/s6/basedir/scripts/rc.init: warning: s6-rc failed to properly bring all the services up! Check your logs (in /run/uncaught-logs/current if you have in-container logging) for more information.
prog: fatal: stopping the container.
[15-Nov-2022 09:06:49] NOTICE: Terminating ...
[15-Nov-2022 09:06:49] NOTICE: exiting, bye-bye!

Additional context
I have tried pruning my system multiple times, but I do not even know how to find Connection.php
The container just keeps on restarting giving the same log over and over.

@alexjustesen
Copy link
Owner

@Ceredril converting to a discussion as it's the best place for help.

Repository owner locked and limited conversation to collaborators Nov 15, 2022
@alexjustesen alexjustesen converted this issue into discussion #157 Nov 15, 2022

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants