Compare commits

...

1 Commits

Author SHA1 Message Date
MickLesk
681d4f6255 Bind Elasticsearch to 127.0.0.1 in Zammad install
Explicitly bind Elasticsearch to 127.0.0.1 instead of relying on localhost resolution. Updates elasticsearch.yml, health check curl, and Zammad ES URL setting to use 127.0.0.1 for consistency and to avoid potential IPv6 resolution issues.
2026-07-20 08:53:51 +02:00

View File

@@ -32,6 +32,7 @@ sed -i 's/^#\{0,2\} *-Xms[0-9]*g.*/-Xms2g/' /etc/elasticsearch/jvm.options
sed -i 's/^#\{0,2\} *-Xmx[0-9]*g.*/-Xmx2g/' /etc/elasticsearch/jvm.options
cat <<EOF >/etc/elasticsearch/elasticsearch.yml
discovery.type: single-node
network.host: 127.0.0.1
xpack.security.enabled: false
bootstrap.memory_lock: false
EOF
@@ -40,7 +41,7 @@ systemctl daemon-reload
systemctl enable -q elasticsearch
systemctl restart -q elasticsearch
for i in $(seq 1 30); do
if curl -s http://localhost:9200 >/dev/null 2>&1; then
if curl -s http://127.0.0.1:9200 >/dev/null 2>&1; then
break
fi
sleep 2
@@ -55,7 +56,7 @@ setup_deb822_repo \
"$(get_os_info version_id)" \
"main"
$STD apt install -y zammad
$STD zammad run rails r "Setting.set('es_url', 'http://localhost:9200')"
$STD zammad run rails r "Setting.set('es_url', 'http://127.0.0.1:9200')"
$STD zammad run rake zammad:searchindex:rebuild
msg_ok "Installed Zammad"