Linode服务器中的CentOS 7的弹性搜索7.14
我已经在此article
The elasticsearch.yml file is below.我认为问题在于配置中。我想与Magento 2.4.3一起使用弹性搜索,而Magento 2.4.3的推荐使用的Versioun是Elasticsearch 7.10 我的服务器是Linode,带有CentOS 7和4核CPU和8GB RAM。我还使用XMS和XMX更改了 /jvm.ctl -xe的XMS和XMX,
# ---------------------------------- Cluster -----------------------------------
#
# Use a descriptive name for your cluster:
#
# cluster.name: myCluster
#
# ------------------------------------ Node ------------------------------------
#
# Use a descriptive name for the node:
#
# node.name: My First Node
#
# Add custom attributes to the node:
#
#node.attr.rack: r1
#node.data : true
#node.roles: [ master ]
#
# ----------------------------------- Paths ------------------------------------
#
# Path to directory where to store the data (separate multiple locations by comma):
#
path.data: /var/lib/elasticsearch
#
# Path to log files:
#
path.logs: /var/log/elasticsearch
#
# ----------------------------------- Memory -----------------------------------
#
# Lock the memory on startup:
#
#bootstrap.memory_lock: true
bootstrap.system_call_filter: false
#
# Make sure that the heap size is set to about half the memory available
# on the system and that the owner of the process is allowed to use this
# limit.
#
# Elasticsearch performs poorly when the system is swapping the memory.
#
# ---------------------------------- Network -----------------------------------
#
# By default Elasticsearch is only accessible on localhost. Set a different
# address here to expose this node on the network:
#
network.host: localhost
#
# By default Elasticsearch listens for HTTP traffic on the first free port it
# finds starting at 9200. Set a specific HTTP port here:
#
http.port: 9200
#
# For more information, consult the network module documentation.
#
# --------------------------------- Discovery ----------------------------------
#
# Pass an initial list of hosts to perform discovery when this node is started:
# The default list of hosts is ["127.0.0.1", "[::1]"]
#
#discovery.seed_hosts: ["host1", "host2"]
discover.seed_hosts: []
#
# Bootstrap the cluster using an initial set of master-eligible nodes:
#
#cluster.initial_master_nodes: ["node-1", "node-2"]
#cluster.initial_master_nodes : []
#
# For more information, consult the discovery and cluster formation module documentation.
#
# ---------------------------------- Various -----------------------------------
#
# Require explicit names when deleting indices:
#
#action.destructive_requires_name: true
But I'm unable to start my service it says
elasticsearch.service - Elasticsearch
Loaded: loaded (/usr/lib/systemd/system/elasticsearch.service; enabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Thu 2022-06-02 21:58:16 IST; 6s ago
Docs: https://www.elastic.co
Process: 20876 ExecStart=/usr/share/elasticsearch/bin/systemd-entrypoint -p ${PID_DIR}/elasticsearch.pid --quiet (code=exited, status=1/FAILURE)
Main PID: 20876 (code=exited, status=1/FAILURE)
并与journalctl -xe进行了调试,说
-- Unit user-1001.slice has finished shutting down.
Jun 02 21:59:01 li2147-225.members.linode.com dovecot[13248]: lmtp(21106): Connect from local
Jun 02 21:59:01 li2147-225.members.linode.com dovecot[13248]: lmtp(21106): Disconnect from local: Logged out (state=GREETING)
Jun 02 21:59:01 li2147-225.members.linode.com dovecot[13248]: imap-login: Login: user=<__cpanel__service__auth__imap__q6pfahcr7hjsl
Jun 02 21:59:01 li2147-225.members.linode.com dovecot[13248]: imap(__cpanel__service__auth__imap__q6pfahcr7hjslimd)<21120><uNTkgHng
Jun 02 21:59:01 li2147-225.members.linode.com pure-ftpd[21128]: ([email protected]) [INFO] New connection from 127.0.0.1
Jun 02 21:59:01 li2147-225.members.linode.com pure-ftpd[21128]: ([email protected]) [INFO] __cpanel__service__auth__ftpd__tUDT5E9wzfQWUKh
Jun 02 21:59:01 li2147-225.members.linode.com pure-ftpd[21128]: ([email protected]) [INFO]
Jun 02 21:59:11 li2147-225.members.linode.com sshd[21168]: Invalid user mama from 165.232.141.0 port 60618
Jun 02 21:59:11 li2147-225.members.linode.com sshd[21168]: input_userauth_request: invalid user mama [preauth]
Jun 02 21:59:12 li2147-225.members.linode.com sshd[21168]: Received disconnect from 165.232.141.0 port 60618:11: Bye Bye [preauth]
Jun 02 21:59:12 li2147-225.members.linode.com sshd[21168]: Disconnected from 165.232.141.0 port 60618 [preauth]
如果您想检查日志,那么最后几行就像
java.lang.NoClassDefFoundError: Could not initialize class com.sun.jna.Native
at org.elasticsearch.systemd.Libsystemd.lambda$static$0(Libsystemd.java:23) ~[?:?]
at java.security.AccessController.doPrivileged(AccessController.java:312) ~[?:?]
at org.elasticsearch.systemd.Libsystemd.<clinit>(Libsystemd.java:22) ~[?:?]
at org.elasticsearch.systemd.SystemdPlugin.sd_notify(SystemdPlugin.java:115) ~[?:?]
at org.elasticsearch.systemd.SystemdPlugin.onNodeStarted(SystemdPlugin.java:126) ~[?:?]
at java.util.ArrayList.forEach(ArrayList.java:1511) ~[?:?]
at org.elasticsearch.node.Node.start(Node.java:971) ~[elasticsearch-7.14.1.jar:7.14.1]
at org.elasticsearch.bootstrap.Bootstrap.start(Bootstrap.java:313) ~[elasticsearch-7.14.1.jar:7.14.1]
at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:408) ~[elasticsearch-7.14.1.jar:7.14.1]
at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:159) ~[elasticsearch-7.14.1.jar:7.14.1]
at org.elasticsearch.bootstrap.Elasticsearch.execute(Elasticsearch.java:150) ~[elasticsearch-7.14.1.jar:7.14.1]
at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:75) ~[elasticsearch-7.14.1.jar:7.14.1]
at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:116) ~[elasticsearch-cli-7.14.1.jar:7.14.1]
at org.elasticsearch.cli.Command.main(Command.java:79) ~[elasticsearch-cli-7.14.1.jar:7.14.1]
at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:115) ~[elasticsearch-7.14.1.jar:7.14.1]
at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:81) ~[elasticsearch-7.14.1.jar:7.14.1]
请给出一些建议,如何解决此问题。 。
谢谢。
I have installed Elastic search7.14 with the help of this article
The elasticsearch.yml file is below. What I believe the problem is in the configuration. I want to use elastic search with magento 2.4.3 and the recomended versioun for magento 2.4.3 is Elasticsearch 7.10
My server is linode with centos 7 and 4core cpu and 8gb of ram. I have also changed the /jvm.options with Xms and Xmx with 1024mb
# ---------------------------------- Cluster -----------------------------------
#
# Use a descriptive name for your cluster:
#
# cluster.name: myCluster
#
# ------------------------------------ Node ------------------------------------
#
# Use a descriptive name for the node:
#
# node.name: My First Node
#
# Add custom attributes to the node:
#
#node.attr.rack: r1
#node.data : true
#node.roles: [ master ]
#
# ----------------------------------- Paths ------------------------------------
#
# Path to directory where to store the data (separate multiple locations by comma):
#
path.data: /var/lib/elasticsearch
#
# Path to log files:
#
path.logs: /var/log/elasticsearch
#
# ----------------------------------- Memory -----------------------------------
#
# Lock the memory on startup:
#
#bootstrap.memory_lock: true
bootstrap.system_call_filter: false
#
# Make sure that the heap size is set to about half the memory available
# on the system and that the owner of the process is allowed to use this
# limit.
#
# Elasticsearch performs poorly when the system is swapping the memory.
#
# ---------------------------------- Network -----------------------------------
#
# By default Elasticsearch is only accessible on localhost. Set a different
# address here to expose this node on the network:
#
network.host: localhost
#
# By default Elasticsearch listens for HTTP traffic on the first free port it
# finds starting at 9200. Set a specific HTTP port here:
#
http.port: 9200
#
# For more information, consult the network module documentation.
#
# --------------------------------- Discovery ----------------------------------
#
# Pass an initial list of hosts to perform discovery when this node is started:
# The default list of hosts is ["127.0.0.1", "[::1]"]
#
#discovery.seed_hosts: ["host1", "host2"]
discover.seed_hosts: []
#
# Bootstrap the cluster using an initial set of master-eligible nodes:
#
#cluster.initial_master_nodes: ["node-1", "node-2"]
#cluster.initial_master_nodes : []
#
# For more information, consult the discovery and cluster formation module documentation.
#
# ---------------------------------- Various -----------------------------------
#
# Require explicit names when deleting indices:
#
#action.destructive_requires_name: true
But I'm unable to start my service it says
elasticsearch.service - Elasticsearch
Loaded: loaded (/usr/lib/systemd/system/elasticsearch.service; enabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Thu 2022-06-02 21:58:16 IST; 6s ago
Docs: https://www.elastic.co
Process: 20876 ExecStart=/usr/share/elasticsearch/bin/systemd-entrypoint -p ${PID_DIR}/elasticsearch.pid --quiet (code=exited, status=1/FAILURE)
Main PID: 20876 (code=exited, status=1/FAILURE)
Further debugging with journalctl -xe says
-- Unit user-1001.slice has finished shutting down.
Jun 02 21:59:01 li2147-225.members.linode.com dovecot[13248]: lmtp(21106): Connect from local
Jun 02 21:59:01 li2147-225.members.linode.com dovecot[13248]: lmtp(21106): Disconnect from local: Logged out (state=GREETING)
Jun 02 21:59:01 li2147-225.members.linode.com dovecot[13248]: imap-login: Login: user=<__cpanel__service__auth__imap__q6pfahcr7hjsl
Jun 02 21:59:01 li2147-225.members.linode.com dovecot[13248]: imap(__cpanel__service__auth__imap__q6pfahcr7hjslimd)<21120><uNTkgHng
Jun 02 21:59:01 li2147-225.members.linode.com pure-ftpd[21128]: ([email protected]) [INFO] New connection from 127.0.0.1
Jun 02 21:59:01 li2147-225.members.linode.com pure-ftpd[21128]: ([email protected]) [INFO] __cpanel__service__auth__ftpd__tUDT5E9wzfQWUKh
Jun 02 21:59:01 li2147-225.members.linode.com pure-ftpd[21128]: ([email protected]) [INFO]
Jun 02 21:59:11 li2147-225.members.linode.com sshd[21168]: Invalid user mama from 165.232.141.0 port 60618
Jun 02 21:59:11 li2147-225.members.linode.com sshd[21168]: input_userauth_request: invalid user mama [preauth]
Jun 02 21:59:12 li2147-225.members.linode.com sshd[21168]: Received disconnect from 165.232.141.0 port 60618:11: Bye Bye [preauth]
Jun 02 21:59:12 li2147-225.members.linode.com sshd[21168]: Disconnected from 165.232.141.0 port 60618 [preauth]
If you want to check the logs then, the last a few lines of this is like
java.lang.NoClassDefFoundError: Could not initialize class com.sun.jna.Native
at org.elasticsearch.systemd.Libsystemd.lambda$static$0(Libsystemd.java:23) ~[?:?]
at java.security.AccessController.doPrivileged(AccessController.java:312) ~[?:?]
at org.elasticsearch.systemd.Libsystemd.<clinit>(Libsystemd.java:22) ~[?:?]
at org.elasticsearch.systemd.SystemdPlugin.sd_notify(SystemdPlugin.java:115) ~[?:?]
at org.elasticsearch.systemd.SystemdPlugin.onNodeStarted(SystemdPlugin.java:126) ~[?:?]
at java.util.ArrayList.forEach(ArrayList.java:1511) ~[?:?]
at org.elasticsearch.node.Node.start(Node.java:971) ~[elasticsearch-7.14.1.jar:7.14.1]
at org.elasticsearch.bootstrap.Bootstrap.start(Bootstrap.java:313) ~[elasticsearch-7.14.1.jar:7.14.1]
at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:408) ~[elasticsearch-7.14.1.jar:7.14.1]
at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:159) ~[elasticsearch-7.14.1.jar:7.14.1]
at org.elasticsearch.bootstrap.Elasticsearch.execute(Elasticsearch.java:150) ~[elasticsearch-7.14.1.jar:7.14.1]
at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:75) ~[elasticsearch-7.14.1.jar:7.14.1]
at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:116) ~[elasticsearch-cli-7.14.1.jar:7.14.1]
at org.elasticsearch.cli.Command.main(Command.java:79) ~[elasticsearch-cli-7.14.1.jar:7.14.1]
at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:115) ~[elasticsearch-7.14.1.jar:7.14.1]
at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:81) ~[elasticsearch-7.14.1.jar:7.14.1]
Please give some advice, on how to fix this.
Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论