I installed an SSL certificate after the installation and now I get the following message:
{"error": "Unable to process GET request to elasticsearch URL 'http: // localhost: 9200 / zammad_production_ticket / _doc / _search'. Elasticsearch is not reachable, probably because it's not running or even
I’ve already tried connecting to my live domain: zammad run rails r "Setting.set ('es_url', 'https: //my.sub.domain:12312')"
My zammad.conf looks like this:
# Added - Automatically redirect HTTP to HTTPS Nginx
server {
listen 12311;
server_name my.sub.domain;
return 301 https://$host:12312$request_uri;
}
# Added - HTTPS configuration for Zammad
server {
listen 12312 http2 ssl;
# replace 'localhost' with your fqdn if you want to use zammad from remote
server_name my.sub.domain;
# security - prevent information disclosure about server version
server_tokens off;
root /opt/zammad/public;
ssl_certificate /etc/letsencrypt/live/my.sub.domain/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/my.sub.domain/privkey.pem;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_prefer_server_ciphers on;
ssl_ciphers "EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH";
ssl_ecdh_curve secp384r1;
ssl_session_cache shared:SSL:10m;
ssl_session_tickets off;
ssl_stapling on;
ssl_stapling_verify on;
resolver 8.8.8.8 8.8.4.4 valid=300s;
resolver_timeout 5s;
add_header Strict-Transport-Security "max-age=63072000; includeSubdomains";
add_header X-Frame-Options DENY;
add_header X-Content-Type-Options nosniff;
Unable to process GET request to elasticsearch URL 'https://my.sub.domain:9200'. Elasticsearch is not reachable, probably because it's not running or even installed.
I haven’t set anything with Elasticsearch or nynsx.
Do I need port forwarding in the router?
Geez you’re really advertising your installation script agressively.
The issue seems to be that @Phillip updates the elasticsearch URL alongside his FQDN for Zammad.
If your Elasticsearch installation is a local one and you didn’t change anything in that regard (let’s ignore the change from http to https for your Zammad installation), the correct Elasticsearch URL will be: http://localhost:9200
You’ll need to reindex your searchindex as you proberbly have lost too much time for Zammad to rerun those failing indexes.
Ensure ES is running and that you fullfilled all required steps.
If you updated Elasticsearch without Zammad, ensure to install the new ingest-plugin.
This step is required with every ES update.
If all that does not help, provide your elasticsearch logfiles.
@MrGeneration it’s not advertising, but rather an advice.
I offered the script to the Zammad Community in order to assist fellow SysAdmins of all levels.
If suggesting people a tool that could make their life a bit easier is not encouraged here, fear not. I will not “advertise” anything else
root@zammad:/etc/elasticsearch# rpm -qa | grep elasticsearch
root@zammad:/etc/elasticsearch# systemctl enable --now elasticsearch
Synchronizing state of elasticsearch.service with SysV service script with /lib/systemd/systemd-sysv-install.
Executing: /lib/systemd/systemd-sysv-install enable elasticsearch
Job for elasticsearch.service failed because a timeout was exceeded.
See "systemctl status elasticsearch.service" and "journalctl -xe" for details.
root@zammad:/etc/elasticsearch# systemctl status elasticsearch.service
● elasticsearch.service - Elasticsearch
Loaded: loaded (/lib/systemd/system/elasticsearch.service; enabled; vendor preset: enabled)
Active: failed (Result: timeout) since Thu 2020-11-19 13:18:41 UTC; 15min ago
Docs: https://www.elastic.co
Main PID: 8483 (code=exited, status=143)
@rsysadmin it’s okay, I just noticed that you also tell about these scripts if the system is already installed. That’s all
@Phillip to me your solution sounds like a workaround for other issues.
I don’t know anything about the specs of your system, but if your elasticsearch already takes ages to startup, you’ll likely run into performance issues sooner or later.
After letting Certbot change my Apache configuration I thought that may have messed up the http connection to Elasticsearch.
This helped to think about the RAM:
After rescaling the Server to 4 GB RAM it worked to start and connect Elasticsearch.
@MrGeneration
It may sound stupid, but maybe you could add a warning to the documentation (Set up Elasticsearch — Zammad System Documentation documentation) that Elasticsearch really needs 4 GB RAM to even start. Cause the error messages don’t mention the RAM problem. And people who just want to set up a test machine may try it with the smallest/cheapest virtual server.
ES can run fine with less ram. I’m currently (stably) running ES on it’s own dedicated VPS (t2.micro) with 1 gig of ram. Just need to tweak the settings.
Thats exactly the same problem I had when I first tried to start Elasticsearch on a server with 2 GB RAM. Scaling the Server up to 4 GB RAM solved the problem.