New Zammad Self-hosted Installation - Elasticsearch errors

Hello guys,
I am trying to deploy the self-hosted version of Zammad in our organization.
So far what I’ve done:

  1. Create a EC2 Instance on AWS - Ubuntu 20.04 LTS
  2. Download Zammad 3.5.0 binary and install using bundler etc.
  3. Download Elasticsearch 6.8.13 and install it, connect Zammad to it
  4. Connect to our RDS PostgreSQL instance
  5. Connect to our G-Suite so members of the organization will use it to login

The monitoring if Zammad shows the following:

{
    "actions": [],
    "healthy": false,
    "issues": [
        "Failed to run background job #1 'SearchIndexJob' 10 time(s) with 169 attempt(s)."
    ],
    "message": "Failed to run background job #1 'SearchIndexJob' 10 time(s) with 169 attempt(s).",
    "token": "MY_TOKEN"
}

production.log:

RUNNING
I, [2020-10-27T09:00:09.466241 #9445-47348311935480]  INFO -- : Performing SearchIndexJob (Job ID: b63e3d04-36cc-4912-ab30-9c14496f9ada) from DelayedJob(default) with arguments: "StatsStore", 1
I, [2020-10-27T09:00:09.484391 #9445-47348311935480]  INFO -- : # curl -X post "http://localhost:9200/zammad_production/StatsStore/1" 
I, [2020-10-27T09:00:09.498774 #9445-47348311935480]  INFO -- : # 400
E, [2020-10-27T09:00:09.500255 #9445-47348311935480] ERROR -- : Unable to process post request to elasticsearch URL 'http://localhost:9200/zammad_production/StatsStore/1'. Check the response and payload for detailed information: 

Response:
#<UserAgent::Result:0x000056204692d008 @success=false, @body="{\"error\":{\"root_cause\":[{\"type\":\"illegal_argument_exception\",\"reason\":\"Rejecting mapping update to [zammad_production] as the final mapping would have more than 1 type: [User, StatsStore]\"}],\"type\":\"illegal_argument_exception\",\"reason\":\"Rejecting mapping update to [zammad_production] as the final mapping would have more than 1 type: [User, StatsStore]\"},\"status\":400}", @data=nil, @code="400", @content_type=nil, @error="Client Error: #<Net::HTTPBadRequest 400 Bad Request readbody=true>!">

Payload:
{"id":1,"stats_store_object_id":1,"o_id":3,"key":"dashboard","related_stats_store_object_id":null,"data":{"StatsTicketReopen":{"used_for_average":0.0,"percent":0.0,"average_per_agent":0.0,"state":"supergood","count":0,"total":3},"StatsTicketWaitingTime":{"handling_time":0,"average_per_agent":0,"state":"supergood","percent":0.0},"StatsTicketEscalation":{"used_for_average":0,"average_per_agent":0.0,"state":"supergood","own":0,"total":0},"StatsTicketChannelDistribution":{"channels":{"email":{"icon":"email","inbound":0,"outbound":0,"inbound_in_percent":0,"outbound_in_percent":0},"phone":{"icon":"phone","inbound":3,"outbound":0,"inbound_in_percent":100,"outbound_in_percent":0},"web":{"icon":"web","inbound":0,"outbound":0,"inbound_in_percent":0,"outbound_in_percent":0}}},"StatsTicketLoadMeasure":{"used_for_average":0,"average_per_agent":0.0,"percent":0,"state":"supergood","own":0,"total":0},"StatsTicketInProcess":{"used_for_average":100.0,"average_per_agent":100.0,"state":"supergood","in_process":3,"percent":100.0,"total":3}},"created_by_id":1,"created_at":"2020-10-27T07:47:31.937Z","updated_at":"2020-10-27T08:45:03.004Z","stats_store_object":"User","stats_store_object_ref":{"id":3,"organization_id":null,"login":"shmuel@humanz.ai","firstname":"Shmuel","lastname":"Goldfarb","email":"shmuel@humanz.ai","web":"","phone":"","fax":"","mobile":"","department":"","street":"","zip":"","city":"","country":"","address":"","vip":false,"verified":false,"active":true,"note":"","last_login":"2020-10-27T08:32:38.881Z","out_of_office":false,"out_of_office_start_at":null,"out_of_office_end_at":null,"out_of_office_replacement_id":null,"preferences":{"notification_config":{"matrix":{"create":{"criteria":{"owned_by_me":true,"owned_by_nobody":true},"channel":{"email":true,"online":true}},"update":{"criteria":{"owned_by_me":true,"owned_by_nobody":true},"channel":{"email":true,"online":true}},"reminder_reached":{"criteria":{"owned_by_me":true},"channel":{"email":true,"online":true}},"escalation":{"criteria":{"owned_by_me":true},"channel":{"email":true,"online":true}}},"group_ids":["1"]},"locale":"en-us","intro":true,"notification_sound":{"file":"Xylo.mp3","enabled":false}},"updated_by_id":3,"created_by_id":1,"created_at":"2020-10-27T07:40:37.463Z","updated_at":"2020-10-27T08:44:28.355Z","permissions":["admin","admin.user","admin.group","admin.role","admin.organization","admin.overview","admin.text_module","admin.time_accounting","admin.macro","admin.tag","admin.calendar","admin.sla","admin.trigger","admin.scheduler","admin.report_profile","admin.channel_web","admin.channel_formular","admin.channel_email","admin.channel_twitter","admin.channel_facebook","admin.channel_telegram","admin.channel_sms","admin.channel_chat","admin.branding","admin.setting_system","admin.security","admin.ticket","admin.package","admin.integration","admin.api","admin.object","admin.translation","admin.monitoring","admin.data_privacy","admin.maintenance","admin.session","user_preferences","user_preferences.password","user_preferences.notifications","user_preferences.access_token","user_preferences.language","user_preferences.linked_accounts","user_preferences.device","user_preferences.avatar","user_preferences.calendar","user_preferences.out_of_office","report","ticket.agent","chat.agent","cti.agent","admin.knowledge_base","knowledge_base.editor","knowledge_base.reader"],"role_ids":[1,2]}}

Payload size: 0M
E, [2020-10-27T09:00:09.501548 #9445-47348311935480] ERROR -- : Error performing SearchIndexJob (Job ID: b63e3d04-36cc-4912-ab30-9c14496f9ada) from DelayedJob(default) in 35.18ms: RuntimeError (Unable to process post request to elasticsearch URL 'http://localhost:9200/zammad_production/StatsStore/1'. Check the response and payload for detailed information: 

Response:
#<UserAgent::Result:0x000056204692d008 @success=false, @body="{\"error\":{\"root_cause\":[{\"type\":\"illegal_argument_exception\",\"reason\":\"Rejecting mapping update to [zammad_production] as the final mapping would have more than 1 type: [User, StatsStore]\"}],\"type\":\"illegal_argument_exception\",\"reason\":\"Rejecting mapping update to [zammad_production] as the final mapping would have more than 1 type: [User, StatsStore]\"},\"status\":400}", @data=nil, @code="400", @content_type=nil, @error="Client Error: #<Net::HTTPBadRequest 400 Bad Request readbody=true>!">

Payload:
{"id":1,"stats_store_object_id":1,"o_id":3,"key":"dashboard","related_stats_store_object_id":null,"data":{"StatsTicketReopen":{"used_for_average":0.0,"percent":0.0,"average_per_agent":0.0,"state":"supergood","count":0,"total":3},"StatsTicketWaitingTime":{"handling_time":0,"average_per_agent":0,"state":"supergood","percent":0.0},"StatsTicketEscalation":{"used_for_average":0,"average_per_agent":0.0,"state":"supergood","own":0,"total":0},"StatsTicketChannelDistribution":{"channels":{"email":{"icon":"email","inbound":0,"outbound":0,"inbound_in_percent":0,"outbound_in_percent":0},"phone":{"icon":"phone","inbound":3,"outbound":0,"inbound_in_percent":100,"outbound_in_percent":0},"web":{"icon":"web","inbound":0,"outbound":0,"inbound_in_percent":0,"outbound_in_percent":0}}},"StatsTicketLoadMeasure":{"used_for_average":0,"average_per_agent":0.0,"percent":0,"state":"supergood","own":0,"total":0},"StatsTicketInProcess":{"used_for_average":100.0,"average_per_agent":100.0,"state":"supergood","in_process":3,"percent":100.0,"total":3}},"created_by_id":1,"created_at":"2020-10-27T07:47:31.937Z","updated_at":"2020-10-27T08:45:03.004Z","stats_store_object":"User","stats_store_object_ref":{"id":3,"organization_id":null,"login":"shmuel@humanz.ai","firstname":"Shmuel","lastname":"Goldfarb","email":"shmuel@humanz.ai","web":"","phone":"","fax":"","mobile":"","department":"","street":"","zip":"","city":"","country":"","address":"","vip":false,"verified":false,"active":true,"note":"","last_login":"2020-10-27T08:32:38.881Z","out_of_office":false,"out_of_office_start_at":null,"out_of_office_end_at":null,"out_of_office_replacement_id":null,"preferences":{"notification_config":{"matrix":{"create":{"criteria":{"owned_by_me":true,"owned_by_nobody":true},"channel":{"email":true,"online":true}},"update":{"criteria":{"owned_by_me":true,"owned_by_nobody":true},"channel":{"email":true,"online":true}},"reminder_reached":{"criteria":{"owned_by_me":true},"channel":{"email":true,"online":true}},"escalation":{"criteria":{"owned_by_me":true},"channel":{"email":true,"online":true}}},"group_ids":["1"]},"locale":"en-us","intro":true,"notification_sound":{"file":"Xylo.mp3","enabled":false}},"updated_by_id":3,"created_by_id":1,"created_at":"2020-10-27T07:40:37.463Z","updated_at":"2020-10-27T08:44:28.355Z","permissions":["admin","admin.user","admin.group","admin.role","admin.organization","admin.overview","admin.text_module","admin.time_accounting","admin.macro","admin.tag","admin.calendar","admin.sla","admin.trigger","admin.scheduler","admin.report_profile","admin.channel_web","admin.channel_formular","admin.channel_email","admin.channel_twitter","admin.channel_facebook","admin.channel_telegram","admin.channel_sms","admin.channel_chat","admin.branding","admin.setting_system","admin.security","admin.ticket","admin.package","admin.integration","admin.api","admin.object","admin.translation","admin.monitoring","admin.data_privacy","admin.maintenance","admin.session","user_preferences","user_preferences.password","user_preferences.notifications","user_preferences.access_token","user_preferences.language","user_preferences.linked_accounts","user_preferences.device","user_preferences.avatar","user_preferences.calendar","user_preferences.out_of_office","report","ticket.agent","chat.agent","cti.agent","admin.knowledge_base","knowledge_base.editor","knowledge_base.reader"],"role_ids":[1,2]}}

Payload size: 0M):
/home/ubuntu/zammad/lib/search_index_backend.rb:895:in `make_request_and_validate'
/home/ubuntu/zammad/lib/search_index_backend.rb:145:in `add'
/home/ubuntu/zammad/app/models/concerns/has_search_index_backend.rb:168:in `search_index_update_backend'
/home/ubuntu/zammad/app/jobs/search_index_job.rb:26:in `update_search_index'
/home/ubuntu/zammad/app/jobs/search_index_job.rb:22:in `perform'
/home/ubuntu/.rvm/gems/ruby-2.6.6/gems/activejob-5.2.4.4/lib/active_job/execution.rb:39:in `block in perform_now'
/home/ubuntu/.rvm/gems/ruby-2.6.6/gems/activesupport-5.2.4.4/lib/active_support/callbacks.rb:109:in `block in run_callbacks'
/home/ubuntu/zammad/app/jobs/concerns/has_active_job_lock.rb:12:in `block (2 levels) in <module:HasActiveJobLock>'
/home/ubuntu/.rvm/gems/ruby-2.6.6/gems/activesupport-5.2.4.4/lib/active_support/callbacks.rb:118:in `instance_exec'
/home/ubuntu/.rvm/gems/ruby-2.6.6/gems/activesupport-5.2.4.4/lib/active_support/callbacks.rb:118:in `block in run_callbacks'
/home/ubuntu/.rvm/gems/ruby-2.6.6/gems/i18n-1.8.3/lib/i18n.rb:313:in `with_locale'
/home/ubuntu/.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/ubuntu/.rvm/gems/ruby-2.6.6/gems/activesupport-5.2.4.4/lib/active_support/callbacks.rb:118:in `instance_exec'
/home/ubuntu/.rvm/gems/ruby-2.6.6/gems/activesupport-5.2.4.4/lib/active_support/callbacks.rb:118:in `block in run_callbacks'
/home/ubuntu/.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/ubuntu/.rvm/gems/ruby-2.6.6/gems/activesupport-5.2.4.4/lib/active_support/notifications.rb:168:in `block in instrument'
/home/ubuntu/.rvm/gems/ruby-2.6.6/gems/activesupport-5.2.4.4/lib/active_support/notifications/instrumenter.rb:23:in `instrument'
/home/ubuntu/.rvm/gems/ruby-2.6.6/gems/activesupport-5.2.4.4/lib/active_support/notifications.rb:168:in `instrument'
/home/ubuntu/.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/ubuntu/.rvm/gems/ruby-2.6.6/gems/activejob-5.2.4.4/lib/active_job/logging.rb:46:in `block in tag_logger'
/home/ubuntu/.rvm/gems/ruby-2.6.6/gems/activesupport-5.2.4.4/lib/active_support/tagged_logging.rb:71:in `block in tagged'
/home/ubuntu/.rvm/gems/ruby-2.6.6/gems/activesupport-5.2.4.4/lib/active_support/tagged_logging.rb:28:in `tagged'
/home/ubuntu/.rvm/gems/ruby-2.6.6/gems/activesupport-5.2.4.4/lib/active_support/tagged_logging.rb:71:in `tagged'
/home/ubuntu/.rvm/gems/ruby-2.6.6/gems/activejob-5.2.4.4/lib/active_job/logging.rb:46:in `tag_logger'
/home/ubuntu/.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/ubuntu/.rvm/gems/ruby-2.6.6/gems/activesupport-5.2.4.4/lib/active_support/callbacks.rb:118:in `instance_exec'
/home/ubuntu/.rvm/gems/ruby-2.6.6/gems/activesupport-5.2.4.4/lib/active_support/callbacks.rb:118:in `block in run_callbacks'
/home/ubuntu/.rvm/gems/ruby-2.6.6/gems/activesupport-5.2.4.4/lib/active_support/callbacks.rb:136:in `run_callbacks'
/home/ubuntu/.rvm/gems/ruby-2.6.6/gems/activejob-5.2.4.4/lib/active_job/execution.rb:38:in `perform_now'
/home/ubuntu/.rvm/gems/ruby-2.6.6/gems/activejob-5.2.4.4/lib/active_job/execution.rb:24:in `block in execute'
/home/ubuntu/.rvm/gems/ruby-2.6.6/gems/activesupport-5.2.4.4/lib/active_support/callbacks.rb:109:in `block in run_callbacks'
/home/ubuntu/.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/ubuntu/.rvm/gems/ruby-2.6.6/gems/activesupport-5.2.4.4/lib/active_support/execution_wrapper.rb:87:in `wrap'
/home/ubuntu/.rvm/gems/ruby-2.6.6/gems/activesupport-5.2.4.4/lib/active_support/reloader.rb:73:in `block in wrap'
/home/ubuntu/.rvm/gems/ruby-2.6.6/gems/activesupport-5.2.4.4/lib/active_support/execution_wrapper.rb:87:in `wrap'
/home/ubuntu/.rvm/gems/ruby-2.6.6/gems/activesupport-5.2.4.4/lib/active_support/reloader.rb:72:in `wrap'
/home/ubuntu/.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/ubuntu/.rvm/gems/ruby-2.6.6/gems/activesupport-5.2.4.4/lib/active_support/callbacks.rb:118:in `instance_exec'
/home/ubuntu/.rvm/gems/ruby-2.6.6/gems/activesupport-5.2.4.4/lib/active_support/callbacks.rb:118:in `block in run_callbacks'
/home/ubuntu/.rvm/gems/ruby-2.6.6/gems/activesupport-5.2.4.4/lib/active_support/callbacks.rb:136:in `run_callbacks'
/home/ubuntu/.rvm/gems/ruby-2.6.6/gems/activejob-5.2.4.4/lib/active_job/execution.rb:22:in `execute'
/home/ubuntu/.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/ubuntu/.rvm/gems/ruby-2.6.6/gems/delayed_job-4.1.7/lib/delayed/backend/base.rb:81:in `block in invoke_job'
/home/ubuntu/.rvm/gems/ruby-2.6.6/gems/delayed_job-4.1.7/lib/delayed/lifecycle.rb:61:in `block in initialize'
/home/ubuntu/.rvm/gems/ruby-2.6.6/gems/delayed_job-4.1.7/lib/delayed/lifecycle.rb:66:in `execute'
/home/ubuntu/.rvm/gems/ruby-2.6.6/gems/delayed_job-4.1.7/lib/delayed/lifecycle.rb:40:in `run_callbacks'
/home/ubuntu/.rvm/gems/ruby-2.6.6/gems/delayed_job-4.1.7/lib/delayed/backend/base.rb:78:in `invoke_job'
/home/ubuntu/.rvm/gems/ruby-2.6.6/gems/delayed_job-4.1.7/lib/delayed/worker.rb:230:in `block (2 levels) in run'
/home/ubuntu/.rvm/rubies/ruby-2.6.6/lib/ruby/2.6.0/timeout.rb:93:in `block in timeout'
/home/ubuntu/.rvm/rubies/ruby-2.6.6/lib/ruby/2.6.0/timeout.rb:103:in `timeout'
/home/ubuntu/.rvm/gems/ruby-2.6.6/gems/delayed_job-4.1.7/lib/delayed/worker.rb:230:in `block in run'
/home/ubuntu/.rvm/rubies/ruby-2.6.6/lib/ruby/2.6.0/benchmark.rb:308:in `realtime'
/home/ubuntu/.rvm/gems/ruby-2.6.6/gems/delayed_job-4.1.7/lib/delayed/worker.rb:229:in `run'
/home/ubuntu/.rvm/gems/ruby-2.6.6/gems/delayed_job-4.1.7/lib/delayed/worker.rb:312:in `block in reserve_and_run_one_job'
/home/ubuntu/.rvm/gems/ruby-2.6.6/gems/delayed_job-4.1.7/lib/delayed/lifecycle.rb:61:in `block in initialize'
/home/ubuntu/.rvm/gems/ruby-2.6.6/gems/delayed_job-4.1.7/lib/delayed/lifecycle.rb:66:in `execute'
/home/ubuntu/.rvm/gems/ruby-2.6.6/gems/delayed_job-4.1.7/lib/delayed/lifecycle.rb:40:in `run_callbacks'
/home/ubuntu/.rvm/gems/ruby-2.6.6/gems/delayed_job-4.1.7/lib/delayed/worker.rb:312:in `reserve_and_run_one_job'
/home/ubuntu/.rvm/gems/ruby-2.6.6/gems/delayed_job-4.1.7/lib/delayed/worker.rb:213:in `block in work_off'
/home/ubuntu/.rvm/gems/ruby-2.6.6/gems/delayed_job-4.1.7/lib/delayed/worker.rb:212:in `times'
/home/ubuntu/.rvm/gems/ruby-2.6.6/gems/delayed_job-4.1.7/lib/delayed/worker.rb:212:in `work_off'
/home/ubuntu/zammad/app/models/scheduler.rb:372:in `block (3 levels) in worker'
/home/ubuntu/.rvm/rubies/ruby-2.6.6/lib/ruby/2.6.0/benchmark.rb:308:in `realtime'
/home/ubuntu/zammad/app/models/scheduler.rb:370:in `block (2 levels) in worker'
/home/ubuntu/zammad/app/models/scheduler.rb:366:in `loop'
/home/ubuntu/zammad/app/models/scheduler.rb:366:in `block in worker'
/home/ubuntu/.rvm/gems/ruby-2.6.6/gems/logging-2.2.2/lib/logging/diagnostic_context.rb:474:in `block in create_with_logging_context'
E, [2020-10-27T09:00:09.501675 #9445-47348311935480] ERROR -- : Retrying SearchIndexJob in #<Proc:0x0000562044de54a8@/home/ubuntu/zammad/app/jobs/search_index_job.rb:6 (lambda)> seconds, due to a StandardError. The original exception was nil.
I, [2020-10-27T09:00:09.509233 #9445-47348311935480]  INFO -- : Enqueued SearchIndexJob (Job ID: b63e3d04-36cc-4912-ab30-9c14496f9ada) to DelayedJob(default) at 2020-10-27 09:03:09 UTC with arguments: "StatsStore", 1
I, [2020-10-27T09:00:09.512800 #9445-47348311935480]  INFO -- : 2020-10-27T09:00:09+0000: [Worker(host:ip-172-31-47-254 pid:9445)] Job SearchIndexJob [b63e3d04-36cc-4912-ab30-9c14496f9ada] from DelayedJob(default) with arguments: ["StatsStore", 1] (id=565) (queue=default) COMPLETED after 0.0672
I, [2020-10-27T09:00:14.173745 #9445-47348241086820]  INFO -- : Scheduler running...
I, [2020-10-27T09:00:14.227202 #9445-47348311689720]  INFO -- : execute Ticket.process_auto_unassign (try_count 0)...
I, [2020-10-27T09:00:14.229010 #9445-47348311689720]  INFO -- : ended Ticket.process_auto_unassign took: 0.005843092 seconds.

Any ideas?
Thanks

Hi @Ghost93

using AWS goes against the idea of self-hosted :slight_smile: Self-hosted: you have your own box sitting under your desk or in your local DC :slight_smile:

Did you install Java together with Elasticsearch?

Regards

Hi @rsysadmin, thanks for the reply.

  1. Well my company don’t own any of these “boxes”, everything is in the cloud, so by self hosted I mean I installed it on a cloud vm on my own.

  2. I have not installed Java with Elasticsearch, at least not that I’m aware of. I followed the instructions from this page and then from this page

Do you think the issue is related to the java version installed on server?

Thanks

Hi again,

please ssh to the server, run:

java --version [enter]

and paste the output here.

We’ll take it from there.

Cheers,
Martin

user@ubuntu-server:~$ java --version
Unrecognized option: --version
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.

however,

user@ubuntu-server:~$ java -version
openjdk version "1.8.0_272"
OpenJDK Runtime Environment (build 1.8.0_272-8u272-b10-0ubuntu1~20.04-b10)
OpenJDK 64-Bit Server VM (build 25.272-b10, mixed mode)

Oh, in my case it works both ways:

martin@rigel:~> java --version
openjdk 11.0.8 2020-07-14
OpenJDK Runtime Environment (build 11.0.8+10-suse-1.3-x8664)
OpenJDK 64-Bit Server VM (build 11.0.8+10-suse-1.3-x8664, mixed mode)
martin@rigel:~>
martin@rigel:~> java -version
openjdk version “11.0.8” 2020-07-14
OpenJDK Runtime Environment (build 11.0.8+10-suse-1.3-x8664)
OpenJDK 64-Bit Server VM (build 11.0.8+10-suse-1.3-x8664, mixed mode)
martin@rigel:~>

Anyway, you do have Java installed.

Please see: https://docs.zammad.org/en/latest/install/ubuntu.html

and from there:

image

so maybe this is the reason why your instance is not working as expected.

Just try to use a supported version (go with 18.04 LTS). If you want, you can use the installer script I created some time ago:

Instructions on how to use it are also available.

Please keep me/us posted.

Best,
Martin

Ah, I knew I rushed to Ubuntu 20 too fast.

Anyway, I looked at your script on github and I’m trying to run the final Elasticsearch steps on my machine:

echo -e "== Rebuilding indexes"
zammad run rake searchindex:rebuild  > /dev/null

echo -e "== Doing some final configuration on Zammad"
zammad run rails r "Setting.set('es_index', Socket.gethostname.downcase + '_zammad')"

echo -e "== Excluding stuff to be indexed"
zammad run rails r "Setting.set('es_attachment_ignore', [ '.png', '.jpg', '.jpeg', '.mpeg', '.mpg', '.mov', '.bin', '.exe', '.box', '.mbox' ] )"

echo -e "== Setting maximum size for attachements to be indexed"
zammad run rails r "Setting.set('es_attachment_max_size_in_mb', 50)"

Of course since I installed from using bundler etc. I don’t have the zammad cli but I run rake directly.

So, I’m trying the first step:

ubuntu@ubuntu-server:~/zammad$ rake zammad:searchindex:rebuild --trace

rake aborted!
Don't know how to build task 'zammad:searchindex:rebuild' (See the list of available tasks with `rake --tasks`)
Did you mean?  zammad:db:unseeded
/home/ubuntu/.rvm/rubies/ruby-2.6.6/lib/ruby/gems/2.6.0/gems/rake-12.3.3/lib/rake/task_manager.rb:59:in `[]'
/home/ubuntu/.rvm/rubies/ruby-2.6.6/lib/ruby/gems/2.6.0/gems/rake-12.3.3/lib/rake/application.rb:159:in `invoke_task'
/home/ubuntu/.rvm/rubies/ruby-2.6.6/lib/ruby/gems/2.6.0/gems/rake-12.3.3/lib/rake/application.rb:116:in `block (2 levels) in top_level'
/home/ubuntu/.rvm/rubies/ruby-2.6.6/lib/ruby/gems/2.6.0/gems/rake-12.3.3/lib/rake/application.rb:116:in `each'
/home/ubuntu/.rvm/rubies/ruby-2.6.6/lib/ruby/gems/2.6.0/gems/rake-12.3.3/lib/rake/application.rb:116:in `block in top_level'
/home/ubuntu/.rvm/rubies/ruby-2.6.6/lib/ruby/gems/2.6.0/gems/rake-12.3.3/lib/rake/application.rb:125:in `run_with_threads'
/home/ubuntu/.rvm/rubies/ruby-2.6.6/lib/ruby/gems/2.6.0/gems/rake-12.3.3/lib/rake/application.rb:110:in `top_level'
/home/ubuntu/.rvm/rubies/ruby-2.6.6/lib/ruby/gems/2.6.0/gems/rake-12.3.3/lib/rake/application.rb:83:in `block in run'
/home/ubuntu/.rvm/rubies/ruby-2.6.6/lib/ruby/gems/2.6.0/gems/rake-12.3.3/lib/rake/application.rb:186:in `standard_exception_handling'
/home/ubuntu/.rvm/rubies/ruby-2.6.6/lib/ruby/gems/2.6.0/gems/rake-12.3.3/lib/rake/application.rb:80:in `run'
/home/ubuntu/.rvm/rubies/ruby-2.6.6/lib/ruby/gems/2.6.0/gems/rake-12.3.3/exe/rake:27:in `<top (required)>'
/home/ubuntu/.rvm/gems/ruby-2.6.6/bin/rake:23:in `load'
/home/ubuntu/.rvm/gems/ruby-2.6.6/bin/rake:23:in `<main>'
/home/ubuntu/.rvm/gems/ruby-2.6.6/bin/ruby_executable_hooks:24:in `eval'
/home/ubuntu/.rvm/gems/ruby-2.6.6/bin/ruby_executable_hooks:24:in `<main>'

Actually, Here’s the available rake command related to Zammad. As you can see I don’t have the rebuild task:

ubuntu@ubuntu-server:~/zammad$ rake --tasks | grep zammad
rake zammad:bootstrap:init                    # Initializes a Zammad for the first time
rake zammad:bootstrap:reset                   # Resets a Zammad and reinitializes it
rake zammad:ci:app:restart                    # Restarts the application
rake zammad:ci:app:start                      # Starts the application and uses BROWSER_PORT, RAILS_ENV and WS_PORT ENVs
rake zammad:ci:app:stop                       # Stops the application
rake zammad:ci:service:puma:start[port,env]   # Starts the puma application webserver
rake zammad:ci:service:puma:stop              # Stops the puma application webserver
rake zammad:ci:service:scheduler:start        # Starts the scheduler
rake zammad:ci:service:scheduler:stop         # Stops the scheduler
rake zammad:ci:service:websocket:start[port]  # Starts the websocket server
rake zammad:ci:service:websocket:stop         # Stops the websocket server
rake zammad:ci:settings[elasticsearch]        # Sets all required Settings for performing tests in the CI environment
rake zammad:ci:test:fail[no_app]              # Stops all of Zammads services and exists the rake task with exit code 1
rake zammad:ci:test:prepare[elasticsearch]    # Prepares Zammad system for CI env
rake zammad:ci:test:start[elasticsearch]      # Starts all of Zammads services for CI test
rake zammad:ci:test:stop[no_app]              # Stop of all Zammad services and cleans up the database(s)
rake zammad:db:init                           # Initializes (creates, migrates and seeds) the DB
rake zammad:db:reset                          # Drops, recreates and seeds the database, clears the Cache and reloads the Settings
rake zammad:db:unseeded                       # Creates and migrates the DB without seeding
rake zammad:flush                             # Flushes all logs and caches
rake zammad:flush:cache                       # Flushes all caches
rake zammad:flush:log:rails[env]              # Flushes the log Rails file of the given or active environment
rake zammad:flush:log:scheduler               # Flushes all scheduler log files
rake zammad:flush:log:websocket               # Flushes all websocket server log files
rake zammad:flush:logs                        # Flushes all logs
rake zammad:setup:auto_wizard[source]         # Initializes Zammad via a given auto_wizard JSON file or falls back to contrib/auto_wizard_test.json
rake zammad:setup:db_config                   # Copies the database config template file to config/database.yml

Any ideas?
Thanks

Yes. Just run the installer script and let it do its job :slight_smile:

I tested it on Ubuntu 18.x and it works flawlessly.

Regards

Ok, so just downgrading to Ubuntu 18?
What about the error from Elasticsearch?

#<UserAgent::Result:0x000056204692d008 @success=false, @body="{\"error\":{\"root_cause\":[{\"type\":\"illegal_argument_exception\",\"reason\":\"Rejecting mapping update to [zammad_production] as the final mapping would have more than 1 type: [User, StatsStore]\"}],\"type\":\"illegal_argument_exception\",\"reason\":\"Rejecting mapping update to [zammad_production] as the final mapping would have more than 1 type: [User, StatsStore]\"},\"status\":400}", @data=nil, @code="400", @content_type=nil, @error="Client Error: #<Net::HTTPBadRequest 400 Bad Request readbody=true>!">

Are you still getting it on Ubuntu 18 after running the script?

I’m trying to not move the whole installation since I already configured a lot of things…

Let me try to upgrade Elasticsearch to version 7.x

the script installs Elasticsearch 7.x automatically for you…

Really dude… just get an Ubuntu 18.x instance up, clone the git repo, run the script, sit back and relax… :slight_smile:

I’m calling it a day. It’s the weekend, time to be with the family.

Keep me posted.

Hey

Ended up spinning a new Ubuntu 18 LTS ec2.
Installed Zammad and Elasticsearch using deb packages.

So far so good.

1 Like

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