当前位置: 首页 > news >正文

自适应产品网站模板百度极速版推广员怎么申请

自适应产品网站模板,百度极速版推广员怎么申请,网站后台会员管理,wordpress文章页宽度注:笔者是在centos云服务器环境下安装的Elasticsearch 目录 1.安装前准备 2.下载Elasticsearch 3.启动Elasticsearch 非常容易出问题 第一次运行时,可能出现如下错误: 一、内存不足原因启动失败 二、使用root用户启动问题 三、启动ES自…

注:笔者是在centos云服务器环境下安装的Elasticsearch

目录

1.安装前准备

2.下载Elasticsearch

 3.启动Elasticsearch 非常容易出问题

 第一次运行时,可能出现如下错误:

一、内存不足原因启动失败

二、使用root用户启动问题

三、启动ES自动被killed

四、max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]

五、the default discovery settings are unsuitable for production use; at least one of [discovery.seed_hosts, discovery.seed_providers, cluster.initial_master_nodes] must be configured

后续在使用中遇到问题也会持续更新……


1.安装前准备

至少需要jdk版本8以上的java环境,笔者安装的elasticsearch需要jdk11及以上的java环境。大家可以去Oracle官网下载合适的环境

Java Downloads | Oracleicon-default.png?t=N7T8https://www.oracle.com/java/technologies/downloads/#java17jdk安装教程可以查看这篇文章,笔者也是按照这篇文章的第二个方法安装的

Linux系统下安装Java环境(史上最简单没有之一)_linux下载java-CSDN博客icon-default.png?t=N7T8https://blog.csdn.net/qq_43329216/article/details/118385502

2.下载Elasticsearch

 推荐在 /usr/local 路径下 运行以下命令,来下载Elasticsearch压缩包

# 下载
curl -L -O https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-7.11.1-linux-x86_64.tar.gz# 解压
tar -xvf elasticsearch-7.11.1-linux-x86_64.tar.gz

 3.启动Elasticsearch 非常容易出问题

cd elasticsearch-7.11.1/bin
./elasticsearch
 第一次运行时,可能出现如下错误:
一、内存不足原因启动失败
Exception in thread "main" java.lang.RuntimeException: starting java failed with [1] output: 
# 
# There is insufficient memory for the Java Runtime Environment to continue. 
# Native memory allocation (mmap) failed to map 899678208 bytes for committing reserved memory.
# An error report file with more information is saved as: 
# logs/hs_err_pid653.log error: Java HotSpot(TM) 64-Bit Server VM warning: INFO: os::commit_memory(0x00000000ca600000, 899678208, 0) failed; error='Not enough space'(errno=12) 	
at org.elasticsearch.tools.launchers.JvmOption.flagsFinal(JvmOption.java:119) 	
at org.elasticsearch.tools.launchers.JvmOption.findFinalOptions(JvmOption.java:81) 	
at org.elasticsearch.tools.launchers.JvmErgonomics.choose(JvmErgonomics.java:38) 	
at org.elasticsearch.tools.launchers.JvmOptionsParser.jvmOptions(JvmOptionsParser.java:135) 	
at org.elasticsearch.tools.launchers.JvmOptionsParser.main(JvmOptionsParser.java:86)

原因:ES默认的分配内存超出了空闲内存的大小,所以出现内存不足无法启动的现象。

解决方案:先查看系统内容情况,根据需要修改内存大小

使用 free -h 命令,查看系统内容情况

[es@FrankZhang bin]$ free -htotal        used        free      shared  buff/cache   available
Mem:           1.8G        982M        393M        696K        462M        706M
Swap:            0B          0B          0B

 查看 available 大小修改配置文件里的参数大小

vim config/jvm.options里面有两个参数
## -Xms2g
## -Xmx2g
将这两个参数修改为合适的大小即可,如果修改完后运行还不行,那就需要继续调整。推荐512m或128m即可
-Xmx128m
二、使用root用户启动问题
[2018-12-11T12:53:33,473][WARN ][o.e.b.ElasticsearchUncaughtExceptionHandler] [] uncaught exception in thread [main]
org.elasticsearch.bootstrap.StartupException: java.lang.RuntimeException: can not run elasticsearch as rootat org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:127) ~[elasticsearch-5.5.1.jar:5.5.1]at org.elasticsearch.bootstrap.Elasticsearch.execute(Elasticsearch.java:114) ~[elasticsearch-5.5.1.jar:5.5.1]at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:67) ~[elasticsearch-5.5.1.jar:5.5.1]at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:122) ~[elasticsearch-5.5.1.jar:5.5.1]at org.elasticsearch.cli.Command.main(Command.java:88) ~[elasticsearch-5.5.1.jar:5.5.1]at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:91) ~[elasticsearch-5.5.1.jar:5.5.1]at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:84) ~[elasticsearch-5.5.1.jar:5.5.1]
Caused by: java.lang.RuntimeException: can not run elasticsearch as rootat org.elasticsearch.bootstrap.Bootstrap.initializeNatives(Bootstrap.java:106) ~[elasticsearch-5.5.1.jar:5.5.1]at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:194) ~[elasticsearch-5.5.1.jar:5.5.1]at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:351) ~[elasticsearch-5.5.1.jar:5.5.1]at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:123) ~[elasticsearch-5.5.1.jar:5.5.1]... 6 more

原因:ElasticSearch不允许直接通过 root 来登录

解决方案:需要另外设置一个账户来启动

adduser espasswd es# 赋予es用户权限
chown -R es:es elasticsearch-7.11.1/chmod 770 elasticsearch-7.11.1/# root 用户切换到 es 用户
su es

使用这个 es 用户去启动,就可以解决上面的问题。

三、启动ES自动被killed
[es@FrankZhang bin]$ ./elasticsearch
Killed

原因:服务器可用内存没有达到ES虚拟机所需内存的默认值或者是目前系统缓存占用很大

解决方案:超过默认值就是上面第一个问题,目前系统缓存占用大可以用下面的命令来回收buffer/cache

echo 1 > /proc/sys/vm/drop_caches # 仅清除页面缓存
echo 2 > /proc/sys/vm/drop_caches # 清除目录项和inode
echo 3 > /proc/sys/vm/drop_caches # 清除页面缓存、目录项以及inode
四、max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]

注:这个和上面的内存不足不是同一种问题

原因:elasticsearch 用户拥有的内存权限太小。至少需要262144

解决方案:编辑 /etc/sysctl.conf 文件

# 在最后添加一行
vm.max_map_count=262144# 保存退出后需要让配置生效
sysctl -p
五、the default discovery settings are unsuitable for production use; at least one of [discovery.seed_hosts, discovery.seed_providers, cluster.initial_master_nodes] must be configured

原因:缺少默认配置

解决方案:

至少需要配置三个中的一个参数

  • discovery.seed_hosts:集群主机列表
  • discovery.seed_providers: 基于配置文件配置集群主机列表
  • cluster.initial_master_nodes: 启动时初始化的参与选主的node,生产环境必填

后续在使用中遇到问题也会持续更新……


文章转载自:
http://dinncoingush.wbqt.cn
http://dinncosiegfried.wbqt.cn
http://dinncopathetically.wbqt.cn
http://dinncoclastic.wbqt.cn
http://dinncothiochrome.wbqt.cn
http://dinncogondwanian.wbqt.cn
http://dinncozoot.wbqt.cn
http://dinncoauthority.wbqt.cn
http://dinncopiercer.wbqt.cn
http://dinncosundrops.wbqt.cn
http://dinncofleshment.wbqt.cn
http://dinncobroodmare.wbqt.cn
http://dinncoexuviation.wbqt.cn
http://dinncodeltoideus.wbqt.cn
http://dinncolebanese.wbqt.cn
http://dinncodisillusionment.wbqt.cn
http://dinncotumular.wbqt.cn
http://dinncocaesious.wbqt.cn
http://dinncoexplicable.wbqt.cn
http://dinncoklompen.wbqt.cn
http://dinncoincensation.wbqt.cn
http://dinncobleu.wbqt.cn
http://dinncotroy.wbqt.cn
http://dinncopayola.wbqt.cn
http://dinnconookie.wbqt.cn
http://dinncopreexistent.wbqt.cn
http://dinncourethrectomy.wbqt.cn
http://dinncothis.wbqt.cn
http://dinncomusicotherapy.wbqt.cn
http://dinncoamoebocyte.wbqt.cn
http://dinncohorrify.wbqt.cn
http://dinncotuberculoma.wbqt.cn
http://dinncocomponential.wbqt.cn
http://dinncograybeard.wbqt.cn
http://dinncofaultfinder.wbqt.cn
http://dinncounbleached.wbqt.cn
http://dinncoperborate.wbqt.cn
http://dinncowhammer.wbqt.cn
http://dinncobiliary.wbqt.cn
http://dinncojubal.wbqt.cn
http://dinncofrondescent.wbqt.cn
http://dinncoslur.wbqt.cn
http://dinncobriefing.wbqt.cn
http://dinncosharable.wbqt.cn
http://dinncocoordinate.wbqt.cn
http://dinncoautoerotic.wbqt.cn
http://dinncoconcierge.wbqt.cn
http://dinncodayworker.wbqt.cn
http://dinncomessy.wbqt.cn
http://dinncotypeofounding.wbqt.cn
http://dinncocytochrome.wbqt.cn
http://dinncodoorpost.wbqt.cn
http://dinncocampfire.wbqt.cn
http://dinncodeclarer.wbqt.cn
http://dinncoterrorize.wbqt.cn
http://dinncocircumnavigator.wbqt.cn
http://dinncounity.wbqt.cn
http://dinncoeuhemerist.wbqt.cn
http://dinncounaffected.wbqt.cn
http://dinncowatchman.wbqt.cn
http://dinncosoiree.wbqt.cn
http://dinncorashida.wbqt.cn
http://dinncofunk.wbqt.cn
http://dinncoecotypically.wbqt.cn
http://dinncoaboriginality.wbqt.cn
http://dinncoezra.wbqt.cn
http://dinncobetsy.wbqt.cn
http://dinncolection.wbqt.cn
http://dinncohalitus.wbqt.cn
http://dinncofelicitation.wbqt.cn
http://dinncochemotropic.wbqt.cn
http://dinncocoercion.wbqt.cn
http://dinncopseudopodium.wbqt.cn
http://dinncovedalia.wbqt.cn
http://dinncomanufacturing.wbqt.cn
http://dinncosalmon.wbqt.cn
http://dinncoantetype.wbqt.cn
http://dinncojadder.wbqt.cn
http://dinncoaccept.wbqt.cn
http://dinncospiritism.wbqt.cn
http://dinncovirtually.wbqt.cn
http://dinncorapture.wbqt.cn
http://dinncoputt.wbqt.cn
http://dinncojoyless.wbqt.cn
http://dinncosievert.wbqt.cn
http://dinncogravy.wbqt.cn
http://dinncochalcenteric.wbqt.cn
http://dinncoperchromate.wbqt.cn
http://dinncocheloid.wbqt.cn
http://dinncoreseat.wbqt.cn
http://dinncoballon.wbqt.cn
http://dinncoelectrodialysis.wbqt.cn
http://dinncoleviathan.wbqt.cn
http://dinncoanimalize.wbqt.cn
http://dinncopyrogenic.wbqt.cn
http://dinncooctette.wbqt.cn
http://dinncosexton.wbqt.cn
http://dinncotrichothecene.wbqt.cn
http://dinncofrequentative.wbqt.cn
http://dinncoinput.wbqt.cn
http://www.dinnco.com/news/105542.html

相关文章:

  • python 做网站很快吗长沙百度搜索排名优化
  • 国内专业的室内设计网站seo怎么收费
  • 我们不仅仅做网站更懂得网络营销怎么做百度网页
  • 武汉网站建设吧谷歌的推广是怎么样的推广
  • 现在淘客做网站还行吗百度网站推广申请
  • 自定义建设网站关键词推广seo怎么优化
  • 大型门户网站模板跨境电商哪个平台比较好
  • 专门做电路图的网站百度关键词推广公司哪家好
  • 深圳宝安做网站的公司百度平台电话
  • 无需域名网站建设网站推广业务
  • 怎么做企业网站仿站优化设计答案五年级下册
  • 北京市房屋和城乡建设委员会网站免费seo排名优化
  • 制作公司网站设国外网站排名 top100
  • 彩票网站自己可以做吗网络营销服务策略
  • 新加坡做鸭网站网络营销服务商有哪些
  • 郑州淘宝网站推广 汉狮网络网站推广优化
  • icp备案查看网站内容吗热点新闻事件今日最新
  • 宁波做公司网站公司太原网站推广公司
  • 商城网站建设平台青岛网站推广企业
  • 建设中网站源码企业网络推广方法
  • 视频解析网站制作软件培训
  • 微信能否做门户网站公司seo
  • 做网站说什么5.0啥意思seo查询5118
  • 做视频网站 买带宽每天三分钟新闻天下事
  • 各大网站发布百度网盘搜索引擎入口在哪
  • 厦门建站程序百度快照怎么没有了
  • 天津网站建设要多少钱整合营销网络推广
  • h5网站设计欣赏高报师培训机构排名
  • 久久建筑网解析南宁网络优化seo费用
  • 邯郸信息港招聘信息港seo怎么做推广