#124 From /public/avatar to /file/avatar: something keeps it from working

Closed
opened 4 years ago by aab · 3 comments
aab commented 4 years ago

Since the last update in nightly, which changed /public/avatar to /file/avatar, i was getting a lot of these in the logs:

[error] 779#779: *482939 FastCGI sent in stderr: "PHP message: PHP Warning: rename(/tmp/listener_avatarhMZ0XD,/var/www/gnusocial/file/avatar/126463-original-20200407151424.jpeg): No existe el fichero o el directorio in /var/www/gnusocial/plugins/ActivityPub/lib/explorer.php on line 332PHP message: PHP Warning: chmod(): No existe el fichero o el directorio in /var/www/gnusocial/plugins/ActivityPub/lib/explorer.php on line 345" while reading response header from upstream, client: ip_address, server: gnusocial.net, request: "POST /user/2235/inbox.json HTTP/1.1", upstream: "fastcgi://unix:/run/php/php7.3-fpm.sock:", host: "gnusocial.net"

I followed several suggestions from diogo and someonewithpc:

  • The obvious, moving manually the directory: avatars were missing.
  • Checkin in admin's UI: settings are correct.
  • Checking with setconfig, which seems to be fine:

avatar server '' avatar dir '/var/www/gnusocial/file/avatar/' avatar url_base '/avatar/' avatar ssl NULL avatar maxsize 300 avatar path '/file/avatar/'

  • Checking db, which again, seems to be fine:
MariaDB [gnusocial]> select * from config where section = 'avatar';
+---------+---------+---------------------------------+
| section | setting | value                           |
+---------+---------+---------------------------------+
| avatar  | dir     | /var/www/gnusocial/file/avatar/ |
| avatar  | path    | /file/avatar/                   |
| avatar  | server  |                                 |
+---------+---------+---------------------------------+

I've managed to silence the logs soft-linking the locations (file/avatar -> /var/www/gnusocial/public/avatar/), but obviously, i'd like to fix this properly.

Do you know any other place where locations could be stored (with the wrong settings)?

Since the last update in nightly, which changed /public/avatar to /file/avatar, i was getting a lot of these in the logs: <code>[error] 779#779: *482939 FastCGI sent in stderr: "PHP message: PHP Warning: rename(/tmp/listener_avatarhMZ0XD,/var/www/gnusocial/file/avatar/126463-original-20200407151424.jpeg): No existe el fichero o el directorio in /var/www/gnusocial/plugins/ActivityPub/lib/explorer.php on line 332PHP message: PHP Warning: chmod(): No existe el fichero o el directorio in /var/www/gnusocial/plugins/ActivityPub/lib/explorer.php on line 345" while reading response header from upstream, client: ip_address, server: gnusocial.net, request: "POST /user/2235/inbox.json HTTP/1.1", upstream: "fastcgi://unix:/run/php/php7.3-fpm.sock:", host: "gnusocial.net"</code> I followed several suggestions from diogo and someonewithpc: - The obvious, moving manually the directory: avatars were missing. - Checkin in admin's UI: settings are correct. - Checking with setconfig, which seems to be fine: <code>avatar server '' avatar dir '/var/www/gnusocial/file/avatar/' avatar url_base '/avatar/' avatar ssl NULL avatar maxsize 300 avatar path '/file/avatar/'</code> - Checking db, which again, seems to be fine: ````sh MariaDB [gnusocial]> select * from config where section = 'avatar'; +---------+---------+---------------------------------+ | section | setting | value | +---------+---------+---------------------------------+ | avatar | dir | /var/www/gnusocial/file/avatar/ | | avatar | path | /file/avatar/ | | avatar | server | | +---------+---------+---------------------------------+ ```` I've managed to silence the logs soft-linking the locations (file/avatar -> /var/www/gnusocial/public/avatar/), but obviously, i'd like to fix this properly. Do you know any other place where locations could be stored (with the wrong settings)?
someonewithpc commented 4 years ago
Collaborator

Are the files actually missing? It seems you have avatar path set again, which last time fixed it. Try delete * from config where section = 'avatar'. I'll look more into this bug, clearly something is wrong

Are the files actually missing? It seems you have avatar path set again, which last time fixed it. Try `delete * from config where section = 'avatar'`. I'll look more into this bug, clearly something _is_ wrong
aab commented 4 years ago
Poster

No, that error was showing every time an avatar was requested; they exist, just in the wrong place :) Now:

  • I've deleted the simlink and moved avatar inside file: all avatars missing in UI, as expected.
  • "delete * from config where section = 'avatar';" didn't work; "delete from config where section = 'avatar';" did. No avatar coincidences after this, as expected. Missing avatars in UI.
  • Moving avatar back to public brings avatars in UI again, and the error in logs as well.
  • Recreating the simlink makes the error in log dissapear.
  • Just in case, checked db and no avatar section exists.
No, that error was showing every time an avatar was requested; they exist, just in the wrong place :) Now: - I've deleted the simlink and moved avatar inside file: all avatars missing in UI, as expected. - "delete * from config where section = 'avatar';" didn't work; "delete from config where section = 'avatar';" did. No avatar coincidences after this, as expected. Missing avatars in UI. - Moving avatar back to public brings avatars in UI again, and the error in logs as well. - Recreating the simlink makes the error in log dissapear. - Just in case, checked db and no avatar section exists.
aab commented 4 years ago
Poster

Ok, i was able to fix this eventually. Avatar is now inside of File, no simlink to Public needed. I just had to redo the steps some more times for it to work :) There are a lot of avatars missing anyway, i'm trying to recover them with "ActivityPub/scripts/update_activitypub_profiles.php -a" and "OStatus/scripts/update_ostatus_profiles.php -a". So, i think this bug is fixed, thanks!

Ok, i was able to fix this eventually. Avatar is now inside of File, no simlink to Public needed. I just had to redo the steps some more times for it to work :) There are a lot of avatars missing anyway, i'm trying to recover them with "ActivityPub/scripts/update_activitypub_profiles.php -a" and "OStatus/scripts/update_ostatus_profiles.php -a". So, i think this bug is fixed, thanks!
Sign in to join this conversation.
No Milestone
No assignee
2 Participants
Loading...
Cancel
Save
There is no content yet.