portabilis/i-educar

Erro SQLSTATE durante a instalação do i-Educar 2.6.0

Closed this issue · 6 comments

Oi pessoal, tive um pequeno problema quando fui realizar uma instalação limpa da última versão do i-Educar.

MENU:
Durante a instalação do i-Educar

DESCRIÇÃO:
Ao clicar para realizar a instalação, o instalador trava em Gerando chave da aplicação, ao que não acrescenta a chave no .env. Tentei manualmente pelo key:generate e o artisan escreveu a chave sem problemas no arquivo. Além disso, apresentou um erro SQLSTATE no log, que transcrevo a seguir:

[2021-04-25 18:49:09] production.ERROR: SQLSTATE[42P01]: Undefined table: 7 ERROR:  relation "settings" does not exist
LINE 1: select * from “settings”
^ (SQL: select * from “settings”) {“exception”:"[object] (Illuminate\Database\QueryException(code: 42P01): SQLSTATE[42P01]: Undefined table: 7 ERROR: relation “settings” does not exist
LINE 1: select * from “settings”
^ (SQL: select * from “settings”) at /var/www/html/babel2/vendor/laravel/framework/src/Illuminate/Database/Connection.php:678)
[stacktrace]
#0 /var/www/html/babel2/vendor/laravel/framework/src/Illuminate/Database/Connection.php(638): Illuminate\Database\Connection->runQueryCallback()
#1 /var/www/html/babel2/vendor/laravel/framework/src/Illuminate/Database/Connection.php(346): Illuminate\Database\Connection->run()
#2 /var/www/html/babel2/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php(2313): Illuminate\Database\Connection->select()
#3 /var/www/html/babel2/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php(2301): Illuminate\Database\Query\Builder->runSelect()
#4 /var/www/html/babel2/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php(2796): Illuminate\Database\Query\Builder->Illuminate\Database\Query\{closure}()
#5 /var/www/html/babel2/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php(2302): Illuminate\Database\Query\Builder->onceWithColumns()
#6 /var/www/html/babel2/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Builder.php(588): Illuminate\Database\Query\Builder->get()
#7 /var/www/html/babel2/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Builder.php(572): Illuminate\Database\Eloquent\Builder->getModels()
#8 /var/www/html/babel2/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php(477): Illuminate\Database\Eloquent\Builder->get()
#9 /var/www/html/babel2/app/Http/Middleware/LoadSettings.php(58): Illuminate\Database\Eloquent\Model::all()
#10 /var/www/html/babel2/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): App\Http\Middleware\LoadSettings->handle()
#11 /var/www/html/babel2/app/Http/Middleware/ConnectTenantDatabase.php(35): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#12 /var/www/html/babel2/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): App\Http\Middleware\ConnectTenantDatabase->handle()
#13 /var/www/html/babel2/app/Http/Middleware/ChangeAppName.php(28): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#14 /var/www/html/babel2/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): App\Http\Middleware\ChangeAppName->handle()
#15 /var/www/html/babel2/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php(21): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#16 /var/www/html/babel2/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Illuminate\Foundation\Http\Middleware\TransformsRequest->handle()
#17 /var/www/html/babel2/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php(21): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#18 /var/www/html/babel2/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Illuminate\Foundation\Http\Middleware\TransformsRequest->handle()
#19 /var/www/html/babel2/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/ValidatePostSize.php(27): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#20 /var/www/html/babel2/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Illuminate\Foundation\Http\Middleware\ValidatePostSize->handle()
#21 /var/www/html/babel2/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/PreventRequestsDuringMaintenance.php(86): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#22 /var/www/html/babel2/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Illuminate\Foundation\Http\Middleware\PreventRequestsDuringMaintenance->handle()
#23 /var/www/html/babel2/vendor/fruitcake/laravel-cors/src/HandleCors.php(37): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#24 /var/www/html/babel2/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Fruitcake\Cors\HandleCors->handle()
#25 /var/www/html/babel2/vendor/fideloper/proxy/src/TrustProxies.php(57): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#26 /var/www/html/babel2/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Fideloper\Proxy\TrustProxies->handle()
#27 /var/www/html/babel2/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(103): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#28 /var/www/html/babel2/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(141): Illuminate\Pipeline\Pipeline->then()
#29 /var/www/html/babel2/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(110): Illuminate\Foundation\Http\Kernel->sendRequestThroughRouter()
#30 /var/www/html/babel2/public/index.php(52): Illuminate\Foundation\Http\Kernel->handle()
#31 {main}

[previous exception] [object] (Doctrine\DBAL\Driver\PDO\Exception(code: 42P01): SQLSTATE[42P01]: Undefined table: 7 ERROR: relation “settings” does not exist
LINE 1: select * from “settings”
^ at /var/www/html/babel2/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDO/Exception.php:18)
[stacktrace]
#0 /var/www/html/babel2/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php(117): Doctrine\DBAL\Driver\PDO\Exception::new()
#1 /var/www/html/babel2/vendor/laravel/framework/src/Illuminate/Database/Connection.php(343): Doctrine\DBAL\Driver\PDOStatement->execute()
#2 /var/www/html/babel2/vendor/laravel/framework/src/Illuminate/Database/Connection.php(671): Illuminate\Database\Connection->Illuminate\Database\{closure}()
#3 /var/www/html/babel2/vendor/laravel/framework/src/Illuminate/Database/Connection.php(638): Illuminate\Database\Connection->runQueryCallback()
#4 /var/www/html/babel2/vendor/laravel/framework/src/Illuminate/Database/Connection.php(346): Illuminate\Database\Connection->run()
#5 /var/www/html/babel2/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php(2313): Illuminate\Database\Connection->select()
#6 /var/www/html/babel2/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php(2301): Illuminate\Database\Query\Builder->runSelect()
#7 /var/www/html/babel2/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php(2796): Illuminate\Database\Query\Builder->Illuminate\Database\Query\{closure}()
#8 /var/www/html/babel2/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php(2302): Illuminate\Database\Query\Builder->onceWithColumns()
#9 /var/www/html/babel2/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Builder.php(588): Illuminate\Database\Query\Builder->get()
#10 /var/www/html/babel2/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Builder.php(572): Illuminate\Database\Eloquent\Builder->getModels()
#11 /var/www/html/babel2/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php(477): Illuminate\Database\Eloquent\Builder->get()
#12 /var/www/html/babel2/app/Http/Middleware/LoadSettings.php(58): Illuminate\Database\Eloquent\Model::all()
#13 /var/www/html/babel2/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): App\Http\Middleware\LoadSettings->handle()
#14 /var/www/html/babel2/app/Http/Middleware/ConnectTenantDatabase.php(35): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#15 /var/www/html/babel2/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): App\Http\Middleware\ConnectTenantDatabase->handle()
#16 /var/www/html/babel2/app/Http/Middleware/ChangeAppName.php(28): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#17 /var/www/html/babel2/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): App\Http\Middleware\ChangeAppName->handle()
#18 /var/www/html/babel2/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php(21): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#19 /var/www/html/babel2/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Illuminate\Foundation\Http\Middleware\TransformsRequest->handle()
#20 /var/www/html/babel2/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php(21): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#21 /var/www/html/babel2/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Illuminate\Foundation\Http\Middleware\TransformsRequest->handle()
#22 /var/www/html/babel2/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/ValidatePostSize.php(27): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#23 /var/www/html/babel2/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Illuminate\Foundation\Http\Middleware\ValidatePostSize->handle()
#24 /var/www/html/babel2/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/PreventRequestsDuringMaintenance.php(86): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#25 /var/www/html/babel2/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Illuminate\Foundation\Http\Middleware\PreventRequestsDuringMaintenance->handle()
#26 /var/www/html/babel2/vendor/fruitcake/laravel-cors/src/HandleCors.php(37): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#27 /var/www/html/babel2/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Fruitcake\Cors\HandleCors->handle()
#28 /var/www/html/babel2/vendor/fideloper/proxy/src/TrustProxies.php(57): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#29 /var/www/html/babel2/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Fideloper\Proxy\TrustProxies->handle()
#30 /var/www/html/babel2/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(103): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#31 /var/www/html/babel2/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(141): Illuminate\Pipeline\Pipeline->then()
#32 /var/www/html/babel2/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(110): Illuminate\Foundation\Http\Kernel->sendRequestThroughRouter()
#33 /var/www/html/babel2/public/index.php(52): Illuminate\Foundation\Http\Kernel->handle()
#34 {main}

[previous exception] [object] (PDOException(code: 42P01): SQLSTATE[42P01]: Undefined table: 7 ERROR: relation “settings” does not exist
LINE 1: select * from “settings”
^ at /var/www/html/babel2/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php:115)
[stacktrace]
#0 /var/www/html/babel2/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php(115): PDOStatement->execute()
#1 /var/www/html/babel2/vendor/laravel/framework/src/Illuminate/Database/Connection.php(343): Doctrine\DBAL\Driver\PDOStatement->execute()
#2 /var/www/html/babel2/vendor/laravel/framework/src/Illuminate/Database/Connection.php(671): Illuminate\Database\Connection->Illuminate\Database\{closure}()
#3 /var/www/html/babel2/vendor/laravel/framework/src/Illuminate/Database/Connection.php(638): Illuminate\Database\Connection->runQueryCallback()
#4 /var/www/html/babel2/vendor/laravel/framework/src/Illuminate/Database/Connection.php(346): Illuminate\Database\Connection->run()
#5 /var/www/html/babel2/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php(2313): Illuminate\Database\Connection->select()
#6 /var/www/html/babel2/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php(2301): Illuminate\Database\Query\Builder->runSelect()
#7 /var/www/html/babel2/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php(2796): Illuminate\Database\Query\Builder->Illuminate\Database\Query\{closure}()
#8 /var/www/html/babel2/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php(2302): Illuminate\Database\Query\Builder->onceWithColumns()
#9 /var/www/html/babel2/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Builder.php(588): Illuminate\Database\Query\Builder->get()
#10 /var/www/html/babel2/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Builder.php(572): Illuminate\Database\Eloquent\Builder->getModels()
#11 /var/www/html/babel2/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php(477): Illuminate\Database\Eloquent\Builder->get()
#12 /var/www/html/babel2/app/Http/Middleware/LoadSettings.php(58): Illuminate\Database\Eloquent\Model::all()
#13 /var/www/html/babel2/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): App\Http\Middleware\LoadSettings->handle()
#14 /var/www/html/babel2/app/Http/Middleware/ConnectTenantDatabase.php(35): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#15 /var/www/html/babel2/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): App\Http\Middleware\ConnectTenantDatabase->handle()
#16 /var/www/html/babel2/app/Http/Middleware/ChangeAppName.php(28): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#17 /var/www/html/babel2/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): App\Http\Middleware\ChangeAppName->handle()
#18 /var/www/html/babel2/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php(21): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#19 /var/www/html/babel2/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Illuminate\Foundation\Http\Middleware\TransformsRequest->handle()
#20 /var/www/html/babel2/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php(21): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#21 /var/www/html/babel2/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Illuminate\Foundation\Http\Middleware\TransformsRequest->handle()
#22 /var/www/html/babel2/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/ValidatePostSize.php(27): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#23 /var/www/html/babel2/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Illuminate\Foundation\Http\Middleware\ValidatePostSize->handle()
#24 /var/www/html/babel2/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/PreventRequestsDuringMaintenance.php(86): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#25 /var/www/html/babel2/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Illuminate\Foundation\Http\Middleware\PreventRequestsDuringMaintenance->handle()
#26 /var/www/html/babel2/vendor/fruitcake/laravel-cors/src/HandleCors.php(37): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#27 /var/www/html/babel2/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Fruitcake\Cors\HandleCors->handle()
#28 /var/www/html/babel2/vendor/fideloper/proxy/src/TrustProxies.php(57): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#29 /var/www/html/babel2/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Fideloper\Proxy\TrustProxies->handle()
#30 /var/www/html/babel2/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(103): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#31 /var/www/html/babel2/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(141): Illuminate\Pipeline\Pipeline->then()
#32 /var/www/html/babel2/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(110): Illuminate\Foundation\Http\Kernel->sendRequestThroughRouter()
#33 /var/www/html/babel2/public/index.php(52): Illuminate\Foundation\Http\Kernel->handle()
#34 {main}
"}

AMBIENTE:

  • Plataforma utilizada: instalação direta
  • SO: Ubuntu 18.04
  • Navegador: Brave 1.23.73/Chromium 90.0.4430.85
  • Outros detalhes importantes: PHP 7.4.18 e Postgres 13.2-1.pgdg18.04+1

@cvmacedog parece que a instalação não foi concluída totalmente e você tentou acessar o i-Educar via browser. Você consegue refazer a instalação?

@edersoares, fiz um wget direto do diretório no Github, e iniciei pelo instalador, mas agora empaca no "Gerando chave da aplicação" e sem gerar o log de erros. Não sei se instalando direto do terminal resolveria.

@cvmacedog agora estava vendo, se você clonou o repositório, você precisa usar a instalação https://github.com/portabilis/i-educar#instala%C3%A7%C3%A3o-utilizando-docker ou acesse a página de releases e baixe a última versão https://github.com/portabilis/i-educar/releases.

Pelo que entendi, você está fazendo uma instalação direta, mas quer utilizar o instalador do i-Educar para fazer o restante da instalação. Desta forma não funciona, pois as dependências e configurações são diferentes para cada tipo de instalação.

Sugiro fortemente dar uma olhada no fórum onde existem bons tópicos que auxiliam a fazer a instalação https://forum.ieducar.org/.

@cvmacedog conseguiu resolver seu problema?

Nada feito, @edersoares. Tentei em dois servidores diferentes e ele continua travando no "Gerando chave da aplicação". Se eu coloco o php artisan key:generate vai sem problemas mas se depender do instalador, nada. Nem arquivo no log está gerando.

Consegui, @edersoares! Reinstalei os módulos um a um e aparentemente o Composer estava com algum problema. Muito obrigado!