After the latest upgrade some of images deleted. do you know why?

hello. after the latest upgrade some of images deleted. do you know why?

process_id	15001
application_version	69b2d64334de9fe1aba10d96be127fe1a39bed22
current_db	default
current_hostname	forum.medikalbulut.org
job	Jobs::ProcessPost
problem_db	default
opts	null
post_id	[1530, 1633, 1516, 1515, 1634, 1635, 1285, 1636, 1293, 1637, 1638, 1639, 1640, 1641, 1642, 1643, 1644, 1645, 1646, 1647, 1648, 1649, 1650]
bypass_bump	false
invalidate_oneboxes	[true, null]
current_site_id	default
image_sizes	
https://forum.medikalbulut.org/uploads/default/original/2X/b/bd2b2b38c22a4e3a07d4b75fe9a2eba9a1add235.png	
width	[null, 800]
height	[null, 192]
https://forum.medikalbulut.org/uploads/default/original/2X/9/9090a718940497b5f1debfabdb2df11d78aa013a.png	
width	[null, 800]
height	[null, 196]
https://forum.medikalbulut.org/uploads/default/original/2X/4/46b39293552753cb66eab72606afaabdd954dd2a.png	
width	[null, 800]
height	[null, 470]
https://forum.medikalbulut.org/images/emoji/apple/slight_smile.png?v=5	
width	[null, 20]
height	[null, 20]
https://forum.medikalbulut.org/uploads/default/original/2X/1/19abe87b16e5616fe45d00b48ad69154c71dbdb3.jpg	
width	[null, 660]
height	[null, 440]
https://forum.medikalbulut.org/uploads/default/original/2X/3/3316d79f6fb298bb45122bca4ef0f76be6c07d88.jpg	
width	[null, 545]
height	[null, 363]
https://forum.medikalbulut.org/uploads/default/original/2X/e/efe963502ba43ab9bb76ad3fae12b61b4e1793b7.jpg	
width	[null, 730]
height	[null, 300]
https://forum.medikalbulut.org/uploads/default/original/2X/7/7d0095808c1a31953cd3e235007954f56be346ad.jpg	
width	[null, 800]
height	[null, 600]
https://forum.medikalbulut.org/uploads/default/original/2X/0/0da6ba482c02d892e4c540a63edb1a3b4b62f12d.jpg	
width	[null, 685]
height	[null, 395]
https://forum.medikalbulut.org/uploads/default/original/2X/2/2b9fba1c9f78a6f811579a70fbb5dda062f1bc26.jpg	
width	[null, 640]
height	[null, 424]
https://forum.medikalbulut.org/uploads/default/original/2X/2/2af488167b9cfcb805631bc259628f5da92ae43c.gif	
width	[null, 545]
height	[null, 342]
https://forum.medikalbulut.org/uploads/default/original/2X/7/77104006c2f0b8ead0e9dd6cf9bd714591cff6ae.jpg	
width	[null, 600]
height	[null, 400]
https://forum.medikalbulut.org/uploads/default/original/2X/d/de65c229b8e70e7c7426c2820d4a07cfddaedbfd.jpg	
width	[null, 600]
height	[null, 400]
https://forum.medikalbulut.org/uploads/default/original/2X/6/63071860fdf0a010381262572b4df2c58f8b3810.jpg	
width	[null, 600]
height	[null, 400]
https://forum.medikalbulut.org/uploads/default/original/2X/a/a059f5bdf2a1080dd09c4e893b621ef363afbc27.jpg	
width	[null, 600]
height	[null, 400]
https://forum.medikalbulut.org/uploads/default/original/2X/e/e18c8937ac587d5a7168526a02fe55285beb74c6.jpg	
width	[null, 600]
height	[null, 400]
https://forum.medikalbulut.org/uploads/default/original/2X/8/88e8dad3c3d35989cd13287b75d813a8e895afdd.jpg	
width	[null, 600]
height	[null, 400]
https://forum.medikalbulut.org/uploads/default/original/2X/3/3fbade1d46dd95a1d65cec127158a2c8f24f51a2.jpg	
width	[null, 600]
height	[null, 400]
https://forum.medikalbulut.org/uploads/default/original/2X/8/8c50f95564c07ff0649bfbf6f259d1a38dec36e3.jpg	
width	[null, 600]
height	[null, 400]
https://forum.medikalbulut.org/uploads/default/original/2X/d/ddc7f8b56dc17e4ff60fa72e55a33d09e80c9944.jpg	
width	[null, 605]
height	[null, 400]
https://forum.medikalbulut.org/uploads/default/original/2X/5/5166a9487a0dc3bba42def6354f629ffe4e3f945.jpg	
width	[null, 600]
height	[null, 400]
https://forum.medikalbulut.org/uploads/default/original/2X/d/dbdc3a757c786ec48ec94e6ac09678f0a20fb493.jpg	
width	[null, 712]
height	[null, 470]
https://forum.medikalbulut.org/uploads/default/original/2X/a/af5c8d73855235c6082d7b9e2f6eaf4aa5b8c3fe.jpg	
width	[null, 600]
height	[null, 320]
https://forum.medikalbulut.org/uploads/default/original/2X/f/f13f041ea421e8593a67563010b9a44d392c492e.jpg	
width	[null, 600]
height	[null, 400]
https://forum.medikalbulut.org/uploads/default/original/2X/5/5a9bc58ba092944369f793d9a216f045032fa46e.jpg	
width	[null, 500]
height	[null, 346]
https://forum.medikalbulut.org/uploads/default/original/2X/7/75f60be8e0655e1702b5b887cf87dc8617d9bfbd.jpg	
width	[null, 600]
height	[null, 446]
https://forum.medikalbulut.org/uploads/default/original/2X/2/26250d28615e218ddbb51ca07f7c7c87923de5a7.jpg	
width	[null, 625]
height	[null, 294]
https://forum.medikalbulut.org/uploads/default/original/2X/3/3b96e07077f026829dacd43dd5ef75f75991b9ed.jpg	
width	[null, 600]
height	[null, 400]
https://forum.medikalbulut.org/uploads/default/original/2X/7/7167daf6e8772efa1b6fd0553548b0308ff61f9f.jpg	
width	[null, 600]
height	[null, 400]
https://forum.medikalbulut.org/uploads/default/original/2X/8/87a20f8ea13c0593a6004cd59e9e8af252fa42bf.jpg	
width	[null, 601]
height	[null, 267]
https://forum.medikalbulut.org/uploads/default/original/2X/d/d7af926af4e768e6727e92bbb49c327b506cb771.jpg	
width	[null, 600]
height	[null, 400]
https://forum.medikalbulut.org/uploads/default/original/2X/8/80be7e7b79fa0657e991e0159f6cb35df647bc3f.jpg	
width	[null, 600]
height	[null, 400]
https://forum.medikalbulut.org/uploads/default/original/2X/1/117a4bf51eab3fd26f6ba38fa7f88dd3b62a0a3d.png	
width	[null, 600]
height	[null, 400]
https://forum.medikalbulut.org/uploads/default/original/2X/e/e9020e672a3b901e8e4d0ff9e2f8324bc0ddd5e5.jpg	
width	[null, 600]
height	[null, 400]
https://forum.medikalbulut.org/uploads/default/original/2X/5/5d66ce06682bcca43c11bbc7992c2aa1fb97b133.jpg	
width	[null, 600]
height	[null, 400]
https://forum.medikalbulut.org/uploads/default/original/2X/c/c4a8713c6dac3a9e5f3ff88c719bf141836ec904.jpg	
width	[null, 600]
height	[null, 400]
https://forum.medikalbulut.org/uploads/default/original/2X/0/0e95f4235be2656a652b9fc578efad50f761b5ca.jpg	
width	[null, 600]
height	[null, 400]
https://forum.medikalbulut.org/uploads/default/original/2X/7/772ab7172593ce76063506246909a62b1ece33dd.jpg	
width	[null, 600]
height	[null, 400]
https://forum.medikalbulut.org/uploads/default/original/2X/9/95a322c14bad008541369395e1ef244ac930eb3d.jpg	
width	[null, 600]
height	[null, 223]
https://forum.medikalbulut.org/uploads/default/original/2X/2/2a537c181d7b78c90854603a72c182f1104620e4.png	
width	[null, 445]
height	[null, 746]
https://forum.medikalbulut.org/uploads/default/original/2X/c/c16e0e091ed0653d0712596b0fb780d196f21482.jpg	
width	[null, 800]
height	[null, 600]
https://forum.medikalbulut.org/uploads/default/original/2X/5/533b712e82ac80d059e3d417aec59f616f532111.jpg	
width	[null, 600]
height	[null, 400]
https://forum.medikalbulut.org/uploads/default/original/2X/3/32849f669634f7a0a5b89ce17873f18c2aa79341.jpg	
width	[null, 600]
height	[null, 400]
https://forum.medikalbulut.org/uploads/default/original/2X/2/248cde8e9e011ba5655121a3ae0c4167805cdf0c.jpg	
width	[null, 600]
height	[null, 338]
https://forum.medikalbulut.org/uploads/default/original/2X/0/0f417f004f7d26004022b1d1d01dfb31b78939af.jpg	
width	[null, 640]
height	[null, 392]
https://forum.medikalbulut.org/uploads/default/original/2X/b/b124f351dc61db46e199663ade9dbe99cdd20564.png	
width	[null, 600]
height	[null, 400]
https://forum.medikalbulut.org/uploads/default/original/2X/5/570abb82fb6d31ddd14d8d097b4689b160a0de00.jpg	
width	[null, 600]
height	[null, 400]
https://forum.medikalbulut.org/uploads/default/original/2X/4/4f2b22348957ca410da462b55bd67dbbd3c56ccb.jpg	
width	[null, 600]
height	[null, 216]
https://forum.medikalbulut.org/uploads/default/original/2X/1/14d80d480c559b759158a8236522b1aa113570e8.jpg	
width	[null, 600]
height	[null, 439]
https://forum.medikalbulut.org/uploads/default/original/2X/d/ddcbc2e601b6244c8eb890b4a88fd81b78c4ae95.jpg	
width	[null, 600]
height	[null, 518]
https://forum.medikalbulut.org/uploads/default/original/2X/e/ea9e0e430b4f6666ffa0f660b68605c9868b149e.jpg	
width	[null, 600]
height	[null, 282]
https://forum.medikalbulut.org/uploads/default/original/2X/b/b053f4dc02f7c7e2409b735e4c2b8950ecde4aca.png	
width	[null, 600]
height	[null, 242]
https://forum.medikalbulut.org/uploads/default/original/2X/3/3cd7f9d4f3d04901a0a0a92403d6b0960e4fa663.jpg	
width	[null, 489]
height	[null, 232]

Which version did you upgrade from? The missing images are returning a 404 from nginx which means they are missing from the uploads folder.

To get a list of missing images, you can run the following commands:

./launcher enter app
cd /var/www/discourse
bundle exec rake uploads:missing

From the list of missing images, you should do a search for those images in /var/www/discourse/public/uploads/default/tombstone. If the uploads have indeed been incorrectly moved to the tombstone, you can easily restore them by running

bundle exec rake uploads:recover_from_tombstone
5 Likes

hello. when I do this command “bundle exec rake uploads:missing” I got the errors below:

root@discourse-2gb-fra1-01-medikalbulut-app:/var/www/discourse# bundle exec rake uploads:missing
URGENT: FATAL:  Peer authentication failed for user "discourse"
 Failed to initialize site default
rake aborted!
PG::ConnectionBad: FATAL:  Peer authentication failed for user "discourse"
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/activerecord-4.2.8/lib/active_record/connection_adapters/postgresql_adapter.rb:651:in `initialize'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/activerecord-4.2.8/lib/active_record/connection_adapters/postgresql_adapter.rb:651:in `new'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/activerecord-4.2.8/lib/active_record/connection_adapters/postgresql_adapter.rb:651:in `connect'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/activerecord-4.2.8/lib/active_record/connection_adapters/postgresql_adapter.rb:242:in `initialize'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/activerecord-4.2.8/lib/active_record/connection_adapters/postgresql_adapter.rb:44:in `new'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/activerecord-4.2.8/lib/active_record/connection_adapters/postgresql_adapter.rb:44:in `postgresql_connection'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/activerecord-4.2.8/lib/active_record/connection_adapters/abstract/connection_pool.rb:438:in `new_connection'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/activerecord-4.2.8/lib/active_record/connection_adapters/abstract/connection_pool.rb:448:in `checkout_new_connection'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/activerecord-4.2.8/lib/active_record/connection_adapters/abstract/connection_pool.rb:422:in `acquire_connection'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/activerecord-4.2.8/lib/active_record/connection_adapters/abstract/connection_pool.rb:349:in `block in checkout'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/activerecord-4.2.8/lib/active_record/connection_adapters/abstract/connection_pool.rb:348:in `checkout'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/activerecord-4.2.8/lib/active_record/connection_adapters/abstract/connection_pool.rb:263:in `block in connection'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/activerecord-4.2.8/lib/active_record/connection_adapters/abstract/connection_pool.rb:262:in `connection'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/activerecord-4.2.8/lib/active_record/connection_adapters/abstract/connection_pool.rb:571:in `retrieve_connection'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/activerecord-4.2.8/lib/active_record/connection_handling.rb:113:in `retrieve_connection'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/activerecord-4.2.8/lib/active_record/connection_handling.rb:87:in `connection'
/var/www/discourse/lib/site_settings/db_provider.rb:59:in `table_exists?'
/var/www/discourse/lib/site_settings/db_provider.rb:30:in `save'
/var/www/discourse/lib/site_setting_extension.rb:321:in `add_override!'
/var/www/discourse/lib/site_setting_extension.rb:498:in `block in setup_methods'
/var/www/discourse/plugins/discourse-narrative-bot/plugin.rb:45:in `block in activate!'
/var/www/discourse/lib/plugin/instance.rb:209:in `block in notify_after_initialize'
/var/www/discourse/lib/plugin/instance.rb:207:in `each'
/var/www/discourse/lib/plugin/instance.rb:207:in `notify_after_initialize'
/var/www/discourse/config/application.rb:210:in `block (2 levels) in <class:Application>'
/var/www/discourse/config/application.rb:210:in `each'
/var/www/discourse/config/application.rb:210:in `block in <class:Application>'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/activesupport-4.2.8/lib/active_support/lazy_load_hooks.rb:36:in `execute_hook'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/activesupport-4.2.8/lib/active_support/lazy_load_hooks.rb:45:in `block in run_load_hooks'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/activesupport-4.2.8/lib/active_support/lazy_load_hooks.rb:44:in `each'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/activesupport-4.2.8/lib/active_support/lazy_load_hooks.rb:44:in `run_load_hooks'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/railties-4.2.8/lib/rails/application/finisher.rb:62:in `block in <module:Finisher>'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/railties-4.2.8/lib/rails/initializable.rb:30:in `instance_exec'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/railties-4.2.8/lib/rails/initializable.rb:30:in `run'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/railties-4.2.8/lib/rails/initializable.rb:55:in `block in run_initializers'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/railties-4.2.8/lib/rails/initializable.rb:54:in `run_initializers'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/railties-4.2.8/lib/rails/application.rb:352:in `initialize!'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/railties-4.2.8/lib/rails/railtie.rb:194:in `public_send'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/railties-4.2.8/lib/rails/railtie.rb:194:in `method_missing'
/var/www/discourse/config/environment.rb:5:in `<top (required)>'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/activesupport-4.2.8/lib/active_support/dependencies.rb:274:in `require'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/activesupport-4.2.8/lib/active_support/dependencies.rb:274:in `block in require'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/activesupport-4.2.8/lib/active_support/dependencies.rb:240:in `load_dependency'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/activesupport-4.2.8/lib/active_support/dependencies.rb:274:in `require'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/railties-4.2.8/lib/rails/application.rb:328:in `require_environment!'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/railties-4.2.8/lib/rails/application.rb:457:in `block in run_tasks_blocks'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/exe/rake:27:in `<top (required)>'
/usr/local/bin/bundle:22:in `load'
/usr/local/bin/bundle:22:in `<main>'
Tasks: TOP => uploads:missing => environment
(See full trace by running task with --trace)
root@discourse-2gb-fra1-01-medikalbulut-app:/var/www/discourse#

Are you on the docker based install?

2 Likes

bundle exec is not required inside the container.

Try running:

cd /var/discourse/
./launcher enter app
rake uploads:missing

Same goes for:

rake uploads:recover_from_tombstone
1 Like

It would be weird if using bundle exec results in a PostgreSQL permission error so I’m not sure if that is the cause of it.

Using bundle exec, I am getting the same error on an up-to-date Discourse instance on Digital Ocean.

I’ll have a look. bundle exec shouldn’t be causing that error and is a bug IMO.

3 Likes

I am trying these now.

I tried these codes and problem solved. Thank you.

2 Likes

Turns out you have to run bundle exec with the right permissions, su discourse -c "bundle exec rake uploads:missing"

6 Likes