UCSCLibrary / dams_project_mgmt

DAMS purpose is to provide access to digitized and born-digital UCSC Special Collections content. This repository is used for project planning. It holds the task tickets and roadmap for the different projects under DAMS.
2 stars 0 forks source link

Updating a pending importer errors out. #552

Open snehagunduraoUL opened 2 years ago

snehagunduraoUL commented 2 years ago

Background: Had a pending importer that took too long to succeed/fail. Steps to recreate:

  1. Click on the pending importer
  2. Click Edit on the bottom
  3. Change anything on the form
  4. Click on update importer.
Screen Shot 2022-06-03 at 4 57 54 PM

Related : https://github.com/UCSCLibrary/dams_project_mgmt/issues/504

rschwab commented 2 years ago

Saw this one today. Log output: D, [2022-06-06T15:27:29.644224 #428] DEBUG -- : [c1ad142f-8c2e-441d-a6d2-34cc8036fe7b] Bulkrax::ImporterRun Load (0.3ms) SELECTbulkrax_importer_runs.* FROMbulkrax_importer_runsWHEREbulkrax_importer_runs.importer_id= 162 ORDER BYbulkrax_importer_runs.id` DESC LIMIT 1

I, [2022-06-06T15:27:29.646635 #428] INFO -- : [c1ad142f-8c2e-441d-a6d2-34cc8036fe7b] Completed 500 Internal Server Error in 18ms (ActiveRecord: 2.8ms)

F, [2022-06-06T15:27:29.647335 #428] FATAL -- : [c1ad142f-8c2e-441d-a6d2-34cc8036fe7b]

F, [2022-06-06T15:27:29.647375 #428] FATAL -- : [c1ad142f-8c2e-441d-a6d2-34cc8036fe7b] Errno::EACCES (Permission denied @ rb_sysopen - tmp/imports/162_20220606214910/qasheet6-6.csv):

F, [2022-06-06T15:27:29.647395 #428] FATAL -- : [c1ad142f-8c2e-441d-a6d2-34cc8036fe7b]

F, [2022-06-06T15:27:29.647435 #428] FATAL -- : [c1ad142f-8c2e-441d-a6d2-34cc8036fe7b] config/initializers/patches.rb:57:in `copy_file'

[c1ad142f-8c2e-441d-a6d2-34cc8036fe7b] app/parsers/bulkrax/application_parser.rb:9:in write_import_file'

bkiahstroud commented 2 years ago

@rschwab how did this CSV get onto the server? Was it uploaded through the Importer form? I just tried that and it's working for me.

The file from those error logs tmp/imports/162_20220606214910/qasheet6-6.csv has really strange permissions that are causing the Errno::EACCES error: ---xrwx--t

bkiahstroud commented 2 years ago

Note: I'm seeing similar errors in the Sidekiq dashboard (ignore image markup)

rschwab commented 2 years ago

Yes, I've only added spreadsheets via the Importer configuration screen in Bulkrax.

Edited to note I also saw those permissions. Additionally it looked like sometime between 6/3 and 6/6 the group assignment changed for imports on the server, from hyrax:diginit to hyrax:hyrax. The permissions and ownership of the spreadsheet on my local machine were different than what ended up on the server.

snehagunduraoUL commented 2 years ago

The csv I uploaded caused the below error

Screen Shot 2022-06-08 at 9 52 04 PM

So when trying to update the importer with corrected csv, the below page occurs. https://user-images.githubusercontent.com/92340457/171968036-1b81a3d3-e359-45cf-9783-657714f7fa66.png