mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2026-04-29 05:30:53 +00:00
fix(zammad): configure Elasticsearch for LXC container startup
- Set discovery.type: single-node (required for single-node ES) - Set xpack.security.enabled: false (not needed in local LXC) - Set bootstrap.memory_lock: false (fails in unprivileged LXC) - Add startup wait loop (up to 60s) to ensure ES is ready before Zammad installation continues Fixes #12301-related recurring Elasticsearch startup failures
This commit is contained in:
@@ -30,10 +30,21 @@ setup_deb822_repo \
|
|||||||
$STD apt install -y elasticsearch
|
$STD apt install -y elasticsearch
|
||||||
sed -i 's/^-Xms.*/-Xms2g/' /etc/elasticsearch/jvm.options
|
sed -i 's/^-Xms.*/-Xms2g/' /etc/elasticsearch/jvm.options
|
||||||
sed -i 's/^-Xmx.*/-Xmx2g/' /etc/elasticsearch/jvm.options
|
sed -i 's/^-Xmx.*/-Xmx2g/' /etc/elasticsearch/jvm.options
|
||||||
|
cat <<EOF >>/etc/elasticsearch/elasticsearch.yml
|
||||||
|
discovery.type: single-node
|
||||||
|
xpack.security.enabled: false
|
||||||
|
bootstrap.memory_lock: false
|
||||||
|
EOF
|
||||||
$STD /usr/share/elasticsearch/bin/elasticsearch-plugin install ingest-attachment -b
|
$STD /usr/share/elasticsearch/bin/elasticsearch-plugin install ingest-attachment -b
|
||||||
systemctl daemon-reload
|
systemctl daemon-reload
|
||||||
systemctl enable -q elasticsearch
|
systemctl enable -q elasticsearch
|
||||||
systemctl restart -q elasticsearch
|
systemctl restart -q elasticsearch
|
||||||
|
for i in $(seq 1 30); do
|
||||||
|
if curl -s http://localhost:9200 >/dev/null 2>&1; then
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
sleep 2
|
||||||
|
done
|
||||||
msg_ok "Setup Elasticsearch"
|
msg_ok "Setup Elasticsearch"
|
||||||
|
|
||||||
msg_info "Installing Zammad"
|
msg_info "Installing Zammad"
|
||||||
|
|||||||
Reference in New Issue
Block a user