seek4science / seek

For finding, sharing and exchanging Data, Models, Simulations and Processes in Science.
http://www.seek4science.org
BSD 3-Clause "New" or "Revised" License
77 stars 52 forks source link

Delete of objects provokes error in indexing jobs #578

Closed raf64flo closed 3 years ago

raf64flo commented 3 years ago

Describe the bug

A clear and concise description of what the bug is.

To Reproduce

Here are the actions logged before the error occurs:

Example 1

I, [2021-04-22T09:08:24.777541 #14841]  INFO -- : method=GET path=/fairdom/studies format=html controller=StudiesController action=index status=200 duration=180.59 view=115.58 db=28.23 time=5509696.36 user_agent=Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:87.0) Gecko/20100101 Firefox/87.0
I, [2021-04-22T09:08:29.580237 #14841]  INFO -- : method=GET path=/fairdom/studies/5 format=html controller=StudiesController action=show status=200 duration=202.11 view=137.00 db=45.08 time=5509701.14 user_agent=Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:87.0) Gecko/20100101 Firefox/87.0
I, [2021-04-22T09:08:37.519839 #14841]  INFO -- : [ActiveJob] Enqueued RdfGenerationJob (Job ID: 2459626f-bcb1-4436-b9f3-89f97fe25942) to DelayedJob(default) at 2021-04-22 09:08:37 UTC
I, [2021-04-22T09:08:37.554429 #14841]  INFO -- : [ActiveJob] Enqueued RdfGenerationJob (Job ID: 97eda168-afc5-4420-8066-486709ccc719) to DelayedJob(default) at 2021-04-22 09:08:37 UTC
I, [2021-04-22T09:08:37.560399 #14841]  INFO -- : [ActiveJob] Enqueued ReindexingJob (Job ID: 42e261b6-5a78-4c4d-a802-2569c9950947) to DelayedJob(default) at 2021-04-22 09:08:37 UTC
I, [2021-04-22T09:08:37.839966 #14841]  INFO -- : method=DELETE path=/fairdom/studies/5 format=html controller=StudiesController action=destroy status=302 duration=376.05 view=0.00 db=129.47 location=http://urgi.versailles.inrae.fr/fairdom/studies time=5509709.23 user_agent=Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:
87.0) Gecko/20100101 Firefox/87.0
I, [2021-04-22T09:08:38.139043 #14841]  INFO -- : method=GET path=/fairdom/studies format=html controller=StudiesController action=index status=200 duration=153.54 view=78.09 db=23.36 time=5509709.75 user_agent=Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:87.0) Gecko/20100101 Firefox/87.0
I, [2021-04-22T09:08:39.139036 #2101]  INFO -- : 2021-04-22T09:08:39+0000: [Worker(delayed_job.1 host:fairdom-seek-prod pid:2101)] Job RdfGenerationJob [2459626f-bcb1-4436-b9f3-89f97fe25942] from DelayedJob(default) with arguments: [] (id=1008) (queue=default) RUNNING
I, [2021-04-22T09:08:39.141077 #2101]  INFO -- : [ActiveJob] [RdfGenerationJob] [2459626f-bcb1-4436-b9f3-89f97fe25942] Performing RdfGenerationJob (Job ID: 2459626f-bcb1-4436-b9f3-89f97fe25942) from DelayedJob(default)
I, [2021-04-22T09:08:39.427566 #2101]  INFO -- : [ActiveJob] [RdfGenerationJob] [2459626f-bcb1-4436-b9f3-89f97fe25942] Performed RdfGenerationJob (Job ID: 2459626f-bcb1-4436-b9f3-89f97fe25942) from DelayedJob(default) in 286.33ms
I, [2021-04-22T09:08:39.445791 #2101]  INFO -- : 2021-04-22T09:08:39+0000: [Worker(delayed_job.1 host:fairdom-seek-prod pid:2101)] Job RdfGenerationJob [2459626f-bcb1-4436-b9f3-89f97fe25942] from DelayedJob(default) with arguments: [] (id=1008) (queue=default) COMPLETED after 0.3065
I, [2021-04-22T09:08:39.456207 #2101]  INFO -- : 2021-04-22T09:08:39+0000: [Worker(delayed_job.1 host:fairdom-seek-prod pid:2101)] Job RdfGenerationJob [97eda168-afc5-4420-8066-486709ccc719] from DelayedJob(default) with arguments: [] (id=1009) (queue=default) RUNNING
I, [2021-04-22T09:08:39.456615 #2101]  INFO -- : [ActiveJob] [RdfGenerationJob] [97eda168-afc5-4420-8066-486709ccc719] Performing RdfGenerationJob (Job ID: 97eda168-afc5-4420-8066-486709ccc719) from DelayedJob(default)
I, [2021-04-22T09:08:39.458463 #2101]  INFO -- : [ActiveJob] [RdfGenerationJob] [97eda168-afc5-4420-8066-486709ccc719] Performed RdfGenerationJob (Job ID: 97eda168-afc5-4420-8066-486709ccc719) from DelayedJob(default) in 1.6ms
I, [2021-04-22T09:08:39.466724 #2101]  INFO -- : 2021-04-22T09:08:39+0000: [Worker(delayed_job.1 host:fairdom-seek-prod pid:2101)] Job RdfGenerationJob [97eda168-afc5-4420-8066-486709ccc719] from DelayedJob(default) with arguments: [] (id=1009) (queue=default) COMPLETED after 0.0104
I, [2021-04-22T09:08:39.477020 #2101]  INFO -- : 2021-04-22T09:08:39+0000: [Worker(delayed_job.1 host:fairdom-seek-prod pid:2101)] Job ReindexingJob [42e261b6-5a78-4c4d-a802-2569c9950947] from DelayedJob(default) with arguments: [] (id=1010) (queue=default) RUNNING
I, [2021-04-22T09:08:39.477498 #2101]  INFO -- : [ActiveJob] [ReindexingJob] [42e261b6-5a78-4c4d-a802-2569c9950947] Performing ReindexingJob (Job ID: 42e261b6-5a78-4c4d-a802-2569c9950947) from DelayedJob(default)
E, [2021-04-22T09:08:39.494918 #2101] ERROR -- : [ActiveJob] [ReindexingJob] [42e261b6-5a78-4c4d-a802-2569c9950947] Could not index  NoMethodError undefined method `solr_index!' for nil:NilClass
E, [2021-04-22T09:08:39.495632 #2101] ERROR -- : [ActiveJob] [ReindexingJob] [42e261b6-5a78-4c4d-a802-2569c9950947] /srv/rails/seek/app/jobs/reindexing_job.rb:10:in `perform_job'

Example 2

I, [2021-04-21T13:25:37.915130 #6353]  INFO -- : method=GET path=/fairdom/people/30 format=html controller=PeopleController action=show status=200 duration=188.40 view=129.00 db=51.61 time=5438729.49 user_agent=Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:88.0) Gecko/20100101 Firefox/88.0
I, [2021-04-21T13:25:55.249523 #6353]  INFO -- : [ActiveJob] Enqueued RdfGenerationJob (Job ID: 53454741-b2c3-4415-bc4b-c3d0718ef192) to DelayedJob(default) at 2021-04-21 13:25:55 UTC
I, [2021-04-21T13:25:55.266457 #6353]  INFO -- : [ActiveJob] Enqueued RdfGenerationJob (Job ID: 925ca384-de56-4a2d-985f-e8310b5714c9) to DelayedJob(default) at 2021-04-21 13:25:55 UTC
I, [2021-04-21T13:25:55.272339 #6353]  INFO -- : [ActiveJob] Enqueued ReindexingJob (Job ID: 3938e0f4-0869-4cc4-8166-dc7cd52f3fdd) to DelayedJob(default) at 2021-04-21 13:25:55 UTC
I, [2021-04-21T13:25:55.421313 #6353]  INFO -- : [ActiveJob] Enqueued ReindexingJob (Job ID: c5c797b6-c8a1-4d66-9929-61fcb7ac40bb) to DelayedJob(default) at 2021-04-21 13:25:55 UTC
I, [2021-04-21T13:25:55.503616 #6353]  INFO -- : method=DELETE path=/fairdom/assays/2 format=html controller=AssaysController action=destroy status=302 duration=296.63 view=0.00 db=92.07 location=http://urgi.versailles.inrae.fr/fairdom/assays time=5438746.97 user_agent=Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:87.0) Gecko/20100101 Firefox/87.0
I, [2021-04-21T13:25:55.870180 #6353]  INFO -- : method=GET path=/fairdom/assays format=html controller=AssaysController action=index status=200 duration=122.25 view=63.42 db=35.75 time=5438747.51 user_agent=Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:87.0) Gecko/20100101 Firefox/87.0
I, [2021-04-21T13:25:57.436605 #2101]  INFO -- : 2021-04-21T13:25:57+0000: [Worker(delayed_job.1 host:fairdom-seek-prod pid:2101)] Job RdfGenerationJob [53454741-b2c3-4415-bc4b-c3d0718ef192] from DelayedJob(default) with arguments: [] (id=946) (queue=default) RUNNING
I, [2021-04-21T13:25:57.441637 #2101]  INFO -- : [ActiveJob] [RdfGenerationJob] [53454741-b2c3-4415-bc4b-c3d0718ef192] Performing RdfGenerationJob (Job ID: 53454741-b2c3-4415-bc4b-c3d0718ef192) from DelayedJob(default)
I, [2021-04-21T13:25:57.741349 #2101]  INFO -- : [ActiveJob] [RdfGenerationJob] [53454741-b2c3-4415-bc4b-c3d0718ef192] Performed RdfGenerationJob (Job ID: 53454741-b2c3-4415-bc4b-c3d0718ef192) from DelayedJob(default) in 299.26ms
I, [2021-04-21T13:25:57.750136 #2101]  INFO -- : 2021-04-21T13:25:57+0000: [Worker(delayed_job.1 host:fairdom-seek-prod pid:2101)] Job RdfGenerationJob [53454741-b2c3-4415-bc4b-c3d0718ef192] from DelayedJob(default) with arguments: [] (id=946) (queue=default) COMPLETED after 0.3129
I, [2021-04-21T13:25:57.765678 #2101]  INFO -- : 2021-04-21T13:25:57+0000: [Worker(delayed_job.1 host:fairdom-seek-prod pid:2101)] Job RdfGenerationJob [925ca384-de56-4a2d-985f-e8310b5714c9] from DelayedJob(default) with arguments: [] (id=947) (queue=default) RUNNING
I, [2021-04-21T13:25:57.766050 #2101]  INFO -- : [ActiveJob] [RdfGenerationJob] [925ca384-de56-4a2d-985f-e8310b5714c9] Performing RdfGenerationJob (Job ID: 925ca384-de56-4a2d-985f-e8310b5714c9) from DelayedJob(default)
I, [2021-04-21T13:25:57.767270 #2101]  INFO -- : [ActiveJob] [RdfGenerationJob] [925ca384-de56-4a2d-985f-e8310b5714c9] Performed RdfGenerationJob (Job ID: 925ca384-de56-4a2d-985f-e8310b5714c9) from DelayedJob(default) in 1.13ms
I, [2021-04-21T13:25:57.774616 #2101]  INFO -- : 2021-04-21T13:25:57+0000: [Worker(delayed_job.1 host:fairdom-seek-prod pid:2101)] Job RdfGenerationJob [925ca384-de56-4a2d-985f-e8310b5714c9] from DelayedJob(default) with arguments: [] (id=947) (queue=default) COMPLETED after 0.0088
I, [2021-04-21T13:25:57.782283 #2101]  INFO -- : 2021-04-21T13:25:57+0000: [Worker(delayed_job.1 host:fairdom-seek-prod pid:2101)] Job ReindexingJob [3938e0f4-0869-4cc4-8166-dc7cd52f3fdd] from DelayedJob(default) with arguments: [] (id=948) (queue=default) RUNNING
I, [2021-04-21T13:25:57.782512 #2101]  INFO -- : [ActiveJob] [ReindexingJob] [3938e0f4-0869-4cc4-8166-dc7cd52f3fdd] Performing ReindexingJob (Job ID: 3938e0f4-0869-4cc4-8166-dc7cd52f3fdd) from DelayedJob(default)
E, [2021-04-21T13:25:57.794760 #2101] ERROR -- : [ActiveJob] [ReindexingJob] [3938e0f4-0869-4cc4-8166-dc7cd52f3fdd] Could not index  NoMethodError undefined method `solr_index!' for nil:NilClass
E, [2021-04-21T13:25:57.795081 #2101] ERROR -- : [ActiveJob] [ReindexingJob] [3938e0f4-0869-4cc4-8166-dc7cd52f3fdd] /srv/rails/seek/app/jobs/reindexing_job.rb:10:in `perform_job'

Example 3 - different cause though

I, [2021-04-21T12:55:59.887590 #6353]  INFO -- : method=POST path=/fairdom/assays format=html controller=AssaysController action=create status=302 duration=278.53 view=0.00 db=137.48 location=http://urgi.versailles.inrae.fr/fairdom/assays/2 time=5436951.37 user_agent=Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:87.0) Gecko/20100101 Firefox/87.0
I, [2021-04-21T12:56:00.305517 #6353]  INFO -- : method=GET path=/fairdom/assays/2 format=html controller=AssaysController action=show status=200 duration=250.11 view=167.80 db=71.35 time=5436951.82 user_agent=Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:87.0) Gecko/20100101 Firefox/87.0
I, [2021-04-21T12:56:00.932980 #2109]  INFO -- : 2021-04-21T12:56:00+0000: [Worker(delayed_job.3 host:fairdom-seek-prod pid:2109)] Job AuthLookupUpdateJob [173aafea-d80d-4b81-8d83-156c1cf8c74b] from DelayedJob(authlookup) with arguments: [] (id=916) (queue=authlookup) RUNNING
I, [2021-04-21T12:56:00.935339 #2109]  INFO -- : [ActiveJob] [AuthLookupUpdateJob] [173aafea-d80d-4b81-8d83-156c1cf8c74b] Performing AuthLookupUpdateJob (Job ID: 173aafea-d80d-4b81-8d83-156c1cf8c74b) from DelayedJob(authlookup)
I, [2021-04-21T12:56:01.141837 #2109]  INFO -- : [ActiveJob] [AuthLookupUpdateJob] [173aafea-d80d-4b81-8d83-156c1cf8c74b] Performed AuthLookupUpdateJob (Job ID: 173aafea-d80d-4b81-8d83-156c1cf8c74b) from DelayedJob(authlookup) in 206.29ms
I, [2021-04-21T12:56:01.152283 #2109]  INFO -- : 2021-04-21T12:56:01+0000: [Worker(delayed_job.3 host:fairdom-seek-prod pid:2109)] Job AuthLookupUpdateJob [173aafea-d80d-4b81-8d83-156c1cf8c74b] from DelayedJob(authlookup) with arguments: [] (id=916) (queue=authlookup) COMPLETED after 0.2189
I, [2021-04-21T12:56:01.162824 #2109]  INFO -- : 2021-04-21T12:56:01+0000: [Worker(delayed_job.3 host:fairdom-seek-prod pid:2109)] Job AuthLookupUpdateJob [cf193590-91fb-4fcb-b5c1-329e30de014a] from DelayedJob(authlookup) with arguments: [] (id=919) (queue=authlookup) RUNNING
I, [2021-04-21T12:56:01.163237 #2109]  INFO -- : [ActiveJob] [AuthLookupUpdateJob] [cf193590-91fb-4fcb-b5c1-329e30de014a] Performing AuthLookupUpdateJob (Job ID: cf193590-91fb-4fcb-b5c1-329e30de014a) from DelayedJob(authlookup)
I, [2021-04-21T12:56:01.166413 #2109]  INFO -- : [ActiveJob] [AuthLookupUpdateJob] [cf193590-91fb-4fcb-b5c1-329e30de014a] Performed AuthLookupUpdateJob (Job ID: cf193590-91fb-4fcb-b5c1-329e30de014a) from DelayedJob(authlookup) in 3.05ms
I, [2021-04-21T12:56:01.175546 #2109]  INFO -- : 2021-04-21T12:56:01+0000: [Worker(delayed_job.3 host:fairdom-seek-prod pid:2109)] Job AuthLookupUpdateJob [cf193590-91fb-4fcb-b5c1-329e30de014a] from DelayedJob(authlookup) with arguments: [] (id=919) (queue=authlookup) COMPLETED after 0.0126
I, [2021-04-21T12:56:01.188245 #2109]  INFO -- : 2021-04-21T12:56:01+0000: [Worker(delayed_job.3 host:fairdom-seek-prod pid:2109)] Job AuthLookupUpdateJob [33de4027-625d-417f-bbcf-6168b68e5b34] from DelayedJob(authlookup) with arguments: [] (id=921) (queue=authlookup) RUNNING
I, [2021-04-21T12:56:01.188827 #2109]  INFO -- : [ActiveJob] [AuthLookupUpdateJob] [33de4027-625d-417f-bbcf-6168b68e5b34] Performing AuthLookupUpdateJob (Job ID: 33de4027-625d-417f-bbcf-6168b68e5b34) from DelayedJob(authlookup)
I, [2021-04-21T12:56:01.193673 #2109]  INFO -- : [ActiveJob] [AuthLookupUpdateJob] [33de4027-625d-417f-bbcf-6168b68e5b34] Performed AuthLookupUpdateJob (Job ID: 33de4027-625d-417f-bbcf-6168b68e5b34) from DelayedJob(authlookup) in 4.59ms
I, [2021-04-21T12:56:01.202791 #2109]  INFO -- : 2021-04-21T12:56:01+0000: [Worker(delayed_job.3 host:fairdom-seek-prod pid:2109)] Job AuthLookupUpdateJob [33de4027-625d-417f-bbcf-6168b68e5b34] from DelayedJob(authlookup) with arguments: [] (id=921) (queue=authlookup) COMPLETED after 0.0144
I, [2021-04-21T12:56:01.204762 #2109]  INFO -- : 2021-04-21T12:56:01+0000: [Worker(delayed_job.3 host:fairdom-seek-prod pid:2109)] 3 jobs processed at 10.1647 j/s, 0 failed
I, [2021-04-21T12:56:01.898714 #2101]  INFO -- : 2021-04-21T12:56:01+0000: [Worker(delayed_job.1 host:fairdom-seek-prod pid:2101)] Job SetSubscriptionsForItemJob [ed0f3b52-bdce-4dd8-a676-1f63fa70f1af] from DelayedJob(default) with arguments: [{"_aj_globalid"=>"gid://seek/Assay/2"}, [{"_aj_globalid"=>"gid://seek/Project/3"}]] (id=913) (queue=default) RUNNING
I, [2021-04-21T12:56:01.908332 #2101]  INFO -- : [ActiveJob] [SetSubscriptionsForItemJob] [ed0f3b52-bdce-4dd8-a676-1f63fa70f1af] Performing SetSubscriptionsForItemJob (Job ID: ed0f3b52-bdce-4dd8-a676-1f63fa70f1af) from DelayedJob(default) with arguments: #<GlobalID:0x000055880c1f6168 @uri=#<URI::GID gid://seek/Assay/2>>, [#<GlobalID:0x000055880c1f5858 @uri=#<URI::GID gid://seek/Project/3>>]
I, [2021-04-21T12:56:02.314895 #2101]  INFO -- : [ActiveJob] [SetSubscriptionsForItemJob] [ed0f3b52-bdce-4dd8-a676-1f63fa70f1af] Performed SetSubscriptionsForItemJob (Job ID: ed0f3b52-bdce-4dd8-a676-1f63fa70f1af) from DelayedJob(default) in 406.34ms
I, [2021-04-21T12:56:02.325744 #2101]  INFO -- : 2021-04-21T12:56:02+0000: [Worker(delayed_job.1 host:fairdom-seek-prod pid:2101)] Job SetSubscriptionsForItemJob [ed0f3b52-bdce-4dd8-a676-1f63fa70f1af] from DelayedJob(default) with arguments: [{"_aj_globalid"=>"gid://seek/Assay/2"}, [{"_aj_globalid"=>"gid://seek/Project/3"}]] (id=913) (queue=default) COMPLETED after 0.4265
I, [2021-04-21T12:56:02.339383 #2101]  INFO -- : 2021-04-21T12:56:02+0000: [Worker(delayed_job.1 host:fairdom-seek-prod pid:2101)] Job RdfGenerationJob [5962e314-06c8-4022-b2b4-1eb040307f47] from DelayedJob(default) with arguments: [] (id=911) (queue=default) RUNNING
I, [2021-04-21T12:56:02.340134 #2101]  INFO -- : [ActiveJob] [RdfGenerationJob] [5962e314-06c8-4022-b2b4-1eb040307f47] Performing RdfGenerationJob (Job ID: 5962e314-06c8-4022-b2b4-1eb040307f47) from DelayedJob(default)
I, [2021-04-21T12:56:02.493236 #2101]  INFO -- : [ActiveJob] [RdfGenerationJob] [5962e314-06c8-4022-b2b4-1eb040307f47] Enqueued RdfGenerationJob (Job ID: 809caaf5-2225-4424-b9ed-dbf42a896012) to DelayedJob(default) at 2021-04-21 12:56:02 UTC
I, [2021-04-21T12:56:02.506307 #2101]  INFO -- : [ActiveJob] [RdfGenerationJob] [5962e314-06c8-4022-b2b4-1eb040307f47] Enqueued RdfGenerationJob (Job ID: 5962e314-06c8-4022-b2b4-1eb040307f47) to DelayedJob(default) at 2021-04-21 12:56:02 UTC
I, [2021-04-21T12:56:02.506600 #2101]  INFO -- : [ActiveJob] [RdfGenerationJob] [5962e314-06c8-4022-b2b4-1eb040307f47] Performed RdfGenerationJob (Job ID: 5962e314-06c8-4022-b2b4-1eb040307f47) from DelayedJob(default) in 166.28ms
I, [2021-04-21T12:56:02.516053 #2101]  INFO -- : 2021-04-21T12:56:02+0000: [Worker(delayed_job.1 host:fairdom-seek-prod pid:2101)] Job RdfGenerationJob [5962e314-06c8-4022-b2b4-1eb040307f47] from DelayedJob(default) with arguments: [] (id=911) (queue=default) COMPLETED after 0.1764
I, [2021-04-21T12:56:02.528594 #2101]  INFO -- : 2021-04-21T12:56:02+0000: [Worker(delayed_job.1 host:fairdom-seek-prod pid:2101)] Job ReindexingJob [0d11e12e-22e9-42d5-9a43-98d7f4b31a15] from DelayedJob(default) with arguments: [] (id=912) (queue=default) RUNNING
I, [2021-04-21T12:56:02.529364 #2101]  INFO -- : [ActiveJob] [ReindexingJob] [0d11e12e-22e9-42d5-9a43-98d7f4b31a15] Performing ReindexingJob (Job ID: 0d11e12e-22e9-42d5-9a43-98d7f4b31a15) from DelayedJob(default)
I, [2021-04-21T12:56:02.589238 #6353]  INFO -- : [ActiveJob] Enqueued RdfGenerationJob (Job ID: d8f92d3d-67bc-45bd-abec-e683ebc2616e) to DelayedJob(default) at 2021-04-21 12:56:02 UTC
I, [2021-04-21T12:56:02.604902 #6353]  INFO -- : [ActiveJob] Enqueued RdfGenerationJob (Job ID: 6030f4e2-1d58-46c6-876b-8c00b6e8a05a) to DelayedJob(default) at 2021-04-21 12:56:02 UTC
I, [2021-04-21T12:56:02.609646 #6353]  INFO -- : [ActiveJob] Enqueued ReindexingJob (Job ID: a353a00e-24fb-45d1-bca2-19f7ddcc979b) to DelayedJob(default) at 2021-04-21 12:56:02 UTC
I, [2021-04-21T12:56:02.734847 #2101]  INFO -- : [ActiveJob] [ReindexingJob] [0d11e12e-22e9-42d5-9a43-98d7f4b31a15] Performed ReindexingJob (Job ID: 0d11e12e-22e9-42d5-9a43-98d7f4b31a15) from DelayedJob(default) in 205.17ms
I, [2021-04-21T12:56:02.784927 #2101]  INFO -- : 2021-04-21T12:56:02+0000: [Worker(delayed_job.1 host:fairdom-seek-prod pid:2101)] Job ReindexingJob [0d11e12e-22e9-42d5-9a43-98d7f4b31a15] from DelayedJob(default) with arguments: [] (id=912) (queue=default) COMPLETED after 0.2561
I, [2021-04-21T12:56:02.800452 #2101]  INFO -- : 2021-04-21T12:56:02+0000: [Worker(delayed_job.1 host:fairdom-seek-prod pid:2101)] Job ReindexingJob [a3e7fd87-4fcb-4603-a2b9-08fdd6865e97] from DelayedJob(default) with arguments: [] (id=914) (queue=default) RUNNING
I, [2021-04-21T12:56:02.801113 #2101]  INFO -- : [ActiveJob] [ReindexingJob] [a3e7fd87-4fcb-4603-a2b9-08fdd6865e97] Performing ReindexingJob (Job ID: a3e7fd87-4fcb-4603-a2b9-08fdd6865e97) from DelayedJob(default)
E, [2021-04-21T12:56:02.827265 #2101] ERROR -- : [ActiveJob] [ReindexingJob] [a3e7fd87-4fcb-4603-a2b9-08fdd6865e97] Could not index  NoMethodError undefined method `solr_index!' for nil:NilClass
E, [2021-04-21T12:56:02.828076 #2101] ERROR -- : [ActiveJob] [ReindexingJob] [a3e7fd87-4fcb-4603-a2b9-08fdd6865e97] /srv/rails/seek/app/jobs/reindexing_job.rb:10:in `perform_job'

See error received by e-mail

-------- Message transféré --------
Sujet :     [ SEEK ERROR ] (NoMethodError) "undefined method `solr_index!' for nil:NilClass"
Date :     Thu, 22 Apr 2021 09:08:39 +0000

A NoMethodError occurred in background at 2021-04-22 09:08:39 UTC :

undefined method `solr_index!' for nil:NilClass
/srv/rails/seek/app/jobs/reindexing_job.rb:10:in `perform_job'

-------------------------------
Backtrace:
-------------------------------

/srv/rails/seek/app/jobs/reindexing_job.rb:10:in `perform_job'
/srv/rails/seek/app/jobs/batch_job.rb:6:in `block in perform'
/srv/rails/seek/app/jobs/batch_job.rb:4:in `each'
/srv/rails/seek/app/jobs/batch_job.rb:4:in `perform'
/srv/rails/seek/app/jobs/reindexing_job.rb:5:in `perform'
/home/www-data/.rvm/gems/ruby-2.6.6/gems/activejob-5.2.4.4/lib/active_job/execution.rb:39:in `block in perform_now'
/home/www-data/.rvm/gems/ruby-2.6.6/gems/activesupport-5.2.4.4/lib/active_support/callbacks.rb:109:in `block in run_callbacks'
/srv/rails/seek/app/jobs/application_job.rb:33:in `block (2 levels) in <class:ApplicationJob>'
/home/www-data/.rvm/rubies/ruby-2.6.6/lib/ruby/2.6.0/timeout.rb:93:in `block in timeout'
/home/www-data/.rvm/rubies/ruby-2.6.6/lib/ruby/2.6.0/timeout.rb:33:in `block in catch'
/home/www-data/.rvm/rubies/ruby-2.6.6/lib/ruby/2.6.0/timeout.rb:33:in `catch'
/home/www-data/.rvm/rubies/ruby-2.6.6/lib/ruby/2.6.0/timeout.rb:33:in `catch'
/home/www-data/.rvm/rubies/ruby-2.6.6/lib/ruby/2.6.0/timeout.rb:108:in `timeout'
/srv/rails/seek/app/jobs/application_job.rb:32:in `block in <class:ApplicationJob>'
/home/www-data/.rvm/gems/ruby-2.6.6/gems/activesupport-5.2.4.4/lib/active_support/callbacks.rb:118:in `instance_exec'
/home/www-data/.rvm/gems/ruby-2.6.6/gems/activesupport-5.2.4.4/lib/active_support/callbacks.rb:118:in `block in run_callbacks'
/home/www-data/.rvm/gems/ruby-2.6.6/gems/i18n-1.8.5/lib/i18n.rb:313:in `with_locale'
/home/www-data/.rvm/gems/ruby-2.6.6/gems/activejob-5.2.4.4/lib/active_job/translation.rb:9:in `block (2 levels) in <module:Translation>'
/home/www-data/.rvm/gems/ruby-2.6.6/gems/activesupport-5.2.4.4/lib/active_support/callbacks.rb:118:in `instance_exec'
/home/www-data/.rvm/gems/ruby-2.6.6/gems/activesupport-5.2.4.4/lib/active_support/callbacks.rb:118:in `block in run_callbacks'
/home/www-data/.rvm/gems/ruby-2.6.6/gems/activejob-5.2.4.4/lib/active_job/logging.rb:26:in `block (4 levels) in <module:Logging>'
/home/www-data/.rvm/gems/ruby-2.6.6/gems/activesupport-5.2.4.4/lib/active_support/notifications.rb:168:in `block in instrument'
/home/www-data/.rvm/gems/ruby-2.6.6/gems/activesupport-5.2.4.4/lib/active_support/notifications/instrumenter.rb:23:in `instrument'
/home/www-data/.rvm/gems/ruby-2.6.6/gems/activesupport-5.2.4.4/lib/active_support/notifications.rb:168:in `instrument'
/home/www-data/.rvm/gems/ruby-2.6.6/gems/activejob-5.2.4.4/lib/active_job/logging.rb:25:in `block (3 levels) in <module:Logging>'
/home/www-data/.rvm/gems/ruby-2.6.6/gems/activejob-5.2.4.4/lib/active_job/logging.rb:46:in `block in tag_logger'
/home/www-data/.rvm/gems/ruby-2.6.6/gems/activesupport-5.2.4.4/lib/active_support/tagged_logging.rb:71:in `block in tagged'
/home/www-data/.rvm/gems/ruby-2.6.6/gems/activesupport-5.2.4.4/lib/active_support/tagged_logging.rb:28:in `tagged'
/home/www-data/.rvm/gems/ruby-2.6.6/gems/activesupport-5.2.4.4/lib/active_support/tagged_logging.rb:71:in `tagged'
/home/www-data/.rvm/gems/ruby-2.6.6/gems/activejob-5.2.4.4/lib/active_job/logging.rb:46:in `tag_logger'
/home/www-data/.rvm/gems/ruby-2.6.6/gems/activejob-5.2.4.4/lib/active_job/logging.rb:22:in `block (2 levels) in <module:Logging>'
/home/www-data/.rvm/gems/ruby-2.6.6/gems/activesupport-5.2.4.4/lib/active_support/callbacks.rb:118:in `instance_exec'
/home/www-data/.rvm/gems/ruby-2.6.6/gems/activesupport-5.2.4.4/lib/active_support/callbacks.rb:118:in `block in run_callbacks'
/home/www-data/.rvm/gems/ruby-2.6.6/gems/activesupport-5.2.4.4/lib/active_support/callbacks.rb:136:in `run_callbacks'
/home/www-data/.rvm/gems/ruby-2.6.6/gems/activejob-5.2.4.4/lib/active_job/execution.rb:38:in `perform_now'
/home/www-data/.rvm/gems/ruby-2.6.6/gems/activejob-5.2.4.4/lib/active_job/execution.rb:24:in `block in execute'
/home/www-data/.rvm/gems/ruby-2.6.6/gems/activesupport-5.2.4.4/lib/active_support/callbacks.rb:109:in `block in run_callbacks'
/home/www-data/.rvm/gems/ruby-2.6.6/gems/activejob-5.2.4.4/lib/active_job/railtie.rb:28:in `block (4 levels) in <class:Railtie>'
/home/www-data/.rvm/gems/ruby-2.6.6/gems/activesupport-5.2.4.4/lib/active_support/execution_wrapper.rb:87:in `wrap'
/home/www-data/.rvm/gems/ruby-2.6.6/gems/activesupport-5.2.4.4/lib/active_support/reloader.rb:73:in `block in wrap'
/home/www-data/.rvm/gems/ruby-2.6.6/gems/activesupport-5.2.4.4/lib/active_support/execution_wrapper.rb:87:in `wrap'
/home/www-data/.rvm/gems/ruby-2.6.6/gems/activesupport-5.2.4.4/lib/active_support/reloader.rb:72:in `wrap'
/home/www-data/.rvm/gems/ruby-2.6.6/gems/activejob-5.2.4.4/lib/active_job/railtie.rb:27:in `block (3 levels) in <class:Railtie>'
/home/www-data/.rvm/gems/ruby-2.6.6/gems/activesupport-5.2.4.4/lib/active_support/callbacks.rb:118:in `instance_exec'
/home/www-data/.rvm/gems/ruby-2.6.6/gems/activesupport-5.2.4.4/lib/active_support/callbacks.rb:118:in `block in run_callbacks'
/home/www-data/.rvm/gems/ruby-2.6.6/gems/activesupport-5.2.4.4/lib/active_support/callbacks.rb:136:in `run_callbacks'
/home/www-data/.rvm/gems/ruby-2.6.6/gems/activejob-5.2.4.4/lib/active_job/execution.rb:22:in `execute'
/home/www-data/.rvm/gems/ruby-2.6.6/gems/activejob-5.2.4.4/lib/active_job/queue_adapters/delayed_job_adapter.rb:42:in `perform'
/home/www-data/.rvm/gems/ruby-2.6.6/gems/delayed_job-4.1.5/lib/delayed/backend/base.rb:81:in `block in invoke_job'
/home/www-data/.rvm/gems/ruby-2.6.6/gems/delayed_job-4.1.5/lib/delayed/lifecycle.rb:61:in `block in initialize'
/home/www-data/.rvm/gems/ruby-2.6.6/gems/delayed_job-4.1.5/lib/delayed/lifecycle.rb:66:in `execute'
/home/www-data/.rvm/gems/ruby-2.6.6/gems/delayed_job-4.1.5/lib/delayed/lifecycle.rb:40:in `run_callbacks'
/home/www-data/.rvm/gems/ruby-2.6.6/gems/delayed_job-4.1.5/lib/delayed/backend/base.rb:78:in `invoke_job'
/home/www-data/.rvm/gems/ruby-2.6.6/gems/delayed_job-4.1.5/lib/delayed/worker.rb:230:in `block (2 levels) in run'
/home/www-data/.rvm/rubies/ruby-2.6.6/lib/ruby/2.6.0/timeout.rb:93:in `block in timeout'
/home/www-data/.rvm/rubies/ruby-2.6.6/lib/ruby/2.6.0/timeout.rb:103:in `timeout'
/home/www-data/.rvm/gems/ruby-2.6.6/gems/delayed_job-4.1.5/lib/delayed/worker.rb:230:in `block in run'
/home/www-data/.rvm/rubies/ruby-2.6.6/lib/ruby/2.6.0/benchmark.rb:308:in `realtime'
/home/www-data/.rvm/gems/ruby-2.6.6/gems/delayed_job-4.1.5/lib/delayed/worker.rb:229:in `run'
/home/www-data/.rvm/gems/ruby-2.6.6/gems/delayed_job-4.1.5/lib/delayed/worker.rb:312:in `block in reserve_and_run_one_job'
/home/www-data/.rvm/gems/ruby-2.6.6/gems/delayed_job-4.1.5/lib/delayed/lifecycle.rb:61:in `block in initialize'
/home/www-data/.rvm/gems/ruby-2.6.6/gems/delayed_job-4.1.5/lib/delayed/lifecycle.rb:66:in `execute'
/home/www-data/.rvm/gems/ruby-2.6.6/gems/delayed_job-4.1.5/lib/delayed/lifecycle.rb:40:in `run_callbacks'
/home/www-data/.rvm/gems/ruby-2.6.6/gems/delayed_job-4.1.5/lib/delayed/worker.rb:312:in `reserve_and_run_one_job'
/home/www-data/.rvm/gems/ruby-2.6.6/gems/delayed_job-4.1.5/lib/delayed/worker.rb:213:in `block in work_off'
/home/www-data/.rvm/gems/ruby-2.6.6/gems/delayed_job-4.1.5/lib/delayed/worker.rb:212:in `times'
/home/www-data/.rvm/gems/ruby-2.6.6/gems/delayed_job-4.1.5/lib/delayed/worker.rb:212:in `work_off'
/home/www-data/.rvm/gems/ruby-2.6.6/gems/delayed_job-4.1.5/lib/delayed/worker.rb:175:in `block (4 levels) in start'
/home/www-data/.rvm/rubies/ruby-2.6.6/lib/ruby/2.6.0/benchmark.rb:308:in `realtime'
/home/www-data/.rvm/gems/ruby-2.6.6/gems/delayed_job-4.1.5/lib/delayed/worker.rb:174:in `block (3 levels) in start'
/home/www-data/.rvm/gems/ruby-2.6.6/gems/delayed_job-4.1.5/lib/delayed/lifecycle.rb:61:in `block in initialize'
/home/www-data/.rvm/gems/ruby-2.6.6/gems/delayed_job-4.1.5/lib/delayed/lifecycle.rb:66:in `execute'
/home/www-data/.rvm/gems/ruby-2.6.6/gems/delayed_job-4.1.5/lib/delayed/lifecycle.rb:40:in `run_callbacks'
/home/www-data/.rvm/gems/ruby-2.6.6/gems/delayed_job-4.1.5/lib/delayed/worker.rb:173:in `block (2 levels) in start'
/home/www-data/.rvm/gems/ruby-2.6.6/gems/delayed_job-4.1.5/lib/delayed/worker.rb:172:in `loop'
/home/www-data/.rvm/gems/ruby-2.6.6/gems/delayed_job-4.1.5/lib/delayed/worker.rb:172:in `block in start'
/home/www-data/.rvm/gems/ruby-2.6.6/gems/delayed_job-4.1.5/lib/delayed/plugins/clear_locks.rb:7:in `block (2 levels) in <class:ClearLocks>'
/home/www-data/.rvm/gems/ruby-2.6.6/gems/delayed_job-4.1.5/lib/delayed/lifecycle.rb:79:in `block (2 levels) in add'
/home/www-data/.rvm/gems/ruby-2.6.6/gems/delayed_job-4.1.5/lib/delayed/lifecycle.rb:61:in `block in initialize'
/home/www-data/.rvm/gems/ruby-2.6.6/gems/delayed_job-4.1.5/lib/delayed/lifecycle.rb:79:in `block in add'
/home/www-data/.rvm/gems/ruby-2.6.6/gems/delayed_job-4.1.5/lib/delayed/lifecycle.rb:66:in `execute'
/home/www-data/.rvm/gems/ruby-2.6.6/gems/delayed_job-4.1.5/lib/delayed/lifecycle.rb:40:in `run_callbacks'
/home/www-data/.rvm/gems/ruby-2.6.6/gems/delayed_job-4.1.5/lib/delayed/worker.rb:171:in `start'
/home/www-data/.rvm/gems/ruby-2.6.6/gems/delayed_job-4.1.5/lib/delayed/command.rb:137:in `run'
/home/www-data/.rvm/gems/ruby-2.6.6/gems/delayed_job-4.1.5/lib/delayed/command.rb:125:in `block in run_process'
/home/www-data/.rvm/gems/ruby-2.6.6/gems/daemons-1.1.9/lib/daemons/application.rb:255:in `block in start_proc'
/home/www-data/.rvm/gems/ruby-2.6.6/gems/daemons-1.1.9/lib/daemons/daemonize.rb:82:in `call_as_daemon'
/home/www-data/.rvm/gems/ruby-2.6.6/gems/daemons-1.1.9/lib/daemons/application.rb:259:in `start_proc'
/home/www-data/.rvm/gems/ruby-2.6.6/gems/daemons-1.1.9/lib/daemons/application.rb:296:in `start'
/home/www-data/.rvm/gems/ruby-2.6.6/gems/daemons-1.1.9/lib/daemons/controller.rb:70:in `run'
/home/www-data/.rvm/gems/ruby-2.6.6/gems/daemons-1.1.9/lib/daemons.rb:197:in `block in run_proc'
/home/www-data/.rvm/gems/ruby-2.6.6/gems/daemons-1.1.9/lib/daemons/cmdline.rb:109:in `catch_exceptions'
/home/www-data/.rvm/gems/ruby-2.6.6/gems/daemons-1.1.9/lib/daemons.rb:196:in `run_proc'
/home/www-data/.rvm/gems/ruby-2.6.6/gems/delayed_job-4.1.5/lib/delayed/command.rb:123:in `run_process'
/home/www-data/.rvm/gems/ruby-2.6.6/gems/delayed_job-4.1.5/lib/delayed/command.rb:98:in `daemonize'
/srv/rails/seek/lib/seek/workers.rb:15:in `block in daemonize_commands'
/srv/rails/seek/lib/seek/workers.rb:15:in `map'
/srv/rails/seek/lib/seek/workers.rb:15:in `daemonize_commands'
/srv/rails/seek/lib/seek/workers.rb:11:in `start'
/srv/rails/seek/lib/tasks/seek_workers.rake:10:in `block (3 levels) in <top (required)>'
/home/www-data/.rvm/gems/ruby-2.6.6/gems/rake-13.0.1/lib/rake/task.rb:281:in `block in execute'
/home/www-data/.rvm/gems/ruby-2.6.6/gems/rake-13.0.1/lib/rake/task.rb:281:in `each'
/home/www-data/.rvm/gems/ruby-2.6.6/gems/rake-13.0.1/lib/rake/task.rb:281:in `execute'
/home/www-data/.rvm/gems/ruby-2.6.6/gems/rake-13.0.1/lib/rake/task.rb:219:in `block in invoke_with_call_chain'
/home/www-data/.rvm/rubies/ruby-2.6.6/lib/ruby/2.6.0/monitor.rb:235:in `mon_synchronize'
/home/www-data/.rvm/gems/ruby-2.6.6/gems/rake-13.0.1/lib/rake/task.rb:199:in `invoke_with_call_chain'
/home/www-data/.rvm/gems/ruby-2.6.6/gems/rake-13.0.1/lib/rake/task.rb:188:in `invoke'
/home/www-data/.rvm/gems/ruby-2.6.6/gems/rake-13.0.1/lib/rake/application.rb:160:in `invoke_task'
/home/www-data/.rvm/gems/ruby-2.6.6/gems/rake-13.0.1/lib/rake/application.rb:116:in `block (2 levels) in top_level'
/home/www-data/.rvm/gems/ruby-2.6.6/gems/rake-13.0.1/lib/rake/application.rb:116:in `each'
/home/www-data/.rvm/gems/ruby-2.6.6/gems/rake-13.0.1/lib/rake/application.rb:116:in `block in top_level'
/home/www-data/.rvm/gems/ruby-2.6.6/gems/rake-13.0.1/lib/rake/application.rb:125:in `run_with_threads'
/home/www-data/.rvm/gems/ruby-2.6.6/gems/rake-13.0.1/lib/rake/application.rb:110:in `top_level'
/home/www-data/.rvm/gems/ruby-2.6.6/gems/rake-13.0.1/lib/rake/application.rb:83:in `block in run'
/home/www-data/.rvm/gems/ruby-2.6.6/gems/rake-13.0.1/lib/rake/application.rb:186:in `standard_exception_handling'
/home/www-data/.rvm/gems/ruby-2.6.6/gems/rake-13.0.1/lib/rake/application.rb:80:in `run'
/home/www-data/.rvm/gems/ruby-2.6.6/gems/rake-13.0.1/exe/rake:27:in `<top (required)>'
/home/www-data/.rvm/gems/ruby-2.6.6/bin/rake:23:in `load'
/home/www-data/.rvm/gems/ruby-2.6.6/bin/rake:23:in `<main>'
/home/www-data/.rvm/gems/ruby-2.6.6/bin/ruby_executable_hooks:24:in `eval'
/home/www-data/.rvm/gems/ruby-2.6.6/bin/ruby_executable_hooks:24:in `<main>'

-------------------------------
Data:
-------------------------------

* data: {:user=>{},
:person=>{},
:site_host=>"https://urgi.versailles.inrae.fr/fairdom",
:item=>nil}

Expected behavior

No error log at all.

Additional context

Seek version: v.1.11.0-master

raf64flo commented 3 years ago

Thanks @fbacall I'll test the fix as soon as a tag with the commit will be released.