有一个Laravel项目在我的本地服务器上运行在Windows 11中的Laradock。运行PHP 7.4。它工作正常。我将Laradock和项目升级到最新版本,并将PHP版本更改为8.2。并使用以下命令再次构建Laradock:
docker-compose up -d --build nginx postgres php-worker redis elasticsearch kibana
完成构建后,elasticsearch服务器存在,并出现以下错误:
2023-08-07 18:13:37 {"@timestamp":"2023-08-07T12:43:37.290Z", "log.level": "INFO", "message":"loaded module [x-pack-eql]", "ecs.version": "1.2.0","service.name":"ES_ECS","event.dataset":"elasticsearch.server","process.thread.name":"main","log.logger":"org.elasticsearch.plugins.PluginsService","elasticsearch.node.name":"laradock-node","elasticsearch.cluster.name":"laradock-cluster"}
2023-08-07 18:13:37 {"@timestamp":"2023-08-07T12:43:37.290Z", "log.level": "INFO", "message":"loaded module [x-pack-fleet]", "ecs.version": "1.2.0","service.name":"ES_ECS","event.dataset":"elasticsearch.server","process.thread.name":"main","log.logger":"org.elasticsearch.plugins.PluginsService","elasticsearch.node.name":"laradock-node","elasticsearch.cluster.name":"laradock-cluster"}
2023-08-07 18:13:37 {"@timestamp":"2023-08-07T12:43:37.291Z", "log.level": "INFO", "message":"loaded module [x-pack-graph]", "ecs.version": "1.2.0","service.name":"ES_ECS","event.dataset":"elasticsearch.server","process.thread.name":"main","log.logger":"org.elasticsearch.plugins.PluginsService","elasticsearch.node.name":"laradock-node","elasticsearch.cluster.name":"laradock-cluster"}
2023-08-07 18:13:37 {"@timestamp":"2023-08-07T12:43:37.292Z", "log.level": "INFO", "message":"loaded module [x-pack-identity-provider]", "ecs.version": "1.2.0","service.name":"ES_ECS","event.dataset":"elasticsearch.server","process.thread.name":"main","log.logger":"org.elasticsearch.plugins.PluginsService","elasticsearch.node.name":"laradock-node","elasticsearch.cluster.name":"laradock-cluster"}
2023-08-07 18:13:37 {"@timestamp":"2023-08-07T12:43:37.292Z", "log.level": "INFO", "message":"loaded module [x-pack-ilm]", "ecs.version": "1.2.0","service.name":"ES_ECS","event.dataset":"elasticsearch.server","process.thread.name":"main","log.logger":"org.elasticsearch.plugins.PluginsService","elasticsearch.node.name":"laradock-node","elasticsearch.cluster.name":"laradock-cluster"}
2023-08-07 18:13:37 {"@timestamp":"2023-08-07T12:43:37.293Z", "log.level": "INFO", "message":"loaded module [x-pack-logstash]", "ecs.version": "1.2.0","service.name":"ES_ECS","event.dataset":"elasticsearch.server","process.thread.name":"main","log.logger":"org.elasticsearch.plugins.PluginsService","elasticsearch.node.name":"laradock-node","elasticsearch.cluster.name":"laradock-cluster"}
2023-08-07 18:13:37 {"@timestamp":"2023-08-07T12:43:37.294Z", "log.level": "INFO", "message":"loaded module [x-pack-ml]", "ecs.version": "1.2.0","service.name":"ES_ECS","event.dataset":"elasticsearch.server","process.thread.name":"main","log.logger":"org.elasticsearch.plugins.PluginsService","elasticsearch.node.name":"laradock-node","elasticsearch.cluster.name":"laradock-cluster"}
2023-08-07 18:13:37 {"@timestamp":"2023-08-07T12:43:37.297Z", "log.level": "INFO", "message":"loaded module [x-pack-monitoring]", "ecs.version": "1.2.0","service.name":"ES_ECS","event.dataset":"elasticsearch.server","process.thread.name":"main","log.logger":"org.elasticsearch.plugins.PluginsService","elasticsearch.node.name":"laradock-node","elasticsearch.cluster.name":"laradock-cluster"}
2023-08-07 18:13:37 {"@timestamp":"2023-08-07T12:43:37.297Z", "log.level": "INFO", "message":"loaded module [x-pack-ql]", "ecs.version": "1.2.0","service.name":"ES_ECS","event.dataset":"elasticsearch.server","process.thread.name":"main","log.logger":"org.elasticsearch.plugins.PluginsService","elasticsearch.node.name":"laradock-node","elasticsearch.cluster.name":"laradock-cluster"}
2023-08-07 18:13:37 {"@timestamp":"2023-08-07T12:43:37.297Z", "log.level": "INFO", "message":"loaded module [x-pack-rollup]", "ecs.version": "1.2.0","service.name":"ES_ECS","event.dataset":"elasticsearch.server","process.thread.name":"main","log.logger":"org.elasticsearch.plugins.PluginsService","elasticsearch.node.name":"laradock-node","elasticsearch.cluster.name":"laradock-cluster"}
2023-08-07 18:13:37 {"@timestamp":"2023-08-07T12:43:37.298Z", "log.level": "INFO", "message":"loaded module [x-pack-security]", "ecs.version": "1.2.0","service.name":"ES_ECS","event.dataset":"elasticsearch.server","process.thread.name":"main","log.logger":"org.elasticsearch.plugins.PluginsService","elasticsearch.node.name":"laradock-node","elasticsearch.cluster.name":"laradock-cluster"}
2023-08-07 18:13:37 {"@timestamp":"2023-08-07T12:43:37.298Z", "log.level": "INFO", "message":"loaded module [x-pack-shutdown]", "ecs.version": "1.2.0","service.name":"ES_ECS","event.dataset":"elasticsearch.server","process.thread.name":"main","log.logger":"org.elasticsearch.plugins.PluginsService","elasticsearch.node.name":"laradock-node","elasticsearch.cluster.name":"laradock-cluster"}
2023-08-07 18:13:37 {"@timestamp":"2023-08-07T12:43:37.298Z", "log.level": "INFO", "message":"loaded module [x-pack-sql]", "ecs.version": "1.2.0","service.name":"ES_ECS","event.dataset":"elasticsearch.server","process.thread.name":"main","log.logger":"org.elasticsearch.plugins.PluginsService","elasticsearch.node.name":"laradock-node","elasticsearch.cluster.name":"laradock-cluster"}
2023-08-07 18:13:37 {"@timestamp":"2023-08-07T12:43:37.298Z", "log.level": "INFO", "message":"loaded module [x-pack-stack]", "ecs.version": "1.2.0","service.name":"ES_ECS","event.dataset":"elasticsearch.server","process.thread.name":"main","log.logger":"org.elasticsearch.plugins.PluginsService","elasticsearch.node.name":"laradock-node","elasticsearch.cluster.name":"laradock-cluster"}
2023-08-07 18:13:37 {"@timestamp":"2023-08-07T12:43:37.299Z", "log.level": "INFO", "message":"loaded module [x-pack-text-structure]", "ecs.version": "1.2.0","service.name":"ES_ECS","event.dataset":"elasticsearch.server","process.thread.name":"main","log.logger":"org.elasticsearch.plugins.PluginsService","elasticsearch.node.name":"laradock-node","elasticsearch.cluster.name":"laradock-cluster"}
2023-08-07 18:13:37 {"@timestamp":"2023-08-07T12:43:37.299Z", "log.level": "INFO", "message":"loaded module [x-pack-voting-only-node]", "ecs.version": "1.2.0","service.name":"ES_ECS","event.dataset":"elasticsearch.server","process.thread.name":"main","log.logger":"org.elasticsearch.plugins.PluginsService","elasticsearch.node.name":"laradock-node","elasticsearch.cluster.name":"laradock-cluster"}
2023-08-07 18:13:37 {"@timestamp":"2023-08-07T12:43:37.299Z", "log.level": "INFO", "message":"loaded module [x-pack-watcher]", "ecs.version": "1.2.0","service.name":"ES_ECS","event.dataset":"elasticsearch.server","process.thread.name":"main","log.logger":"org.elasticsearch.plugins.PluginsService","elasticsearch.node.name":"laradock-node","elasticsearch.cluster.name":"laradock-cluster"}
2023-08-07 18:13:37 {"@timestamp":"2023-08-07T12:43:37.300Z", "log.level": "INFO", "message":"no plugins loaded", "ecs.version": "1.2.0","service.name":"ES_ECS","event.dataset":"elasticsearch.server","process.thread.name":"main","log.logger":"org.elasticsearch.plugins.PluginsService","elasticsearch.node.name":"laradock-node","elasticsearch.cluster.name":"laradock-cluster"}
2023-08-07 18:13:39 {"@timestamp":"2023-08-07T12:43:39.598Z", "log.level": "INFO", "message":"using [1] data paths, mounts [[/usr/share/elasticsearch/data (/dev/sdc)]], net usable_space [185.9gb], net total_space [250.9gb], types [ext4]", "ecs.version": "1.2.0","service.name":"ES_ECS","event.dataset":"elasticsearch.server","process.thread.name":"main","log.logger":"org.elasticsearch.env.NodeEnvironment","elasticsearch.node.name":"laradock-node","elasticsearch.cluster.name":"laradock-cluster"}
2023-08-07 18:13:39 {"@timestamp":"2023-08-07T12:43:39.598Z", "log.level": "INFO", "message":"heap size [512mb], compressed ordinary object pointers [true]", "ecs.version": "1.2.0","service.name":"ES_ECS","event.dataset":"elasticsearch.server","process.thread.name":"main","log.logger":"org.elasticsearch.env.NodeEnvironment","elasticsearch.node.name":"laradock-node","elasticsearch.cluster.name":"laradock-cluster"}
2023-08-07 18:13:39 {"@timestamp":"2023-08-07T12:43:39.601Z", "log.level": "INFO", "message":"upgrading legacy data folders: [/usr/share/elasticsearch/data]", "ecs.version": "1.2.0","service.name":"ES_ECS","event.dataset":"elasticsearch.server","process.thread.name":"main","log.logger":"org.elasticsearch.env.NodeEnvironment","elasticsearch.node.name":"laradock-node","elasticsearch.cluster.name":"laradock-cluster"}
2023-08-07 18:13:39 {"@timestamp":"2023-08-07T12:43:39.653Z", "log.level":"ERROR", "message":"fatal exception while booting Elasticsearch", "ecs.version": "1.2.0","service.name":"ES_ECS","event.dataset":"elasticsearch.server","process.thread.name":"main","log.logger":"org.elasticsearch.bootstrap.Elasticsearch","elasticsearch.node.name":"laradock-node","elasticsearch.cluster.name":"laradock-cluster","error.type":"org.elasticsearch.bootstrap.StartupException","error.message":"java.lang.IllegalStateException: cannot upgrade a node from version [7.9.1] directly to version [8.3.1], upgrade to version [7.17.0] first.","error.stack_trace":"java.lang.IllegalStateException: cannot upgrade a node from version [7.9.1] directly to version [8.3.1], upgrade to version [7.17.0] first.\n\tat [email protected]/org.elasticsearch.env.NodeMetadata.verifyUpgradeToCurrentVersion(NodeMetadata.java:122)\n\tat [email protected]/org.elasticsearch.env.NodeEnvironment.checkForIndexCompatibility(NodeEnvironment.java:517)\n\tat [email protected]/org.elasticsearch.env.NodeEnvironment.upgradeLegacyNodeFolders(NodeEnvironment.java:408)\n\tat [email protected]/org.elasticsearch.env.NodeEnvironment.<init>(NodeEnvironment.java:301)\n\tat [email protected]/org.elasticsearch.node.Node.<init>(Node.java:438)\n\tat [email protected]/org.elasticsearch.node.Node.<init>(Node.java:300)\n\tat [email protected]/org.elasticsearch.bootstrap.Bootstrap$5.<init>(Bootstrap.java:230)\n\tat [email protected]/org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:230)\n\tat [email protected]/org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:333)\n\tat [email protected]/org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:224)\n\tat [email protected]/org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:67)\nFor complete error details, refer to the log at /usr/share/elasticsearch/logs/laradock-cluster.log\n"}
2023-08-07 18:13:39 java.lang.IllegalStateException: cannot upgrade a node from version [7.9.1] directly to version [8.3.1], upgrade to version [7.17.0] first.
2023-08-07 18:13:39 at [email protected]/org.elasticsearch.env.NodeMetadata.verifyUpgradeToCurrentVersion(NodeMetadata.java:122)
2023-08-07 18:13:39 at [email protected]/org.elasticsearch.env.NodeEnvironment.checkForIndexCompatibility(NodeEnvironment.java:517)
2023-08-07 18:13:39 at [email protected]/org.elasticsearch.env.NodeEnvironment.upgradeLegacyNodeFolders(NodeEnvironment.java:408)
2023-08-07 18:13:39 at [email protected]/org.elasticsearch.env.NodeEnvironment.<init>(NodeEnvironment.java:301)
2023-08-07 18:13:39 at [email protected]/org.elasticsearch.node.Node.<init>(Node.java:438)
2023-08-07 18:13:39 at [email protected]/org.elasticsearch.node.Node.<init>(Node.java:300)
2023-08-07 18:13:39 at [email protected]/org.elasticsearch.bootstrap.Bootstrap$5.<init>(Bootstrap.java:230)
2023-08-07 18:13:39 at [email protected]/org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:230)
2023-08-07 18:13:39 at [email protected]/org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:333)
2023-08-07 18:13:39 at [email protected]/org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:224)
2023-08-07 18:13:39 at [email protected]/org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:67)
2023-08-07 18:13:39 For complete error details, refer to the log at /usr/share/elasticsearch/logs/laradock-cluster.log
2023-08-07 18:13:39 ERROR: Elasticsearch did not exit normally - check the logs at /usr/share/elasticsearch/logs/laradock-cluster.log
2023-08-07 18:13:39
2023-08-07 18:13:39 ERROR: Elasticsearch exited unexpectedly
是否有任何线索可以解决这个问题并在Laradock中正确运行弹性服务器?
1条答案
按热度按时间hmmo2u0o1#
我再次更新了Laradock到它的最新版本。我看到docker-compose. yml中有一些变化。一些变化与NPM和Java有关。更新到最新版本后,上述问题得到解决。但是出现了内存问题:
为了解决这个问题,我通过运行以下命令来增加内存:
所以,它工作正常。但是每次重新启动电脑的时候我都得设置内存。这也有办法处理。我们需要在windows中添加具有以下配置的**.wslconfig文件到用户的主目录中。
您可以在以下位置创建配置文件(.wslconfig**):
文件内容
这就是我在当地环境中解决问题的方法。我想这对大家都有帮助。