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

Document REDIS_PATH #125

Open
Showfom opened this issue Dec 28, 2022 · 5 comments
Open

Document REDIS_PATH #125

Showfom opened this issue Dec 28, 2022 · 5 comments

Comments

@Showfom
Copy link

Showfom commented Dec 28, 2022

Hello,

I just try to install a new pixelfed today but failed when I run php artisan migrate --force

Database version

root@pixelfed ~ # mysql --version
mysql  Ver 15.1 Distrib 10.6.11-MariaDB, for debian-linux-gnu (x86_64) using readline EditLine wrapper

Firstly, I try to use 127.0.0.1 as the DB_HOST but failed:


   Illuminate\Database\QueryException 

  SQLSTATE[HY000] [1045] Access denied for user 'pixelfed_user2'@'127.0.0.1' (using password: YES) (SQL: select * from information_schema.tables where table_schema = pixelfed_database2 and table_name = migrations and table_type = 'BASE TABLE')

  at vendor/laravel/framework/src/Illuminate/Database/Connection.php:712
    708▕         // If an exception occurs when attempting to run a query, we'll format the error
    709▕         // message to include the bindings with SQL, which will make this exception a
    710▕         // lot more helpful to the developer instead of just the database's errors.
    711▕         catch (Exception $e) {
  ➜ 712▕             throw new QueryException(
    713▕                 $query, $this->prepareBindings($bindings), $e
    714▕             );
    715▕         }
    716▕     }

      +36 vendor frames

Then I switch to DB_SOCKET

   InvalidArgumentException 

  Missing UNIX domain socket path.

  at vendor/predis/predis/src/Connection/StreamConnection.php:193
    189▕      */
    190▕     protected function unixStreamInitializer(ParametersInterface $parameters)
    191▕     {
    192▕         if (!isset($parameters->path)) {
  ➜ 193▕             throw new \InvalidArgumentException('Missing UNIX domain socket path.');
    194▕         }
    195▕ 
    196▕         $flags = STREAM_CLIENT_CONNECT;
    197▕ 

      +21 vendor frames 
  22  database/migrations/2021_08_30_050137_add_software_column_to_instances_table.php:44
      App\Jobs\InstancePipeline\InstanceCrawlPipeline::dispatch()

  23  database/migrations/2021_08_30_050137_add_software_column_to_instances_table.php:24
      AddSoftwareColumnToInstancesTable::runPostMigration()

When I try to run the second time:

Migrating: 2021_08_30_050137_add_software_column_to_instances_table

   Illuminate\Database\QueryException 

  SQLSTATE[42S21]: Column already exists: 1060 Duplicate column name 'software' (SQL: alter table `instances` add `software` varchar(191) null, add `user_count` int unsigned null, add `status_count` int unsigned null, add `last_crawled_at` timestamp null)

  at vendor/laravel/framework/src/Illuminate/Database/Connection.php:712
    708▕         // If an exception occurs when attempting to run a query, we'll format the error
    709▕         // message to include the bindings with SQL, which will make this exception a
    710▕         // lot more helpful to the developer instead of just the database's errors.
    711▕         catch (Exception $e) {
  ➜ 712▕             throw new QueryException(
    713▕                 $query, $this->prepareBindings($bindings), $e
    714▕             );
    715▕         }
    716▕     }

      +12 vendor frames 
  13  database/migrations/2021_08_30_050137_add_software_column_to_instances_table.php:22
      Illuminate\Support\Facades\Facade::__callStatic()

      +22 vendor frames 
  36  artisan:37
      Illuminate\Foundation\Console\Kernel::handle()
@Showfom Showfom changed the title Unable to install Pixelfre when run php artisan migrate --force Unable to install Pixelfed when run php artisan migrate --force Dec 28, 2022
@okpierre
Copy link

@Showfom since you have a new install, have you tried php artisan db:wipe and starting the install from the beginning?

@Showfom
Copy link
Author

Showfom commented Dec 28, 2022

@Showfom since you have a new install, have you tried php artisan db:wipe and starting the install from the beginning?

I tried, also I drop the whole database and created a new one, that's why the db name is pixelfed_database2

Still this error:

Migrated:  2021_08_23_062246_update_stories_table_fix_expires_at_column (213.99ms)
Migrating: 2021_08_30_050137_add_software_column_to_instances_table

   InvalidArgumentException 

  Missing UNIX domain socket path.

  at vendor/predis/predis/src/Connection/StreamConnection.php:193
    189▕      */
    190▕     protected function unixStreamInitializer(ParametersInterface $parameters)
    191▕     {
    192▕         if (!isset($parameters->path)) {
  ➜ 193▕             throw new \InvalidArgumentException('Missing UNIX domain socket path.');
    194▕         }
    195▕ 
    196▕         $flags = STREAM_CLIENT_CONNECT;
    197▕ 

      +21 vendor frames 
  22  database/migrations/2021_08_30_050137_add_software_column_to_instances_table.php:44
      App\Jobs\InstancePipeline\InstanceCrawlPipeline::dispatch()

  23  database/migrations/2021_08_30_050137_add_software_column_to_instances_table.php:24
      AddSoftwareColumnToInstancesTable::runPostMigration()

I also tried the unreleased version from Github and the v0.11.4 version from https://github.com/pixelfed/pixelfed/releases/tag/v0.11.4

Both failed :(

@Showfom
Copy link
Author

Showfom commented Dec 28, 2022

Problem solved after changing redis back to tcp instead of unix

@factorsofx
Copy link

Looks like the installation instructions are out of date, you need REDIS_PATH instead of REDIS_HOST for a unix socket.

@melissaboiko
Copy link

stumbled on this today, it's unfortunate that the error message doesn't make it clear that this is an issue with redis setup rather than postgresql.

@trwnh trwnh transferred this issue from pixelfed/pixelfed May 31, 2024
@trwnh trwnh changed the title Unable to install Pixelfed when run php artisan migrate --force Document REDIS_PATH May 31, 2024
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

4 participants