innoq / iqvoc

iQvoc - A SKOS(-XL) Vocabulary Management System for the Semantic Web
http://iqvoc.net/
Other
117 stars 44 forks source link

Export and Import issue #392

Open Intelligent2013 opened 6 years ago

Intelligent2013 commented 6 years ago

I've deployed the iqvoc application on Heroku. I have two running dynos (web+worker): === web (Free): bin/rails server -p $PORT -e $RAILS_ENV (1) web.1: up 2018/06/26 16:45:15 +0300 (~ 16m ago) === worker (Free): bundle exec rake jobs:work (1) worker.1: up 2018/06/26 16:43:13 +0300 (~ 18m ago)

I try to import hobbies.nt from 'data' folder via Dashboard->Import feature. In the log file (via dashboard.heroku.com) I see the messages:

2018-06-26T13:59:51.277195+00:00 app[worker.1]: [Worker(host:550a339e-8dcc-4ee2-8cc3-caaf99b4d9a8 pid:4)] Job ImportJob (id=6) RUNNING
2018-06-26T13:59:51.281906+00:00 app[worker.1]: [Worker(host:550a339e-8dcc-4ee2-8cc3-caaf99b4d9a8 pid:4)] Job ImportJob (id=6) FAILED (3 prior attempts) with ActiveRecord::RecordInvalid: Validation failed: NTriples file can't be blank
2018-06-26T13:59:51.290705+00:00 app[worker.1]: [Worker(host:550a339e-8dcc-4ee2-8cc3-caaf99b4d9a8 pid:4)] 1 jobs processed at 38.3818 j/s, 1 failed

And the import process isn't ended successfully. What I doing wrong?

Then I've created a few Concepts/Collections/Scheme and tried to Export it, but without success also. The Export process ended, but when I click on 'Download' button I get the error: 'An error occurred. Export could not be found.' What does it mean? Export log is:

I, [2018-06-26T13:54:55.240854 #4]  INFO -- : Starting export...
I, [2018-06-26T13:54:55.240891 #4]  INFO -- : file_path = /app/public/export/74406413935200762808872225698046776866.nt
I, [2018-06-26T13:54:55.240916 #4]  INFO -- : type = nt
I, [2018-06-26T13:54:55.241012 #4]  INFO -- : Exporting namespaces...
I, [2018-06-26T13:54:55.242187 #4]  INFO -- : Finished exporting namespaces.
I, [2018-06-26T13:54:55.242243 #4]  INFO -- : Exporting collections...
I, [2018-06-26T13:54:55.368218 #4]  INFO -- : Collections 1-3 exported.
I, [2018-06-26T13:54:55.374029 #4]  INFO -- : Finished exporting collections (3 collections exported).
I, [2018-06-26T13:54:55.374120 #4]  INFO -- : Exporting concepts...
I, [2018-06-26T13:54:55.709058 #4]  INFO -- : Concepts 1-69 exported.
I, [2018-06-26T13:54:55.714463 #4]  INFO -- : Finished exporting concepts (69 concepts exported).
I, [2018-06-26T13:54:55.714534 #4]  INFO -- : Saving export to '/app/public/export/74406413935200762808872225698046776866.nt'
I, [2018-06-26T13:54:55.724519 #4]  INFO -- : Export Job finished in 0 seconds.
ldodds commented 5 years ago

I've just encountered the same issue with an import.

I think the issue might be to do with heroku only giving you an ephemeral file system. https://help.heroku.com/K1PPS2WM/why-are-my-file-uploads-missing-deleted

I worked around this by running a local copy of the application connecting to the remote database I provisioned for my Heroku app. This means I can do the import, then manage things further on the instance.

I expect exports will still be a problem though. So will investigate that separately.