<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0">
<channel>
<title><![CDATA[Heck's  Blog]]></title> 
<link>https://www.heckjj.com/index.php</link> 
<description><![CDATA[一瞬间的决定，往往可以改变很多，事实上，让自己成功的往往不是知识，是精神！ 如果你总是为自己找借口，那只好让成功推迟。执行力，今天！]]></description> 
<language>zh-cn</language> 
<copyright><![CDATA[Heck's  Blog]]></copyright>
<item>
<link>https://www.heckjj.com/post//</link>
<title><![CDATA[unknown setting [http.cors.allow‐origin] did you mean [http.cors.allow-origin]]]></title> 
<author>Heck &lt;@hecks.tk&gt;</author>
<category><![CDATA[运营管理]]></category>
<pubDate>Tue, 28 Feb 2023 02:06:34 +0000</pubDate> 
<guid>https://www.heckjj.com/post//</guid> 
<description>
<![CDATA[ 
	使用Easticsearc时侯启动时，点击elasticsearch.bat发生闪退。<br/>原因：允许elasticsearch跨越访问时，在修改了elasticsearch的配置文件，并且以非UTF-8的格式修改的，结果就报错了。<br/>添加跨域访问：<br/><br/>http.cors.enabled: true<br/>http.cors.allow‐origin: &quot;*&quot;<br/>日志：<br/>java.lang.IllegalArgumentException:unknown setting [http.cors.allow‐origin] did you mean [http.cors.allow-origin]?<br/> 问题：查看日志文件可以看出allowe-origin中的符号没有识别。<br/> 解决：原因是在修改elasticsearch.yml时用的notepad++，默认的是ANSI 编码，重新修改配置文件，以UTF-8编码修改并保存。（注意：修改elasticsearch.yml最好只用utf-8编码）<br/><br/>elasticsearch：6.2.1<br/><br/>jdk:1.8.0.241&nbsp;&nbsp;[ java -version]<br/><br/> 我的elasticsearch.yml 配置 ，如下：<br/><br/># ======================== Elasticsearch Configuration =========================<br/>#<br/># NOTE: Elasticsearch comes with reasonable defaults for most settings.<br/>#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Before you set out to tweak and tune the configuration, make sure you<br/>#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; understand what are you trying to accomplish and the consequences.<br/>#<br/># The primary way of configuring a node is via this file. This template lists<br/># the most important settings you may want to configure for a production cluster.<br/>#<br/># Please consult the documentation for further information on configuration options:<br/># https://www.elastic.co/guide/en/elasticsearch/reference/index.html<br/>#<br/># ---------------------------------- Cluster -----------------------------------<br/>#<br/># Use a descriptive name for your cluster:<br/>##配置elasticsearch的集群名称，默认是elasticsearch。建议修改成一个有意义的名称。<br/>cluster.name: lxw-application<br/>#<br/># ------------------------------------ Node ------------------------------------<br/>#<br/># Use a descriptive name for the node:<br/>##节点名，通常一台物理服务器就是一个节点，es会默认随机指定一个名字，建议指定一个有意义的名称，方便管理<br/>node.name: lxw-node-1<br/>#<br/># Add custom attributes to the node:<br/>#<br/>#node.attr.rack: r1<br/>node.master: true&nbsp;&nbsp;#主节点<br/>node.data: true&nbsp;&nbsp;#数据节点<br/>#<br/># ----------------------------------- Paths ------------------------------------<br/>#<br/># Path to directory where to store the data (separate multiple locations by comma):<br/>#索引目录<br/>path.data: D:&#92;softwore&#92;elasticsearch-6.2.1&#92;data<br/> <br/># Path to log files:<br/>#日志<br/>path.logs: D:&#92;softwore&#92;elasticsearch-6.2.1&#92;logs<br/>#<br/># ----------------------------------- Memory -----------------------------------<br/>#<br/># Lock the memory on startup:<br/>#<br/>#bootstrap.memory_lock: true<br/>#<br/># Make sure that the heap size is set to about half the memory available<br/># on the system and that the owner of the process is allowed to use this<br/># limit.<br/>#<br/># Elasticsearch performs poorly when the system is swapping the memory.<br/>#<br/># ---------------------------------- Network -----------------------------------<br/>#<br/># By default Elasticsearch is only accessible on localhost. Set a different<br/># address here to expose this node on the network:<br/>##绑定ip地址 我的问题是改的这里<br/>#network.host: 0.0.0.0<br/>network.host: 127.0.0.1<br/> <br/>#<br/># By default Elasticsearch listens for HTTP traffic on the first free port it<br/># finds starting at 9200. Set a specific HTTP port here:<br/>#暴露的http端口<br/>http.port: 9200<br/> <br/>#内部端口<br/>transport.tcp.port: 9300 <br/> <br/>#&nbsp;&nbsp;跨域设置<br/>http.cors.enabled: true&nbsp;&nbsp; <br/>http.cors.allow-origin: &quot;*&quot;<br/> <br/>#<br/># For more information, consult the network module documentation.<br/>#<br/># --------------------------------- Discovery ----------------------------------<br/>#<br/># Pass an initial list of hosts to perform discovery when this node is started:<br/># The default list of hosts is [&quot;127.0.0.1&quot;, &quot;[::1]&quot;]<br/>#<br/>#discovery.seed_hosts: [&quot;host1&quot;, &quot;host2&quot;]<br/>#<br/># Bootstrap the cluster using an initial set of master-eligible nodes:<br/>#<br/>#cluster.initial_master_nodes: [&quot;node-1&quot;, &quot;node-2&quot;]<br/>#<br/># For more information, consult the discovery and cluster formation module documentation.<br/>#<br/> <br/>#设置集群中master节点的初始列表<br/>discovery.zen.ping.unicast.hosts: [&quot;0.0.0.0:9300&quot;, &quot;0.0.0.0:9301&quot;, &quot;0.0.0.0:9302&quot;] <br/> <br/> #主结点数量的最少值 ,此值的公式为：(master_eligible_nodes / 2) + 1 ，比如：有3个符合要求的主结点，那么这里要设置为2。<br/>discovery.zen.minimum_master_nodes: 1 <br/> <br/># ---------------------------------- Various -----------------------------------<br/>#<br/># Require explicit names when deleting indices:<br/>#<br/>#action.destructive_requires_name: true<br/>报错如下： <br/><br/><br/><br/>D:&#92;softwore&#92;elasticsearch-6.2.1&#92;bin&gt;elasticsearch.bat<br/>[2021-08-16T14:56:26,659][INFO ][o.e.n.Node&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ] [lxw-node-1] initializing ...<br/>[2021-08-16T14:56:26,753][INFO ][o.e.e.NodeEnvironment&nbsp;&nbsp;&nbsp;&nbsp;] [lxw-node-1] using [1] data paths, mounts [[(D:)]], net usable_space [380.2gb], net total_space [390.6gb], types [NTFS]<br/>[2021-08-16T14:56:26,754][INFO ][o.e.e.NodeEnvironment&nbsp;&nbsp;&nbsp;&nbsp;] [lxw-node-1] heap size [990.7mb], compressed ordinary object pointers [true]<br/>[2021-08-16T14:56:26,756][INFO ][o.e.n.Node&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ] [lxw-node-1] node name [lxw-node-1], node ID [JdIIBJ5NRYSD52RuvkxTiQ]<br/>[2021-08-16T14:56:26,756][INFO ][o.e.n.Node&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ] [lxw-node-1] version[6.2.1], pid[13648], build[7299dc3/2018-02-07T19:34:26.990113Z], OS[Windows 10/10.0/amd64], JVM[Oracle Corporation/Java HotSpot(TM) 64-Bit Server VM/1.8.0_241/25.241-b07]<br/>[2021-08-16T14:56:26,757][INFO ][o.e.n.Node&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ] [lxw-node-1] JVM arguments [-Xms1g, -Xmx1g, -XX:+UseConcMarkSweepGC, -XX:CMSInitiatingOccupancyFraction=75, -XX:+UseCMSInitiatingOccupancyOnly, -XX:+AlwaysPreTouch, -Xss1m, -Djava.awt.headless=true, -Dfile.encoding=UTF-8, -Djna.nosys=true, -XX:-OmitStackTraceInFastThrow, -Dio.netty.noUnsafe=true, -Dio.netty.noKeySetOptimization=true, -Dio.netty.recycler.maxCapacityPerThread=0, -Dlog4j.shutdownHookEnabled=false, -Dlog4j2.disable.jmx=true, -Djava.io.tmpdir=C:&#92;Users&#92;LEJU&#92;AppData&#92;Local&#92;Temp&#92;elasticsearch, -XX:+HeapDumpOnOutOfMemoryError, -XX:+PrintGCDetails, -XX:+PrintGCDateStamps, -XX:+PrintTenuringDistribution, -XX:+PrintGCApplicationStoppedTime, -Xloggc:logs/gc.log, -XX:+UseGCLogFileRotation, -XX:NumberOfGCLogFiles=32, -XX:GCLogFileSize=64m, -Delasticsearch, -Des.path.home=D:&#92;softwore&#92;elasticsearch-6.2.1, -Des.path.conf=D:&#92;softwore&#92;elasticsearch-6.2.1&#92;config]<br/>[2021-08-16T14:56:27,485][INFO ][o.e.p.PluginsService&nbsp;&nbsp;&nbsp;&nbsp; ] [lxw-node-1] loaded module [aggs-matrix-stats]<br/>[2021-08-16T14:56:27,485][INFO ][o.e.p.PluginsService&nbsp;&nbsp;&nbsp;&nbsp; ] [lxw-node-1] loaded module [analysis-common]<br/>[2021-08-16T14:56:27,493][INFO ][o.e.p.PluginsService&nbsp;&nbsp;&nbsp;&nbsp; ] [lxw-node-1] loaded module [ingest-common]<br/>[2021-08-16T14:56:27,494][INFO ][o.e.p.PluginsService&nbsp;&nbsp;&nbsp;&nbsp; ] [lxw-node-1] loaded module [lang-expression]<br/>[2021-08-16T14:56:27,494][INFO ][o.e.p.PluginsService&nbsp;&nbsp;&nbsp;&nbsp; ] [lxw-node-1] loaded module [lang-mustache]<br/>[2021-08-16T14:56:27,496][INFO ][o.e.p.PluginsService&nbsp;&nbsp;&nbsp;&nbsp; ] [lxw-node-1] loaded module [lang-painless]<br/>[2021-08-16T14:56:27,497][INFO ][o.e.p.PluginsService&nbsp;&nbsp;&nbsp;&nbsp; ] [lxw-node-1] loaded module [mapper-extras]<br/>[2021-08-16T14:56:27,497][INFO ][o.e.p.PluginsService&nbsp;&nbsp;&nbsp;&nbsp; ] [lxw-node-1] loaded module [parent-join]<br/>[2021-08-16T14:56:27,498][INFO ][o.e.p.PluginsService&nbsp;&nbsp;&nbsp;&nbsp; ] [lxw-node-1] loaded module [percolator]<br/>[2021-08-16T14:56:27,498][INFO ][o.e.p.PluginsService&nbsp;&nbsp;&nbsp;&nbsp; ] [lxw-node-1] loaded module [rank-eval]<br/>[2021-08-16T14:56:27,499][INFO ][o.e.p.PluginsService&nbsp;&nbsp;&nbsp;&nbsp; ] [lxw-node-1] loaded module [reindex]<br/>[2021-08-16T14:56:27,499][INFO ][o.e.p.PluginsService&nbsp;&nbsp;&nbsp;&nbsp; ] [lxw-node-1] loaded module [repository-url]<br/>[2021-08-16T14:56:27,500][INFO ][o.e.p.PluginsService&nbsp;&nbsp;&nbsp;&nbsp; ] [lxw-node-1] loaded module [transport-netty4]<br/>[2021-08-16T14:56:27,500][INFO ][o.e.p.PluginsService&nbsp;&nbsp;&nbsp;&nbsp; ] [lxw-node-1] loaded module [tribe]<br/>[2021-08-16T14:56:27,501][INFO ][o.e.p.PluginsService&nbsp;&nbsp;&nbsp;&nbsp; ] [lxw-node-1] no plugins loaded<br/>[2021-08-16T14:56:28,679][WARN ][o.e.b.ElasticsearchUncaughtExceptionHandler] [lxw-node-1] uncaught exception in thread [main]<br/>org.elasticsearch.bootstrap.StartupException: java.lang.IllegalArgumentException: unknown setting [http.cors.allow‐origin] did you mean [http.cors.allow-origin]?<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:125) ~[elasticsearch-6.2.1.jar:6.2.1]<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;at org.elasticsearch.bootstrap.Elasticsearch.execute(Elasticsearch.java:112) ~[elasticsearch-6.2.1.jar:6.2.1]<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:86) ~[elasticsearch-6.2.1.jar:6.2.1]<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:124) ~[elasticsearch-cli-6.2.1.jar:6.2.1]<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;at org.elasticsearch.cli.Command.main(Command.java:90) ~[elasticsearch-cli-6.2.1.jar:6.2.1]<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:92) ~[elasticsearch-6.2.1.jar:6.2.1]<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:85) ~[elasticsearch-6.2.1.jar:6.2.1]<br/>Caused by: java.lang.IllegalArgumentException: unknown setting [http.cors.allow鈥恛rigin] did you mean [http.cors.allow-origin]?<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;at org.elasticsearch.common.settings.AbstractScopedSettings.validate(AbstractScopedSettings.java:346) ~[elasticsearch-6.2.1.jar:6.2.1]<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;at org.elasticsearch.common.settings.AbstractScopedSettings.validate(AbstractScopedSettings.java:310) ~[elasticsearch-6.2.1.jar:6.2.1]<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;at org.elasticsearch.common.settings.AbstractScopedSettings.validate(AbstractScopedSettings.java:284) ~[elasticsearch-6.2.1.jar:6.2.1]<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;at org.elasticsearch.common.settings.SettingsModule.&lt;init&gt;(SettingsModule.java:134) ~[elasticsearch-6.2.1.jar:6.2.1]<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;at org.elasticsearch.node.Node.&lt;init&gt;(Node.java:331) ~[elasticsearch-6.2.1.jar:6.2.1]<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;at org.elasticsearch.node.Node.&lt;init&gt;(Node.java:246) ~[elasticsearch-6.2.1.jar:6.2.1]<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;at org.elasticsearch.bootstrap.Bootstrap$5.&lt;init&gt;(Bootstrap.java:213) ~[elasticsearch-6.2.1.jar:6.2.1]<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:213) ~[elasticsearch-6.2.1.jar:6.2.1]<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:323) ~[elasticsearch-6.2.1.jar:6.2.1]<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:121) ~[elasticsearch-6.2.1.jar:6.2.1]<br/>解决方法：<br/><br/>将原来的：注意版本问题，不同版本兼容性不一样<br/><br/><br/>补充：解决Elasticsearch（Windows）闪退问题<br/><br/>进入Elasticsearch安装目录下的config目录，修改elasticsearch.yml文件.在文件的末尾加入以下代码<br/><br/>http.cors.enabled: true <br/>http.cors.allow-origin: &quot;*&quot;<br/>cluster.name: heck<br/>node.name: master<br/>network.host: 127.0.0.1<br/><br/>发现持续闪退。这时候我一开始只加入前两行的时候，发现可以正常运行。于是推理了一下，其实可以看日志，但是可能我比较懒，直接感觉加的ip绑定有问题，于是删除最后一行，重新保存启动，发现可以正常运行，好像是因为Elasticsearch是跨域的，具体可能是什么问题，没有细查<br/> <br/><br/>
]]>
</description>
</item><item>
<link>https://www.heckjj.com/post//#blogcomment</link>
<title><![CDATA[[评论] unknown setting [http.cors.allow‐origin] did you mean [http.cors.allow-origin]]]></title> 
<author> &lt;user@domain.com&gt;</author>
<category><![CDATA[评论]]></category>
<pubDate>Thu, 01 Jan 1970 00:00:00 +0000</pubDate> 
<guid>https://www.heckjj.com/post//#blogcomment</guid> 
<description>
<![CDATA[ 
	
]]>
</description>
</item>
</channel>
</rss>