2022年1月27日 星期四

ELK - 無法連線至ES

 設定完TLS 發現只能本機用IP連,使用127.0.0.1及localhost無法連線

其他主機也都無法連線

 Comment

curl https://localhost:9200 curl: (35) OpenSSL SSL_connect: SSL_ERROR_SYSCALL in connection to localhost:9200

在 elasticsearch_audit 發現

{"type":"audit", "timestamp":"2022-01-20T12:57:57,621+0800", "node.id":"tUCQb6ADSLaZHr4VU8w7WA", "event.type":"ip_filter", "event.action":"connection_denied", "origin.type":"rest", "origin.address":"127.0.0.1", "transport.profile":".http", "rule":"deny _all"}

原來是之前設定到,但沒啟用security所以沒生效

curl "https://IP:9200/_cluster/settings?pretty" { "persistent" : { "cluster" : { "max_shards_per_node" : "2000" }, "xpack" : { "monitoring" : { "collection" : { "enabled" : "true" } }, "security" : { "http" : { "filter" : { "allow" : "IP", "deny" : "_all", "enabled" : "true" } }, "transport" : { "filter" : { "allow" : "IP", "deny" : "_all", "enabled" : "false" } } } } }, "transient" : { } }

把它disable就沒事了!!

curl -X PUT "https://IP:9200/_cluster/settings" -H 'Content-Type: application/json' -d' { "persistent": { "xpack.security.http.filter.enabled": false } } '

2021年11月30日 星期二

EZChart Data

意外看到EZChart臺灣股市歷史資料
寫一下程式把資料爬出來

static void Main(string[] args) { var file = File.OpenRead(@"C:\Program Files (x86)\ezChart\Data\0050.dat"); var size = file.Length; using (var br = new BinaryReader(file)) { long readsize = 0; while (size > readsize) { int date = br.ReadInt32(); decimal opening = (decimal)br.ReadInt32() / 100; decimal highest = (decimal)br.ReadInt32() / 100; decimal lowest = (decimal)br.ReadInt32() / 100; decimal closing = (decimal)br.ReadInt32() / 100; int volume = br.ReadInt32(); Console.WriteLine($"date: {date},opening: {opening}, highest: {highest}, lowest: {lowest}, closing: {closing}, volume: {volume}"); readsize += sizeof(Int32) * 6; } } }

https://ez1data.blogspot.com/2024/11/ezchart-1131127.html?m=1

預測2031/1/1可能 TWCA 憑證 IOS會出現不信任

緣由: TWCA CYBER Root CA 有兩張、兩個效期 (2030、2047年到期) 推測TWCA 預計 2030年12月會停用: TWCA CYBER Root CA (2030 年到期) TWCA Global Root CA 改用啟用: TWCA CYBER ...