OTRS Import: Status Code 403 / no OTRS installation

Infos:

  • Used Zammad version: 3.0.0
  • Used Zammad installation source: source
  • Operating system: SLES12SP3
  • Browser + version: FF65.0

Expected behavior:

  • Zammad should start with the import of OTRS tickets

Actual behavior:

  • Import via Browser result in: “Host found, but it seems to be no OTRS installation!”
  • Import via CLI result in: “Client Error: #<Net::HTTPForbidden 403 Forbidden readbody=true>!”

We like to migrate our OTRS 3.3.13 installation to zammad 3.0.0.
We installed the Znuny4OTRS-Repo v3.3.2 and the Znuny4OTRS-ZammadMigrator v.1.0.30.

Browser-Migration:
We opened Zammad via Browser and insert the adress from the Zammad-Migrator.
“Host found, but it seems to be no OTRS installation!”

CLI-Migration:
We followed the steps from https://docs.zammad.org/en/latest/migration-otrs.html
Loading production environment (Rails 5.1.7)
2.4.4 :001 > Setting.set(‘import_otrs_endpoint’, ‘http://otrs.mydomain.com/otrs/public.pl?Action=ZammadMigrator’)
Setting.reset_change_id: set new cache, 162755899
Setting.set(‘import_otrs_endpoint’, “http://otrs.mydomain.com/otrs/public.pl?Action=ZammadMigrator”)
=> true
2.4.4 :002 > Setting.set(‘import_otrs_endpoint_key’, ‘myotrskey’)
Setting.reset_change_id: set new cache, 301793937
Setting.set(‘import_otrs_endpoint_key’, “myotrskey”)
=> true
2.4.4 :003 > Setting.set(‘import_mode’, true)
Setting.reset_change_id: set new cache, 641754001
Setting.set(‘import_mode’, true)
=> true
2.4.4 :004 > Import::OTRS.start
thread#-: Start import…
thread#-: POST: http://otrs.mydomain.com/otrs/public.pl?Action=ZammadMigrator
thread#-: PARAMS: {:Action=>“ZammadMigrator”, :Key=>“myotrskey”}
thread#-: ERROR: Client Error: #<Net::HTTPForbidden 403 Forbidden readbody=true>!
RuntimeError: Zammad Migrator returned an error
from lib/import/otrs/requester.rb:130:in post' from lib/import/otrs/requester.rb:90:inrequest_json’
from lib/import/otrs/requester.rb:67:in connection_test' from lib/import/otrs.rb:51:inconnection_test’
from lib/import/otrs.rb:59:in checks' from lib/import/otrs.rb:35:instart’
from (irb):4

What could be the reasons?

Could you please provide the logs from your OTRS installation around the 403 error?
Forbidden sounds very specific.

If I make the migration with clean logfiles, there are no information belong this error.

Start Apache at OTRS-Server.
CLI-Migration from Zammad-Server
Stop Apache at OTRS-Server
I didn’t open the OTRS in an Browser etc.

Apache-Accesslog: empty
OTRS-Log: empty
Apache-Error:

[Fri Jun 21 13:35:12 2019] [notice] Apache/2.2.25 (Win32) configured – resuming normal operations
[Fri Jun 21 13:35:12 2019] [notice] Server built: Jul 10 2013 01:52:12
[Fri Jun 21 13:35:12 2019] [notice] Parent: Created child process 4764
[Fri Jun 21 13:35:12 2019] [notice] Child 4764: Child process is running
[Fri Jun 21 13:35:12 2019] [notice] Child 4764: Acquired the start mutex.
[Fri Jun 21 13:35:12 2019] [notice] Child 4764: Starting 64 worker threads.
[Fri Jun 21 13:35:12 2019] [notice] Child 4764: Starting thread to listen on port 80.
[Fri Jun 21 13:35:49 2019] [notice] Parent: Received shutdown signal – Shutting down the server.
[Fri Jun 21 13:35:49 2019] [notice] Child 4764: Exit event signaled. Child process is ending.
[Fri Jun 21 13:35:50 2019] [notice] Child 4764: Released the start mutex
[Fri Jun 21 13:35:51 2019] [notice] Child 4764: All worker threads have exited.
[Fri Jun 21 13:35:51 2019] [notice] Child 4764: Child process is exiting
[Fri Jun 21 13:35:51 2019] [notice] Parent: Child process exited successfully.

Start Apache at OTRS-Server.
Migration via local browser
Stop Apache at OTRS-Server
I didn’t open the OTRS in an Browser etc.

Apache-Accesslog: empty
OTRS-Log: empty
Apache-Error:
[Fri Jun 21 13:41:57 2019] [notice] Apache/2.2.25 (Win32) configured – resuming normal operations
[Fri Jun 21 13:41:57 2019] [notice] Server built: Jul 10 2013 01:52:12
[Fri Jun 21 13:41:57 2019] [notice] Parent: Created child process 4856
[Fri Jun 21 13:41:57 2019] [notice] Child 4856: Child process is running
[Fri Jun 21 13:41:57 2019] [notice] Child 4856: Acquired the start mutex.
[Fri Jun 21 13:41:57 2019] [notice] Child 4856: Starting 64 worker threads.
[Fri Jun 21 13:41:57 2019] [notice] Child 4856: Starting thread to listen on port 80.
[Fri Jun 21 13:42:39 2019] [notice] Parent: Received shutdown signal – Shutting down the server.
[Fri Jun 21 13:42:39 2019] [notice] Child 4856: Exit event signaled. Child process is ending.
[Fri Jun 21 13:42:40 2019] [notice] Child 4856: Released the start mutex
[Fri Jun 21 13:42:41 2019] [notice] Child 4856: All worker threads have exited.
[Fri Jun 21 13:42:41 2019] [notice] Child 4856: Child process is exiting
[Fri Jun 21 13:42:41 2019] [notice] Parent: Child process exited successfully.

This is the log from zammad:
I, [2019-06-25T13:43:48.295659 #13258-17067860] INFO – : thread#-: Start import…
I, [2019-06-25T13:43:48.303334 #13258-17067860] INFO – : thread#-: POST: http://myserver/otrs/public.pl?Action=ZammadMigrator
I, [2019-06-25T13:43:48.303554 #13258-17067860] INFO – : thread#-: PARAMS: {:Action=>“ZammadMigrator”, :Key=>“mykey”}
I, [2019-06-25T13:43:48.308393 #13258-17067860] INFO – : thread#-: ERROR: Client Error: #<Net::HTTPForbidden 403 Forbidden readbody=true>!

In OTRS-Log this message occurs
[Tue Jun 25 13:23:49 2019][Notice][Kernel::System::package::RepositoryGet] No such package: Znuny4OTRS-ZammadMigrator-1.1.9!

The error occurs with OTRS 3.3.13 and 4.0.33

You did install the needed migrator package on your OTRS installation?
If so, did you restart your apache?

https://docs.zammad.org/en/latest/migration-otrs.html

I found the problem.
Ruby, Zammad or the Migrator uses the system proxy.
In this case this is a dead end.

Disabling the proxy, the migration works.

1 Like

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.