pixelfed / support

Issue tracker for installations of Pixelfed, before a bug is identified.
https://docs.pixelfed.org/running-pixelfed/troubleshooting.html
8 stars 3 forks source link

Follow request are pending/waiting for approval - help needed #35

Closed AlfredSK closed 5 years ago

AlfredSK commented 5 years ago

Hello, I don't know where to ask for some help with the configuration of a Pixelfed instance. If this isn't the right place, please tell me.

I have managed to install a new instance and it seems to work in general. But there are some issues. I tried to follow every documentation I could find but...

First of all I cannot follow my Pixelfed user from Mastodon, Friendica and Pleroma. I can send contact requests to Pixelfed. But on the remote AP nodes the requests remain as 'waiting for approval'. On Pixelfed there is no indication that someone is trying to follow me. When I probe my user from the remote side the result looks ok.

Second issue is about the mail configuration. I wasn't able to find a working config. I tried that 'log' setting (default) and sendmail and SMTP (local postfix and a remote one on another server). Nothing worked. No mails were sent. Nothing in the mail logs. There is another PHP application running on the same machine that is able to send mails w/o issues. So I think I simply don't understand the config in '.env'.

Pixelfed 0.9.0 Installed via composer PHP 7.2.15 Apache2 2.4.29 PHP-FPM MariaDB 10.3.14 (with support for json fields) Redis 4.0.9

My config file:

APP_NAME="LIBRANET.de pixel"
APP_ENV=production
APP_KEY=base64:XXXXXXXXX/XXXXXXXXX/XXX=
APP_DEBUG=false
APP_URL=https://pixel.libranet.de

ADMIN_DOMAIN="pixel.libranet.de"
APP_DOMAIN="pixel.libranet.de"

LOG_CHANNEL=stack

DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=pixelfed
DB_USERNAME=XXXXXXXX
DB_PASSWORD=XXXXXXXXXXXXXXXXXX

BROADCAST_DRIVER=log
CACHE_DRIVER=redis
SESSION_DRIVER=redis
SESSION_LIFETIME=120
QUEUE_DRIVER=redis

REDIS_HOST=127.0.0.1
REDIS_PASSWORD=null
REDIS_PORT=6379
REDIS_DB=0

MAIL_DRIVER=sendmail
MAIL_HOST=localhost
MAIL_PORT=25
MAIL_USERNAME=null
MAIL_PASSWORD=null
MAIL_ENCRYPTION=null
MAIL_FROM_ADDRESS="admin@libranet.de"
MAIL_FROM_NAME="LIBRANET.de pixel"

SESSION_DOMAIN="${APP_DOMAIN}"
SESSION_SECURE_COOKIE=true
API_BASE="/api/1/"
API_SEARCH="/api/search"

OPEN_REGISTRATION=false
RECAPTCHA_ENABLED=false
# disabled because it doesn't work
ENFORCE_EMAIL_VERIFICATION=false

MAX_PHOTO_SIZE=15000
MAX_CAPTION_LENGTH=150
MAX_ALBUM_LENGTH=4

MIX_PUSHER_APP_KEY="${PUSHER_APP_KEY}"
MIX_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}"
MIX_APP_URL="${APP_URL}"
MIX_API_BASE="${API_BASE}"
MIX_API_SEARCH="${API_SEARCH}"

ACTIVITYPUB_INBOX=true
ACTIVITYPUB_SHAREDINBOX=true
HORIZON_DARKMODE=true

# Set these both "true" to enable federation.
# You might need to also run:
#   php artisan cache:clear
#   php artisan optimize:clear
#   php artisan optimize
ACTIVITY_PUB=true
REMOTE_FOLLOW=true

CS_BLOCKED_DOMAINS='example.org,example.net,example.com'
CS_CW_DOMAINS='example.org,example.net,example.com'
CS_UNLISTED_DOMAINS='example.org,example.net,example.com'

Output of artisan self-diagnosis:

|-------------------------------------
| Common Checks
|-------------------------------------
Running check 1/11: App key is set...  ✔
Running check 2/11: The correct PHP version is installed...  ✔
Running check 3/11: The database can be accessed...  ✔
Running check 4/11: All directories have the correct permissions...  ✔
Running check 5/11: The environment file exists...  ✔
Running check 6/11: The example environment variables are set...  ✔
Running check 7/11: Required locales are installed...  ✔
Running check 8/11: Maintenance mode is not enabled...  ✔
Running check 9/11: The migrations are up to date...  ✔
Running check 10/11: The required PHP extensions are installed...  ✔
Running check 11/11: The storage directory is linked...  ✔

|-------------------------------------
| Environment Specific Checks (production)
|-------------------------------------
Running check 1/5: Composer dependencies (without dev) are up to date...  ✔
Running check 2/5: Configuration is cached...  ✔
Running check 3/5: Debug mode is not enabled...  ✔
Running check 4/5: Unwanted PHP extensions are disabled...  ✔
Running check 5/5: Routes are cached...  ✔

Good job, looks like you are all set up!

Any help or hint appreciated.

Regards, Steffen

Edit: updated the content of my config and added the self-diagnosis output.

AlfredSK commented 5 years ago

I changed APP_ENV to production and reloaded the config but it didn't help.

AlfredSK commented 5 years ago

Maybe related? Found some stack traces in my PHP error log:

[20-Apr-2019 07:03:00 UTC] PHP Fatal error:  Uncaught InvalidArgumentException: Route [timeline.personal] not defined. in /var/www/pixelfed/vendor/laravel/framework/src/Illuminate/Routing/UrlGenerator.php:388
Stack trace:
#0 /var/www/pixelfed/vendor/laravel/framework/src/Illuminate/Foundation/helpers.php(779): Illuminate\Routing\UrlGenerator->route('timeline.person...', Array, true)
pixelfed/pixelfed#1 /var/www/pixelfed/storage/framework/views/72cb0445eb3b08a213d5e9d99e08b715d8d97def.php(3): route('timeline.person...')
pixelfed/pixelfed#2 /var/www/pixelfed/vendor/laravel/framework/src/Illuminate/View/Engines/PhpEngine.php(43): include('/var/www/pixelf...')
pixelfed/pixelfed#3 /var/www/pixelfed/vendor/laravel/framework/src/Illuminate/View/Engines/CompilerEngine.php(59): Illuminate\View\Engines\PhpEngine->evaluatePath('/var/www/pixelf...', Array)
pixelfed/pixelfed#4 /var/www/pixelfed/vendor/laravel/framework/src/Illuminate/View/View.php(142): Illuminate\View\Engines\CompilerEngine->get('/var/www/pixelf...', Array)#5 /var/www/pixelfed/vendor/laravel/framework/src/Illuminate/View/View.php(125): Illuminate\View\View->getCon in /var/www/pixelfed/vendor/laravel/framework/src/Illuminate/Routing/UrlGenerator.php on line 388
AlfredSK commented 5 years ago

And from the Apache error log:

"GET /storage/ HTTP/2.0" 403 301 "https://pixel.libranet.de/discover" "Mozilla/5.0 (X11; Ubuntu; Linux i686; rv:66.0) Gecko/20100101 Firefox/66.0"
[autoindex:error] [pid 2645:tid 140061133682432] [client 77.64.XXX.XXX:5386] AH01276: Cannot serve directory /var/www/pixelfed/public/storage/: No matching DirectoryIndex (index.html,index.cgi,index.pl,index.php,index.xhtml,index.htm) found, and server-generated directory index forbidden by Options directive, referer: https://pixel.libranet.de/discover
trwnh commented 5 years ago

From your Apache error log it looks like you have Apache's PHP support misconfigured?

AlfredSK commented 5 years ago

From my understanding it just tells that there is no index.html, index.php, .... In the storage directory. This is in fact the case and it is ok because storage isn't served directly but via the app itself. My general Apache/PHP config works. The other applications on the server are working well with the exact same config. Maybe there is an issue with the .htaccess file. I'll check that again.

dansup commented 5 years ago

@AlfredSK /storage/ is not a valid url, which means the thumbnails are not being generated properly or you did not run php artisan storage:link.