Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Status Code 500 in Reporting #1788

Closed
Benareli opened this issue Jan 30, 2018 · 8 comments
Closed

Status Code 500 in Reporting #1788

Benareli opened this issue Jan 30, 2018 · 8 comments
Labels

Comments

@Benareli
Copy link

  • Used Zammad version: 2.2.0
  • Installation method : ubuntu16.04 deb from zammad.org
  • Operating system: ubuntu16.04

Expected behavior:

REporting page running smooth

Actual behavior:

when i click reporting, error report is out with

{"error":"Unable to process POST at http://127.0.0.1:9200/zammad_production/Ticket/_search\n#\u003cUserAgent::Result:0x000055d5fb33aaf0 @success=false, @Body=nil, @DaTa=nil, @code=0, @content_type=nil, @error="#\u003cErrno::ECONNREFUSED: Failed to open TCP connection to 127.0.0.1:9200 (Connection refused - connect(2) for \"127.0.0.1\" port 9200)\u003e"\u003e"}

Steps to reproduce the behavior:

open report page.

i try to "zammad run rake searchindex:rebuild --trace"

and the trace is

** Invoke searchindex:rebuild (first_time)
** Invoke environment (first_time)
** Execute environment
** Execute searchindex:rebuild
** Execute searchindex:drop
drop indexes...done
** Execute searchindex:drop_pipeline
rake aborted!
Unable to process GET at http://127.0.0.1:9200
#<UserAgent::Result:0x000055a882c26cf0 @success=false, @Body=nil, @DaTa=nil, @code=0, @content_type=nil, @error="#<Errno::ECONNREFUSED: Failed to open TCP connection to 127.0.0.1:9200 (Connection refused - connect(2) for "127.0.0.1" port 9200)>">
/opt/zammad/lib/search_index_backend.rb:29:in info' /opt/zammad/lib/tasks/search_index_es.rake:128:in block (2 levels) in <top (required)>'
/opt/zammad/vendor/bundle/ruby/2.4.0/gems/rake-12.3.0/lib/rake/task.rb:251:in block in execute' /opt/zammad/vendor/bundle/ruby/2.4.0/gems/rake-12.3.0/lib/rake/task.rb:251:in each'
/opt/zammad/vendor/bundle/ruby/2.4.0/gems/rake-12.3.0/lib/rake/task.rb:251:in execute' /opt/zammad/lib/tasks/search_index_es.rake:14:in block (2 levels) in <top (required)>'
/opt/zammad/vendor/bundle/ruby/2.4.0/gems/rake-12.3.0/lib/rake/task.rb:251:in block in execute' /opt/zammad/vendor/bundle/ruby/2.4.0/gems/rake-12.3.0/lib/rake/task.rb:251:in each'
/opt/zammad/vendor/bundle/ruby/2.4.0/gems/rake-12.3.0/lib/rake/task.rb:251:in execute' /opt/zammad/lib/tasks/search_index_es.rake:165:in block (2 levels) in <top (required)>'
/opt/zammad/vendor/bundle/ruby/2.4.0/gems/rake-12.3.0/lib/rake/task.rb:251:in block in execute' /opt/zammad/vendor/bundle/ruby/2.4.0/gems/rake-12.3.0/lib/rake/task.rb:251:in each'
/opt/zammad/vendor/bundle/ruby/2.4.0/gems/rake-12.3.0/lib/rake/task.rb:251:in execute' /opt/zammad/vendor/bundle/ruby/2.4.0/gems/rake-12.3.0/lib/rake/task.rb:195:in block in invoke_with_call_chain'
/opt/zammad/vendor/ruby-2.4.2/lib/ruby/2.4.0/monitor.rb:214:in mon_synchronize' /opt/zammad/vendor/bundle/ruby/2.4.0/gems/rake-12.3.0/lib/rake/task.rb:188:in invoke_with_call_chain'
/opt/zammad/vendor/bundle/ruby/2.4.0/gems/rake-12.3.0/lib/rake/task.rb:181:in invoke' /opt/zammad/vendor/bundle/ruby/2.4.0/gems/rake-12.3.0/lib/rake/application.rb:160:in invoke_task'
/opt/zammad/vendor/bundle/ruby/2.4.0/gems/rake-12.3.0/lib/rake/application.rb:116:in block (2 levels) in top_level' /opt/zammad/vendor/bundle/ruby/2.4.0/gems/rake-12.3.0/lib/rake/application.rb:116:in each'
/opt/zammad/vendor/bundle/ruby/2.4.0/gems/rake-12.3.0/lib/rake/application.rb:116:in block in top_level' /opt/zammad/vendor/bundle/ruby/2.4.0/gems/rake-12.3.0/lib/rake/application.rb:125:in run_with_threads'
/opt/zammad/vendor/bundle/ruby/2.4.0/gems/rake-12.3.0/lib/rake/application.rb:110:in top_level' /opt/zammad/vendor/bundle/ruby/2.4.0/gems/rake-12.3.0/lib/rake/application.rb:83:in block in run'
/opt/zammad/vendor/bundle/ruby/2.4.0/gems/rake-12.3.0/lib/rake/application.rb:186:in standard_exception_handling' /opt/zammad/vendor/bundle/ruby/2.4.0/gems/rake-12.3.0/lib/rake/application.rb:80:in run'
/opt/zammad/vendor/bundle/ruby/2.4.0/gems/rake-12.3.0/exe/rake:27:in <top (required)>' /opt/zammad/vendor/bundle/ruby/2.4.0/bin/rake:22:in load'
/opt/zammad/vendor/bundle/ruby/2.4.0/bin/rake:22:in <top (required)>' /opt/zammad/vendor/bundle/ruby/2.4.0/gems/bundler-1.15.1/lib/bundler/cli/exec.rb:74:in load'
/opt/zammad/vendor/bundle/ruby/2.4.0/gems/bundler-1.15.1/lib/bundler/cli/exec.rb:74:in kernel_load' /opt/zammad/vendor/bundle/ruby/2.4.0/gems/bundler-1.15.1/lib/bundler/cli/exec.rb:27:in run'
/opt/zammad/vendor/bundle/ruby/2.4.0/gems/bundler-1.15.1/lib/bundler/cli.rb:360:in exec' /opt/zammad/vendor/bundle/ruby/2.4.0/gems/bundler-1.15.1/lib/bundler/vendor/thor/lib/thor/command.rb:27:in run'
/opt/zammad/vendor/bundle/ruby/2.4.0/gems/bundler-1.15.1/lib/bundler/vendor/thor/lib/thor/invocation.rb:126:in invoke_command' /opt/zammad/vendor/bundle/ruby/2.4.0/gems/bundler-1.15.1/lib/bundler/vendor/thor/lib/thor.rb:369:in dispatch'
/opt/zammad/vendor/bundle/ruby/2.4.0/gems/bundler-1.15.1/lib/bundler/cli.rb:20:in dispatch' /opt/zammad/vendor/bundle/ruby/2.4.0/gems/bundler-1.15.1/lib/bundler/vendor/thor/lib/thor/base.rb:444:in start'
/opt/zammad/vendor/bundle/ruby/2.4.0/gems/bundler-1.15.1/lib/bundler/cli.rb:10:in start' /opt/zammad/vendor/bundle/ruby/2.4.0/gems/bundler-1.15.1/exe/bundle:35:in block in <top (required)>'
/opt/zammad/vendor/bundle/ruby/2.4.0/gems/bundler-1.15.1/lib/bundler/friendly_errors.rb:121:in with_friendly_errors' /opt/zammad/vendor/bundle/ruby/2.4.0/gems/bundler-1.15.1/exe/bundle:27:in <top (required)>'
/opt/zammad/bin/bundle:3:in load' /opt/zammad/bin/bundle:3:in

'
Tasks: TOP => searchindex:rebuild

Please help. :)

@muhammadn
Copy link
Contributor

Your elasticsearch is not running. You need to run systemctl start elasticsearch

Anyway, this is not a bug but more of a support issue. For support issues, please go to https://community.zammad.org/ where they are a lot more people to help you.

@Benareli
Copy link
Author

systemctl status elasticsearch
● elasticsearch.service - Elasticsearch
Loaded: loaded (/usr/lib/systemd/system/elasticsearch.service; enabled; vendor preset: enabled)
Active: active (running) since Tue 2018-01-30 12:38:12 UTC; 25s ago
Docs: http://www.elastic.co
Process: 3202 ExecStartPre=/usr/share/elasticsearch/bin/elasticsearch-systemd-pre-exec (code=exited, status=0/SUCCES
Main PID: 3205 (java)
Tasks: 37
Memory: 276.2M
CPU: 19.133s
CGroup: /system.slice/elasticsearch.service
└─3205 /usr/bin/java -Xms128m -Xmx128m -XX:+UseConcMarkSweepGC -XX:CMSInitiatingOccupancyFraction=75 -XX:+U

it is running

@ghost
Copy link

ghost commented Feb 16, 2018

Same problem here whenever I try to use reports on Ubuntu;

{"error":"Unable to process POST at http://127.0.0.1:9200/zammad_production/Ticket/_search\n#\u003cUserAgent::Result:0x00005637fef9bbe0 @success=false, @Body=nil, @DaTa=nil, @code=0, @content_type=nil, @error="#\u003cErrno::ECONNREFUSED: Failed to open TCP connection to 127.0.0.1:9200 (Connection refused - connect(2) for \"127.0.0.1\" port 9200)\u003e"\u003e"}

I thought I'd try the install on Centos7 which worked fine. Only an issue with Ubuntu, following the deb install docs.

Any thoughts? I've tried the above; "Your elasticsearch is not running. You need to run systemctl start elasticsearch" but fairly sure this is a bug.

@monotek
Copy link
Member

monotek commented Feb 16, 2018

I doubt this is a bug.

Whats the output of:

  • curl 127.0.0.1:9200

Which elasticsearch version do you use?

@ghost
Copy link

ghost commented Feb 16, 2018

Thanks for the reply. The response is: "Failed to connect to 127.0.0.1 port 9200: Connection refused".
It's like nothing is listening on 9200. Firewalls are disabled.

Output of "systemctl status elasticsearch" - if this helps. Everything seems to be running from what I can tell but this is my first experience with Zammad.

"● elasticsearch.service - LSB: Starts elasticsearch
Loaded: loaded (/etc/init.d/elasticsearch; bad; vendor preset: enabled)
Active: active (exited) since Fri 2018-02-16 12:23:37 GMT; 1h 16min ago
Docs: man:systemd-sysv-generator(8)
Process: 1282 ExecStart=/etc/init.d/elasticsearch start (code=exited, status=0
Tasks: 0
Memory: 0B
CPU: 0

Feb 16 12:23:37 Zammad systemd[1]: Starting LSB: Starts elasticsearch...
Feb 16 12:23:37 Zammad systemd[1]: Started LSB: Starts elasticsearch.
Feb 16 12:30:33 Zammad systemd[1]: Started LSB: Starts elasticsearch.
Feb 16 12:36:55 Zammad systemd[1]: Started LSB: Starts elasticsearch.
lines 1-13/13 (END)"

@ghost
Copy link

ghost commented Feb 16, 2018

I assume by following this install guide (https://docs.zammad.org/en/latest/install-ubuntu.html#) that this should install all dependencies for Zammad? I ran the DEB installer on a clean, updated Ubuntu Server 16.04 install.

I will try installing from source later rather than the DEB package.

I've created a thread on the community forum as suggested (https://community.zammad.org/t/error-500-on-reports-ubuntu-16-04-server/316) but still unsure if this is a support issue or bug.

Please let me know if you require any further info.

@monotek
Copy link
Member

monotek commented Feb 16, 2018

Check your elasticsearch installation.
Maybe reading the docs will help: https://docs.zammad.org/en/latest/install-elasticsearch.html

@ghost
Copy link

ghost commented Feb 16, 2018

Ooops. Unsure how I managed to miss an entire chapter of the setup guide. Thanks for your help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants