Omeka2Import Error 403

I receive this error when import starts:

2018-01-31T16:53:48+00:00 INFO (6): Importing item page 1
2018-01-31T16:53:48+00:00 ERR (3): HTTP problem: 403 Forbidden
Fatal error: Call to a member function toString() on boolean
in /var/www/clients/client2/web13/web/modules/Omeka2Importer/src/Job/Import.php on line 416

Can anyone help me understand?

Not entirely sure, but it looks like the target Omeka S site can’t access the Omeka Classic’s URL or API. Can you give the URL to the original so I can take a look?

Thanks a lot!

Do you need an API key?

Hmm…I’m getting inconsistent results, sometimes I immediately hit the same basic issue, but not always, and I’ve managed to do an import.

How far through the import process have you been able to get? For example, can you get to the second screen where you do mappings of elements? If so, does the import start, but then fail with that message?

(When it worked, I didn’t have a key, so it doesn’t look like that’s the issue)

Exactly as you said: I can get the second screen where I can set the map and immediately after having start the import I get the error message and the job fails.

Hmmm…Very tricky to diagnose, then, since I’ve had trouble just getting to the second screen. A good mystery!

Kinda reaching in the dark here, but one thing that I’d try is going to the API settings in the Omeka 2 site and reducing the Results per Page value, maybe cutting it in half from the value it has now, or even dropping it down to something extremely low like 3.

That’s to test whether there’s some kind of system resource limit that’s causing the 403. I’m grasping with this idea, but it’s the first thing I can think of.

Ok, let me try and I’ll give you a feedback …

It worked! setting 3 items per page solve the problem! Thanks!
What could be, in your opinion, the reason of this loss of resources? Both sites (S and Classic) are on the same server and this is the second migration of this type I made on the same server …

Glad it worked! It might be an interesting experiment to see if it works with more items per page, but if you’ve got the data that would only be for the sake of curiosity.

Hard to guess the underlying issue, but the server logs might offer a clue if you or your sysadmin dig through them.

Maybe a slow MySQL server? Or an error with Omeka talking to it? Maybe just a temporary quirk in network connectivity (especially since I was able to do the import before you changed that setting)? Gremlins?

1 Like

I think Gremlins is the right answer.