WebGUI, 502 Bad Gateway

    Diese Seite verwendet Cookies. Durch die Nutzung unserer Seite erklären Sie sich damit einverstanden, dass wir Cookies setzen. Weitere Informationen

    • WebGUI, 502 Bad Gateway

      Hallo,

      oh weh — ich hab meine WebGUI kaputt gespielt. Wollte auf dem Server noch zusätzlich ein Letsencrypt & PHP7 installieren, und jetzt läuft die GUI nicht mehr :(
      Die angezeigte "502 - Bad Gateway" Seite ist aber immerhin SSL gesichert :/

      Der Dienst läuft wohl, nur stimmt was mit Nginx nicht oder so...

      Quellcode

      1. # service bloonix-webgui status
      2. ● bloonix-webgui.service - Bloonix WebGUI
      3. Loaded: loaded (/lib/systemd/system/bloonix-webgui.service; enabled; vendor preset: enabled)
      4. Active: active (running) since Wed 2017-10-25 21:38:27 CEST; 6min ago
      5. Process: 3535 ExecStop=/bin/kill -15 $MAINPID (code=exited, status=0/SUCCESS)
      6. Process: 3552 ExecStart=/srv/bloonix/webgui/scripts/bloonix-webgui --pid-file /var/run/bloonix/bloonix-webgui.pid --config-file /etc/bloonix/webgui/main.conf (code=exited, status=0/SUCCESS)
      7. Process: 3540 ExecStartPre=/usr/lib/bloonix/bin/bloonix-pre-start /var/lib/bloonix /var/lib/bloonix/ipc /var/lib/bloonix/webgui /var/log/bloonix /var/run/bloonix (code=exited, status=0/SUCCESS)
      8. Main PID: 3555 (bloonix-webgui)
      9. Tasks: 1 (limit: 4915)
      10. CGroup: /system.slice/bloonix-webgui.service
      11. └─3555 /usr/bin/perl /srv/bloonix/webgui/scripts/bloonix-webgui --pid-file /var/run/bloonix/bloonix-webgui.pid --config-file /etc/bloonix/webgui/main.conf
      Alles anzeigen



      Hier die /etc/bloonix/webgui/nginx.conf

      Quellcode

      1. ​server {
      2. listen 80 default_server;
      3. server_name _;
      4. location ^~ /.well-known {
      5. alias /var/www/acme-challenges/.well-known;
      6. }
      7. return 301 https://$host$request_uri;
      8. }
      9. server {
      10. listen 443 default_server;
      11. server_name _;
      12. access_log /var/log/nginx/bloonix-webgui.access.log;
      13. error_log /var/log/nginx/bloonix-webgui.error.log;
      14. location ^~ /.well-known {
      15. alias /var/www/acme-challenges/.well-known;
      16. }
      17. location ~ /public {
      18. root /srv/bloonix/webgui;
      19. }
      20. location /favicon.ico {
      21. root /srv/bloonix/webgui/public/img;
      22. }
      23. location / {
      24. expires off;
      25. include /etc/nginx/fastcgi_params;
      26. root /srv/bloonix/webgui/public;
      27. fastcgi_pass 127.0.0.1:9000;
      28. }
      29. ssl on;
      30. ssl_protocols TLSv1.2;
      31. ssl_ciphers 'ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256';
      32. ssl_prefer_server_ciphers on;
      33. ssl_certificate /etc/letsencrypt/live/BLOONIXDOMAIN/fullchain.pem;
      34. ssl_certificate_key /etc/letsencrypt/live/BLOONIXDOMAIN/privkey.pem;
      35. }
      Alles anzeigen



      Dann noch netstat:

      Quellcode

      1. ​# netstat -tulpe
      2. Active Internet connections (only servers)
      3. Proto Recv-Q Send-Q Local Address Foreign Address State User Inode PID/Program name
      4. tcp 0 0 localhost:submission 0.0.0.0:* LISTEN root 13172 676/sendmail: MTA:
      5. tcp 0 0 0.0.0.0:http 0.0.0.0:* LISTEN root 8522193 3402/nginx: master
      6. tcp 0 0 0.0.0.0:5460 0.0.0.0:* LISTEN bloonix 1807230 709/perl
      7. tcp 0 0 0.0.0.0:ssh 0.0.0.0:* LISTEN root 12671 405/sshd
      8. tcp 0 0 localhost:smtp 0.0.0.0:* LISTEN root 13171 676/sendmail: MTA:
      9. tcp 0 0 0.0.0.0:https 0.0.0.0:* LISTEN root 8522194 3402/nginx: master
      10. tcp6 0 0 [::]:mysql [::]:* LISTEN mysql 7556936 14109/mysqld
      11. tcp6 0 0 [::]:ssh [::]:* LISTEN root 12673 405/sshd
      12. udp 0 0 BLOONIXIP.vultr:ntp 0.0.0.0:* root 13895 742/ntpd
      13. udp 0 0 localhost:ntp 0.0.0.0:* root 13893 742/ntpd
      14. udp 0 0 0.0.0.0:ntp 0.0.0.0:* root 13889 742/ntpd
      15. udp 0 0 0.0.0.0:bootpc 0.0.0.0:* root 10712 394/dhclient
      16. udp6 0 0 fe80::5400:1ff:fe38:ntp [::]:* root 13899 742/ntpd
      17. udp6 0 0 localhost:ntp [::]:* root 13897 742/ntpd
      18. udp6 0 0 [::]:ntp [::]:* root 13886 742/ntpd
      Alles anzeigen


      Hat jemand eine Idee?

      Danke :)
    • Hm. Also ich hab die Server.conf wieder auf Originalzustand gesetzt, sehe aber immer noch den 502.

      Im bloonix-webgui.error.log steht nur folgendes:

      Quellcode

      1. 2017/10/26 09:13:31 [error] 838#838: *1 connect() failed (111: Connection refused) while connecting to upstream, client: 188.195.131.58, server: _, request: "GET / HTTP/2.0", upstream: "fastcgi://127.0.0.1:9000", host: "BLOONIXDOMAIN"


      Andere Anwendungen (wie z.B. eine PHP Seite) funktionieren.
    • Also meine conf sieht so aus

      Quellcode

      1. server {
      2. listen 80 ;
      3. server_name meinedomain.de;
      4. location ^~ /.well-known {
      5. alias /var/www/acme-challenges/.well-known;
      6. }
      7. return 301 https://$host$request_uri;
      8. }
      9. server {
      10. listen 443 default_server;
      11. server_name meinedomain.de;
      12. access_log /var/log/nginx/bloonix-webgui.access.log;
      13. error_log /var/log/nginx/bloonix-webgui.error.log;
      14. location ^~ /.well-known {
      15. alias /var/www/acme-challenges/.well-known;
      16. }
      17. location ~ /public {
      18. root /srv/bloonix/webgui;
      19. }
      20. location /favicon.ico {
      21. root /srv/bloonix/webgui/public/img;
      22. }
      23. location / {
      24. expires off;
      25. include /etc/nginx/fastcgi_params;
      26. root /srv/bloonix/webgui/public;
      27. fastcgi_pass 127.0.0.1:9000;
      28. }
      29. ssl on;
      30. ssl_certificate /etc/letsencrypt/live/meinedomain.de/fullchain.pem;
      31. ssl_certificate_key /etc/letsencrypt/live/meinedomain.de/privkey.pem;
      32. }
      Alles anzeigen
    • Quellcode

      1. Aktive Internetverbindungen (Nur Server)
      2. Proto Recv-Q Send-Q Local Address Foreign Address State Benutzer Inode PID/Program name
      3. tcp 0 0 0.0.0.0:http 0.0.0.0:* LISTEN root 16868 1175/nginx: master
      4. tcp 0 0 0.0.0.0:5460 0.0.0.0:* LISTEN bloonix 76951 3258/perl
      5. tcp 0 0 localhost:smtp 0.0.0.0:* LISTEN root 14007 953/sendmail: MTA:
      6. tcp 0 0 0.0.0.0:https 0.0.0.0:* LISTEN root 16869 1175/nginx: master
      7. tcp 0 0 0.0.0.0: 0.0.0.0:* LISTEN root 471523 13411/sshd
      8. tcp 0 0 0.0.0.0:9000 0.0.0.0:* LISTEN bloonix 17030 1065/perl
      9. tcp 0 0 localhost:mysql 0.0.0.0:* LISTEN mysql 14127 952/mysqld
      10. tcp 0 0 localhost:submission 0.0.0.0:* LISTEN root 14008 953/sendmail: MTA:
      11. tcp6 0 0 localhost:9200 [::]:* LISTEN elasticsearch 16970 1139/java
      12. tcp6 0 0 [::]:http [::]:* LISTEN root 16870 1175/nginx: master
      13. tcp6 0 0 localhost:9300 [::]:* LISTEN elasticsearch 16914 1139/java
      14. tcp6 0 0 [::]: [::]:* LISTEN root 471532 13411/sshd
      15. udp 0 0 0.0.0.0:bootpc 0.0.0.0:* root 11623 650/dhclient
      Alles anzeigen
    • Sehr seltsam.

      Quellcode

      1. # service bloonix-server status
      2. ● bloonix-server.service - Bloonix Server
      3. Loaded: loaded (/lib/systemd/system/bloonix-server.service; enabled; vendor preset: enabled)
      4. Active: active (running) since Thu 2017-10-26 10:13:43 CEST; 27min ago
      5. Process: 481 ExecStart=/usr/bin/bloonix-server --pid-file /var/run/bloonix/bloonix-server.pid --config-file /etc/bloonix/server/main.conf (code=exited, status=0/SUCCESS)
      6. Process: 392 ExecStartPre=/usr/lib/bloonix/bin/bloonix-pre-start /var/lib/bloonix /var/lib/bloonix/ipc /var/lib/bloonix/server /var/log/bloonix /var/run/bloonix (code=exited, status=0/SUCCESS)
      7. Main PID: 722 (bloonix-server)
      8. Tasks: 1 (limit: 4915)
      9. CGroup: /system.slice/bloonix-server.service
      10. └─722 /usr/bin/perl /usr/bin/bloonix-server --pid-file /var/run/bloonix/bloonix-server.pid --config-file /etc/bloonix/server/main.conf
      11. Oct 26 10:13:41 BLOONIXDOMAIN systemd[1]: Starting Bloonix Server...
      12. Oct 26 10:13:43 BLOONIXDOMAIN systemd[1]: Started Bloonix Server.
      Alles anzeigen


      und

      Quellcode

      1. # service bloonix-webgui status
      2. ● bloonix-webgui.service - Bloonix WebGUI
      3. Loaded: loaded (/lib/systemd/system/bloonix-webgui.service; enabled; vendor preset: enabled)
      4. Active: active (running) since Thu 2017-10-26 10:13:42 CEST; 26min ago
      5. Process: 483 ExecStart=/srv/bloonix/webgui/scripts/bloonix-webgui --pid-file /var/run/bloonix/bloonix-webgui.pid --config-file /etc/bloonix/webgui/main.conf (code=exited, status=0/SUCCESS)
      6. Process: 400 ExecStartPre=/usr/lib/bloonix/bin/bloonix-pre-start /var/lib/bloonix /var/lib/bloonix/ipc /var/lib/bloonix/webgui /var/log/bloonix /var/run/bloonix (code=exited, status=0/SUCCESS)
      7. Main PID: 677 (bloonix-webgui)
      8. Tasks: 1 (limit: 4915)
      9. CGroup: /system.slice/bloonix-webgui.service
      10. └─677 /usr/bin/perl /srv/bloonix/webgui/scripts/bloonix-webgui --pid-file /var/run/bloonix/bloonix-webgui.pid --config-file /etc/bloonix/webgui/main.conf
      11. Oct 26 10:13:41 BLOONIXDOMAIN systemd[1]: Starting Bloonix WebGUI...
      12. Oct 26 10:13:42 BLOONIXDOMAIN systemd[1]: Started Bloonix WebGUI.
      Alles anzeigen


      Die Dienste laufen ja irgendwie — aber keine offenen Ports.
    • /etc/bloonix/webgui/main.conf

      Quellcode

      1. heaven {
      2. base /srv/bloonix/webgui/lib
      3. model Database, REST
      4. view Template, JSON
      5. }
      6. system {
      7. user bloonix
      8. group bloonix
      9. timezone Europe/Berlin
      10. }
      11. proc_manager {
      12. max_servers 10
      13. min_spare_servers 5
      14. max_spare_servers 8
      15. }
      16. fcgi_server {
      17. port 9000
      18. }
      19. server_status {
      20. enabled yes
      21. allow_from 127.0.0.1
      22. }
      23. webapp {
      24. sid_expire_time 3600
      25. sid_refresh_time 300
      26. chart_library other
      27. html_path /srv/bloonix/webgui/templates/html
      28. check_frequency low
      29. allow_simple_usernames no
      30. enable_user_tracking no
      31. }
      32. email {
      33. sendmail /usr/sbin/sendmail -t -oi -oem
      34. from root@localhost
      35. to root@localhost
      36. subject [BLOONIX-WEBGUI] %s
      37. flags success-login, failed-login, password-request
      38. }
      39. database {
      40. include /etc/bloonix/database/main.conf
      41. logger {
      42. file {
      43. filename /var/log/bloonix/bloonix-webgui-database.log
      44. filelock 0
      45. maxlevel info
      46. minlevel emerg
      47. message_layout [%T] %L %P %t %X %Y %m (%C)
      48. }
      49. }
      50. }
      51. elasticsearch {
      52. proto http
      53. host 127.0.0.1:9200, 127.0.0.2:9200
      54. timeout 60
      55. mode balanced
      56. }
      57. template {
      58. path /srv/bloonix/webgui/templates
      59. }
      60. logger {
      61. file {
      62. filename /var/log/bloonix/bloonix-webgui.log
      63. filelock 0
      64. maxlevel info
      65. minlevel emerg
      66. timeformat %b %d %Y %H:%M:%S
      67. message_layout [%T] %L %P %t %X %Y %m (%C)
      68. }
      69. }
      Alles anzeigen


      Im Log steht ziemlich oft das hier

      Quellcode

      1. [Oct 26 2017 09:33:35] INFO 676 0.000263 n/a n/a rest: request 'http://127.0.0.2:9200/ (/usr/share/perl5/Bloonix/REST.pm, line 225)
      2. [Oct 26 2017 09:33:35] ERROR 676 0.000281 n/a n/a rest: request failed to 'http://127.0.0.2:9200/': [599 Internal Exception], message: [Could not connect to '127.0.0.2:9200': Connection refused
      3. ] (/usr/share/perl5/Bloonix/REST.pm, line 319)
      4. CALL(13): package(main) filename(/srv/bloonix/webgui/scripts/bloonix-webgui) line(11) subroutine(Bloonix::Heaven::run) hasargs(1)
      5. CALL(12): package(Bloonix::Heaven) filename(/usr/share/perl5/Bloonix/Heaven.pm) line(40) subroutine(Bloonix::Heaven::__init) hasargs(1)
      6. CALL(11): package(Bloonix::Heaven) filename(/usr/share/perl5/Bloonix/Heaven.pm) line(107) subroutine((eval)) hasargs(0)
      7. CALL(10): package(Bloonix::Heaven) filename(/usr/share/perl5/Bloonix/Heaven.pm) line(115) subroutine(Bloonix::Heaven::__load_model) hasargs(1)
      8. CALL(9): package(Bloonix::Heaven) filename(/usr/share/perl5/Bloonix/Heaven.pm) line(326) subroutine(Bloonix::Heaven::Model::load) hasargs(1)
      9. CALL(8): package(Bloonix::Heaven::Model) filename(/usr/share/perl5/Bloonix/Heaven/Model.pm) line(56) subroutine(Bloonix::Model::REST::new) hasargs(1) wantarray()
      10. CALL(7): package(Bloonix::Model::REST) filename(/srv/bloonix/webgui/lib/Bloonix/Model/REST.pm) line(23) subroutine((eval)) hasargs(0)
      11. CALL(6): package(Bloonix::Model::REST) filename(/srv/bloonix/webgui/lib/Bloonix/Model/REST.pm) line(24) subroutine(Bloonix::REST::get) hasargs(1) wantarray()
      12. CALL(5): package(Bloonix::REST) filename(/usr/share/perl5/Bloonix/REST.pm) line(182) subroutine(Bloonix::REST::request) hasargs(1) wantarray()
      13. CALL(4): package(Bloonix::REST) filename(/usr/share/perl5/Bloonix/REST.pm) line(251) subroutine(Bloonix::REST::errstr) hasargs(1)
      14. CALL(3): package(Bloonix::REST) filename(/usr/share/perl5/Bloonix/REST.pm) line(319) subroutine(Log::Handler::Levels::trace) hasargs(1)
      15. CALL(2): package(Log::Handler::Levels) filename(/usr/share/perl5/Log/Handler/Levels.pm) line(271) subroutine(Log::Handler::Levels::__ANON__) hasargs(1)
      16. CALL(1): package(Log::Handler::Levels) filename(/usr/share/perl5/Log/Handler/Levels.pm) line(227) subroutine(Log::Handler::Output::log) hasargs(1) wantarray()
      17. CALL(0): package(Log::Handler::Output) filename(/usr/share/perl5/Log/Handler/Output.pm) line(87) subroutine(Log::Handler::Output::_add_trace) hasargs(1)
      Alles anzeigen
    • # systemctl status elasticsearch

      Quellcode

      1. ● elasticsearch.service - Elasticsearch
      2. Loaded: loaded (/usr/lib/systemd/system/elasticsearch.service; disabled; vendor preset: enabled)
      3. Active: active (running) since Thu 2017-10-26 22:05:03 CEST; 26min ago
      4. Docs: http://www.elastic.co
      5. Process: 23163 ExecStartPre=/usr/share/elasticsearch/bin/elasticsearch-systemd-pre-exec (code=exited, status=0/SUCCESS)
      6. Main PID: 23166 (java)
      7. Tasks: 40 (limit: 4915)
      8. CGroup: /system.slice/elasticsearch.service
      9. └─23166 /usr/bin/java -Xms256m -Xmx1g -Djava.awt.headless=true -XX:+UseParNewGC -XX:+UseConcMarkSweepGC -XX:CMSInitiatingOccupancyFraction=75 -XX:+UseCMSInitiatingOccupancyOnly -XX:+HeapDumpOnOutOf
      10. Oct 26 22:05:18 BLOONIXDOMAIN elasticsearch[23166]: at org.elasticsearch.action.search.AbstractSearchAsyncAction$1.onFailure(AbstractSearchAsyncAction.java:152)
      11. Oct 26 22:05:18 BLOONIXDOMAIN elasticsearch[23166]: at org.elasticsearch.action.ActionListenerResponseHandler.handleException(ActionListenerResponseHandler.java:46)
      12. Oct 26 22:05:18 BLOONIXDOMAIN elasticsearch[23166]: at org.elasticsearch.transport.TransportService$DirectResponseChannel.processException(TransportService.java:874)
      13. Oct 26 22:05:18 BLOONIXDOMAIN elasticsearch[23166]: at org.elasticsearch.transport.TransportService$DirectResponseChannel.sendResponse(TransportService.java:852)
      14. Oct 26 22:05:18 BLOONIXDOMAIN elasticsearch[23166]: at org.elasticsearch.transport.TransportService$4.onFailure(TransportService.java:389)
      15. Oct 26 22:05:18 BLOONIXDOMAIN elasticsearch[23166]: at org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:39)
      16. Oct 26 22:05:18 BLOONIXDOMAIN elasticsearch[23166]: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
      17. Oct 26 22:05:18 BLOONIXDOMAIN elasticsearch[23166]: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
      18. Oct 26 22:05:18 BLOONIXDOMAIN elasticsearch[23166]: at java.lang.Thread.run(Thread.java:748)
      19. Oct 26 22:05:26 BLOONIXDOMAIN elasticsearch[23166]: [2017-10-26 22:05:26,238][INFO ][cluster.routing.allocation] [Black Dragon] Cluster health status changed from [RED] to [YELLOW] (reason: [shards st
      20. lines 1-20/20 (END)
      Alles anzeigen