Google Analytics统计页面加载速度 https://www.douban.com/note/164190136/
我搜了搜资料,实现的逻辑是:
1、访客进入网站后,会留下相关的cookie数据,把这些数据记录后,会产生编号为1的数据
2、访客在页面中触发点击事件后,给后端发送点击的坐标x和y值
对于fa系统不是很熟悉,想请问下几个问题?
1、添加新的数据表是在哪个文件可以实现?
2、触发点击事件后,如何给后台发送x和y数据,后台接收到数据后,修改哪个文件,进行存储?
elasticsearch 报错 max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]
解决办法:
1、编辑/etc/sysctl.conf文件
vi /etc/sysctl.conf
2、添加下面配置:
vm.max_map_count=655360
3、并执行命令:
sysctl -p
解决了,参照 http://www.fecshop.com/topic/1497 帖子修改 $GOPATH/src/github.com/fecshopsoft/fec-go/shell/mapReduct.go 文件重新运行 go run fec-go-shell.go 7 跑数据,现在后台有数据了
我已经守护运行了 elasticsearch
[root@izj6c9ucnwnm673q0fiv6cz main]# lsof -i:9200
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
java 4687 elasticsearch 208u IPv4 442303 0t0 TCP localhost:wap-wsp (LISTEN)
[root@izj6c9ucnwnm673q0fiv6cz main]# lsof -i:9300
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
java 4687 elasticsearch 195u IPv4 442284 0t0 TCP localhost:vrace (LISTEN)
如果可以了,我现在使用 go run fec-go-shell.go 7 来跑数据日志如下
[root@izj6c9ucnwnm673q0fiv6cz main]# go run fec-go-shell.go 7
2018/11/15 17:25:09 GetEngine complete
2018/11/15 17:25:09 Base Info GetEngine complete
2018/11/15 17:25:09 ------start:2018-11-15 17:25:09.029012704 +0800 CST m=+0.004778305
2018/11/15 17:25:09 /root/go/src/github.com/fecshopsoft/fec-go/shell/index.go:23: 2018-11-15 09:25:09 - Init Db Index Begin ...
2018/11/15 17:25:09 /root/go/src/github.com/fecshopsoft/fec-go/shell/index.go:31: 2018-11-15 09:25:09 - Init Db Index Complete ...
2018/11/15 17:25:09 /root/go/src/github.com/fecshopsoft/fec-go/shell/mapReduct.go:60: ###########
2018/11/15 17:25:09 /root/go/src/github.com/fecshopsoft/fec-go/shell/mapReduct.go:61: 7
2018/11/15 17:25:09 /root/go/src/github.com/fecshopsoft/fec-go/shell/mapReduct.go:85: 2018-11-15
2018/11/15 17:25:09 /root/go/src/github.com/fecshopsoft/fec-go/shell/mapReduct.go:86: mapReduceByDate ...
2018/11/15 17:25:09 /root/go/src/github.com/fecshopsoft/fec-go/shell/mapReduct.go:85: 2018-11-14
2018/11/15 17:25:09 /root/go/src/github.com/fecshopsoft/fec-go/shell/mapReduct.go:86: mapReduceByDate ...
2018/11/15 17:25:09 /root/go/src/github.com/fecshopsoft/fec-go/shell/mapReduct.go:85: 2018-11-13
2018/11/15 17:25:09 /root/go/src/github.com/fecshopsoft/fec-go/shell/mapReduct.go:86: mapReduceByDate ...
2018/11/15 17:25:09 /root/go/src/github.com/fecshopsoft/fec-go/shell/mapReduct.go:85: 2018-11-12
2018/11/15 17:25:09 /root/go/src/github.com/fecshopsoft/fec-go/shell/mapReduct.go:86: mapReduceByDate ...
2018/11/15 17:25:09 /root/go/src/github.com/fecshopsoft/fec-go/shell/mapReduct.go:85: 2018-11-11
2018/11/15 17:25:09 /root/go/src/github.com/fecshopsoft/fec-go/shell/mapReduct.go:86: mapReduceByDate ...
2018/11/15 17:25:09 /root/go/src/github.com/fecshopsoft/fec-go/shell/mapReduct.go:85: 2018-11-10
2018/11/15 17:25:09 /root/go/src/github.com/fecshopsoft/fec-go/shell/mapReduct.go:86: mapReduceByDate ...
2018/11/15 17:25:09 /root/go/src/github.com/fecshopsoft/fec-go/shell/mapReduct.go:85: 2018-11-09
2018/11/15 17:25:09 /root/go/src/github.com/fecshopsoft/fec-go/shell/mapReduct.go:86: mapReduceByDate ...
2018/11/15 17:25:09 /root/go/src/main/fec-go-shell.go:35: ------end:2018-11-15 17:25:09.032126347 +0800 CST m=+0.007891966
[root@izj6c9ucnwnm673q0fiv6cz main]#
应该没错误吧,可后台数据展示还是空空的
[root@izj6c9ucnwnm673q0fiv6cz main]# su elasticsearch -c "/usr/local/elasticsearch/bin/elasticsearch "
[2018-11-15T17:04:42,255][INFO ][o.e.n.Node ] [node-1] initializing ...
[2018-11-15T17:04:42,324][INFO ][o.e.e.NodeEnvironment ] [node-1] using [1] data paths, mounts [[/ (rootfs)]], net usable_space [26.6gb], net total_space [39.2gb], types [rootfs]
[2018-11-15T17:04:42,324][INFO ][o.e.e.NodeEnvironment ] [node-1] heap size [123.7mb], compressed ordinary object pointers [true]
[2018-11-15T17:04:42,325][INFO ][o.e.n.Node ] [node-1] node name [node-1], node ID [sTsm0-keRceqB-EL-0Majw]
[2018-11-15T17:04:42,325][INFO ][o.e.n.Node ] [node-1] version[6.4.3], pid[3516], build[default/tar/fe40335/2018-10-30T23:17:19.084789Z], OS[Linux/3.10.0-693.2.2.el7.x86_64/amd64], JVM[Oracle Corporation/Java HotSpot(TM) 64-Bit Server VM/1.8.0_66/25.66-b17]
[2018-11-15T17:04:42,325][INFO ][o.e.n.Node ] [node-1] JVM arguments [-Xms256m, -Xmx64m, -Xms128m, -Xmx128m, -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=/tmp/elasticsearch.rC0MClxo, -XX:+HeapDumpOnOutOfMemoryError, -XX:HeapDumpPath=data, -XX:ErrorFile=logs/hs_err_pid%p.log, -XX:+PrintGCDetails, -XX:+PrintGCDateStamps, -XX:+PrintTenuringDistribution, -XX:+PrintGCApplicationStoppedTime, -Xloggc:logs/gc.log, -XX:+UseGCLogFileRotation, -XX:NumberOfGCLogFiles=32, -XX:GCLogFileSize=64m, -Des.path.home=/usr/local/elasticsearch, -Des.path.conf=/usr/local/elasticsearch/config, -Des.distribution.flavor=default, -Des.distribution.type=tar]
[2018-11-15T17:04:44,067][INFO ][o.e.p.PluginsService ] [node-1] loaded module [aggs-matrix-stats]
[2018-11-15T17:04:44,067][INFO ][o.e.p.PluginsService ] [node-1] loaded module [analysis-common]
[2018-11-15T17:04:44,067][INFO ][o.e.p.PluginsService ] [node-1] loaded module [ingest-common]
[2018-11-15T17:04:44,067][INFO ][o.e.p.PluginsService ] [node-1] loaded module [lang-expression]
[2018-11-15T17:04:44,067][INFO ][o.e.p.PluginsService ] [node-1] loaded module [lang-mustache]
[2018-11-15T17:04:44,067][INFO ][o.e.p.PluginsService ] [node-1] loaded module [lang-painless]
[2018-11-15T17:04:44,067][INFO ][o.e.p.PluginsService ] [node-1] loaded module [mapper-extras]
[2018-11-15T17:04:44,067][INFO ][o.e.p.PluginsService ] [node-1] loaded module [parent-join]
[2018-11-15T17:04:44,067][INFO ][o.e.p.PluginsService ] [node-1] loaded module [percolator]
[2018-11-15T17:04:44,067][INFO ][o.e.p.PluginsService ] [node-1] loaded module [rank-eval]
[2018-11-15T17:04:44,067][INFO ][o.e.p.PluginsService ] [node-1] loaded module [reindex]
[2018-11-15T17:04:44,068][INFO ][o.e.p.PluginsService ] [node-1] loaded module [repository-url]
[2018-11-15T17:04:44,068][INFO ][o.e.p.PluginsService ] [node-1] loaded module [transport-netty4]
[2018-11-15T17:04:44,068][INFO ][o.e.p.PluginsService ] [node-1] loaded module [tribe]
[2018-11-15T17:04:44,068][INFO ][o.e.p.PluginsService ] [node-1] loaded module [x-pack-core]
[2018-11-15T17:04:44,068][INFO ][o.e.p.PluginsService ] [node-1] loaded module [x-pack-deprecation]
[2018-11-15T17:04:44,068][INFO ][o.e.p.PluginsService ] [node-1] loaded module [x-pack-graph]
[2018-11-15T17:04:44,068][INFO ][o.e.p.PluginsService ] [node-1] loaded module [x-pack-logstash]
[2018-11-15T17:04:44,068][INFO ][o.e.p.PluginsService ] [node-1] loaded module [x-pack-ml]
[2018-11-15T17:04:44,068][INFO ][o.e.p.PluginsService ] [node-1] loaded module [x-pack-monitoring]
[2018-11-15T17:04:44,068][INFO ][o.e.p.PluginsService ] [node-1] loaded module [x-pack-rollup]
[2018-11-15T17:04:44,068][INFO ][o.e.p.PluginsService ] [node-1] loaded module [x-pack-security]
[2018-11-15T17:04:44,068][INFO ][o.e.p.PluginsService ] [node-1] loaded module [x-pack-sql]
[2018-11-15T17:04:44,068][INFO ][o.e.p.PluginsService ] [node-1] loaded module [x-pack-upgrade]
[2018-11-15T17:04:44,068][INFO ][o.e.p.PluginsService ] [node-1] loaded module [x-pack-watcher]
[2018-11-15T17:04:44,069][INFO ][o.e.p.PluginsService ] [node-1] no plugins loaded
[2018-11-15T17:04:48,149][INFO ][o.e.x.s.a.s.FileRolesStore] [node-1] parsed [0] roles from file [/usr/local/elasticsearch/config/roles.yml]
[2018-11-15T17:04:48,571][INFO ][o.e.x.m.j.p.l.CppLogMessageHandler] [controller/3570] [Main.cc@109] controller (64 bit): Version 6.4.3 (Build 7a0781676dd492) Copyright (c) 2018 Elasticsearch BV
[2018-11-15T17:04:48,907][DEBUG][o.e.a.ActionModule ] Using REST wrapper from plugin org.elasticsearch.xpack.security.Security
[2018-11-15T17:04:49,126][INFO ][o.e.d.DiscoveryModule ] [node-1] using discovery type [zen]
[2018-11-15T17:04:49,912][INFO ][o.e.n.Node ] [node-1] initialized
[2018-11-15T17:04:49,912][INFO ][o.e.n.Node ] [node-1] starting ...
[2018-11-15T17:04:50,056][INFO ][o.e.t.TransportService ] [node-1] publish_address {127.0.0.1:9300}, bound_addresses {127.0.0.1:9300}
[2018-11-15T17:04:53,165][INFO ][o.e.c.s.MasterService ] [node-1] zen-disco-elected-as-master ([0] nodes joined)[, ], reason: new_master {node-1}{sTsm0-keRceqB-EL-0Majw}{RlJbFGUdTXWgHm2vgZTSjA}{127.0.0.1}{127.0.0.1:9300}{ml.machine_memory=1928560640, xpack.installed=true, ml.max_open_jobs=20, ml.enabled=true}
[2018-11-15T17:04:53,170][INFO ][o.e.c.s.ClusterApplierService] [node-1] new_master {node-1}{sTsm0-keRceqB-EL-0Majw}{RlJbFGUdTXWgHm2vgZTSjA}{127.0.0.1}{127.0.0.1:9300}{ml.machine_memory=1928560640, xpack.installed=true, ml.max_open_jobs=20, ml.enabled=true}, reason: apply cluster state (from master [master {node-1}{sTsm0-keRceqB-EL-0Majw}{RlJbFGUdTXWgHm2vgZTSjA}{127.0.0.1}{127.0.0.1:9300}{ml.machine_memory=1928560640, xpack.installed=true, ml.max_open_jobs=20, ml.enabled=true} committed version [1] source [zen-disco-elected-as-master ([0] nodes joined)[, ]]])
[2018-11-15T17:04:53,209][INFO ][o.e.x.s.t.n.SecurityNetty4HttpServerTransport] [node-1] publish_address {127.0.0.1:9200}, bound_addresses {127.0.0.1:9200}
[2018-11-15T17:04:53,209][INFO ][o.e.n.Node ] [node-1] started
[2018-11-15T17:04:53,465][WARN ][o.e.x.s.a.s.m.NativeRoleMappingStore] [node-1] Failed to clear cache for realms [[]]
[2018-11-15T17:04:53,510][INFO ][o.e.l.LicenseService ] [node-1] license [9d87670a-9b12-47f3-9298-1f3a565b0d28] mode [basic] - valid
[2018-11-15T17:04:53,521][INFO ][o.e.g.GatewayService ] [node-1] recovered [0] indices into cluster_state
^C
Session terminated, killing shell...[2018-11-15T17:07:16,805][INFO ][o.e.n.Node ] [node-1] stopping ...
[2018-11-15T17:07:16,811][INFO ][o.e.x.w.WatcherService ] [node-1] stopping watch service, reason [shutdown initiated]
[2018-11-15T17:07:17,061][INFO ][o.e.x.m.j.p.l.CppLogMessageHandler] [controller/3570] [Main.cc@148] Ml controller exiting
[2018-11-15T17:07:17,063][INFO ][o.e.x.m.j.p.NativeController] Native controller process has stopped - no new native processes can be started
[2018-11-15T17:07:17,070][INFO ][o.e.n.Node ] [node-1] stopped
[2018-11-15T17:07:17,070][INFO ][o.e.n.Node ] [node-1] closing ...
[2018-11-15T17:07:17,078][INFO ][o.e.n.Node ] [node-1] closed
还有错误吗?我不太会看
elasticsearch 报错 max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]
解决办法:
1、编辑/etc/sysctl.conf文件
vi /etc/sysctl.conf
2、添加下面配置:
vm.max_map_count=655360
3、并执行命令:
sysctl -p
elastic_host = http://127.0.0.1:9200
我的config.ini文件里已经配置了的,但是我怎么检测elasticSearch是否成功呢
我运行:su elasticsearch -c "/usr/local/elasticsearch/bin/elasticsearch " 结果如下:elasticsearch这算是成功了吧
[root@izj6c9ucnwnm673q0fiv6cz zhiliao_Adm]# su elasticsearch -c "/usr/local/elasticsearch/bin/elasticsearch " sticsearch/bin/elasticsearch "
[2018-11-15T14:30:05,617][INFO ][o.e.n.Node ] [node-1] initializin g ...
[2018-11-15T14:30:05,687][INFO ][o.e.e.NodeEnvironment ] [node-1] using [1] d ata paths, mounts [[/ (rootfs)]], net usable_space [26.6gb], net total_space [39 .2gb], types [rootfs]
[2018-11-15T14:30:05,687][INFO ][o.e.e.NodeEnvironment ] [node-1] heap size [ 123.7mb], compressed ordinary object pointers [true]
[2018-11-15T14:30:05,688][INFO ][o.e.n.Node ] [node-1] node name [ node-1], node ID [sTsm0-keRceqB-EL-0Majw]
[2018-11-15T14:30:05,688][INFO ][o.e.n.Node ] [node-1] version[6.4 .3], pid[26650], build[default/tar/fe40335/2018-10-30T23:17:19.084789Z], OS[Linu x/3.10.0-693.2.2.el7.x86_64/amd64], JVM[Oracle Corporation/Java HotSpot(TM) 64-B it Server VM/1.8.0_66/25.66-b17]
[2018-11-15T14:30:05,689][INFO ][o.e.n.Node ] [node-1] JVM argumen ts [-Xms256m, -Xmx64m, -Xms128m, -Xmx128m, -XX:+UseConcMarkSweepGC, -XX:CMSIniti atingOccupancyFraction=75, -XX:+UseCMSInitiatingOccupancyOnly, -XX:+AlwaysPreTou ch, -Xss1m, -Djava.awt.headless=true, -Dfile.encoding=UTF-8, -Djna.nosys=true, - XX:-OmitStackTraceInFastThrow, -Dio.netty.noUnsafe=true, -Dio.netty.noKeySetOpti mization=true, -Dio.netty.recycler.maxCapacityPerThread=0, -Dlog4j.shutdownHookE nabled=false, -Dlog4j2.disable.jmx=true, -Djava.io.tmpdir=/tmp/elasticsearch.z0v Apbx5, -XX:+HeapDumpOnOutOfMemoryError, -XX:HeapDumpPath=data, -XX:ErrorFile=log s/hs_err_pid%p.log, -XX:+PrintGCDetails, -XX:+PrintGCDateStamps, -XX:+PrintTenur ingDistribution, -XX:+PrintGCApplicationStoppedTime, -Xloggc:logs/gc.log, -XX:+U seGCLogFileRotation, -XX:NumberOfGCLogFiles=32, -XX:GCLogFileSize=64m, -Des.path .home=/usr/local/elasticsearch, -Des.path.conf=/usr/local/elasticsearch/config, -Des.distribution.flavor=default, -Des.distribution.type=tar]
[2018-11-15T14:30:07,856][INFO ][o.e.p.PluginsService ] [node-1] loaded modu le [aggs-matrix-stats]
[2018-11-15T14:30:07,856][INFO ][o.e.p.PluginsService ] [node-1] loaded modu le [analysis-common]
[2018-11-15T14:30:07,856][INFO ][o.e.p.PluginsService ] [node-1] loaded modu le [ingest-common]
[2018-11-15T14:30:07,856][INFO ][o.e.p.PluginsService ] [node-1] loaded modu le [lang-expression]
[2018-11-15T14:30:07,856][INFO ][o.e.p.PluginsService ] [node-1] loaded modu le [lang-mustache]
[2018-11-15T14:30:07,857][INFO ][o.e.p.PluginsService ] [node-1] loaded modu le [lang-painless]
[2018-11-15T14:30:07,857][INFO ][o.e.p.PluginsService ] [node-1] loaded modu le [mapper-extras]
[2018-11-15T14:30:07,857][INFO ][o.e.p.PluginsService ] [node-1] loaded modu le [parent-join]
[2018-11-15T14:30:07,857][INFO ][o.e.p.PluginsService ] [node-1] loaded modu le [percolator]
[2018-11-15T14:30:07,857][INFO ][o.e.p.PluginsService ] [node-1] loaded modu le [rank-eval]
[2018-11-15T14:30:07,857][INFO ][o.e.p.PluginsService ] [node-1] loaded modu le [reindex]
[2018-11-15T14:30:07,857][INFO ][o.e.p.PluginsService ] [node-1] loaded modu le [repository-url]
[2018-11-15T14:30:07,857][INFO ][o.e.p.PluginsService ] [node-1] loaded modu le [transport-netty4]
[2018-11-15T14:30:07,857][INFO ][o.e.p.PluginsService ] [node-1] loaded modu le [tribe]
[2018-11-15T14:30:07,857][INFO ][o.e.p.PluginsService ] [node-1] loaded modu le [x-pack-core]
[2018-11-15T14:30:07,857][INFO ][o.e.p.PluginsService ] [node-1] loaded modu le [x-pack-deprecation]
[2018-11-15T14:30:07,857][INFO ][o.e.p.PluginsService ] [node-1] loaded modu le [x-pack-graph]
[2018-11-15T14:30:07,857][INFO ][o.e.p.PluginsService ] [node-1] loaded modu le [x-pack-logstash]
[2018-11-15T14:30:07,858][INFO ][o.e.p.PluginsService ] [node-1] loaded modu le [x-pack-ml]
[2018-11-15T14:30:07,858][INFO ][o.e.p.PluginsService ] [node-1] loaded modu le [x-pack-monitoring]
[2018-11-15T14:30:07,858][INFO ][o.e.p.PluginsService ] [node-1] loaded modu le [x-pack-rollup]
[2018-11-15T14:30:07,858][INFO ][o.e.p.PluginsService ] [node-1] loaded modu le [x-pack-security]
[2018-11-15T14:30:07,858][INFO ][o.e.p.PluginsService ] [node-1] loaded modu le [x-pack-sql]
[2018-11-15T14:30:07,858][INFO ][o.e.p.PluginsService ] [node-1] loaded modu le [x-pack-upgrade]
[2018-11-15T14:30:07,858][INFO ][o.e.p.PluginsService ] [node-1] loaded modu le [x-pack-watcher]
[2018-11-15T14:30:07,858][INFO ][o.e.p.PluginsService ] [node-1] no plugins loaded
[2018-11-15T14:30:11,590][INFO ][o.e.x.s.a.s.FileRolesStore] [node-1] parsed [0] roles from file [/usr/local/elasticsearch/config/roles.yml]
[2018-11-15T14:30:12,020][INFO ][o.e.x.m.j.p.l.CppLogMessageHandler] [controller /26705] [Main.cc@109] controller (64 bit): Version 6.4.3 (Build 7a0781676dd492) Copyright (c) 2018 Elasticsearch BV
[2018-11-15T14:30:12,362][DEBUG][o.e.a.ActionModule ] Using REST wrapper f rom plugin org.elasticsearch.xpack.security.Security
[2018-11-15T14:30:12,598][INFO ][o.e.d.DiscoveryModule ] [node-1] using disco very type [zen]
[2018-11-15T14:30:13,387][INFO ][o.e.n.Node ] [node-1] initialized
[2018-11-15T14:30:13,387][INFO ][o.e.n.Node ] [node-1] starting .. .
[2018-11-15T14:30:13,620][WARN ][o.e.b.ElasticsearchUncaughtExceptionHandler] [n ode-1] uncaught exception in thread [main]
org.elasticsearch.bootstrap.StartupException: BindTransportException[Failed to b ind to [9300-9400]]; nested: BindException[Cannot assign requested address];
at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:140 ) ~[elasticsearch-6.4.3.jar:6.4.3]
at org.elasticsearch.bootstrap.Elasticsearch.execute(Elasticsearch.java: 127) ~[elasticsearch-6.4.3.jar:6.4.3]
at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwar eCommand.java:86) ~[elasticsearch-6.4.3.jar:6.4.3]
at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:1 24) ~[elasticsearch-cli-6.4.3.jar:6.4.3]
at org.elasticsearch.cli.Command.main(Command.java:90) ~[elasticsearch-c li-6.4.3.jar:6.4.3]
at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:93) ~[elasticsearch-6.4.3.jar:6.4.3]
at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:86) ~[elasticsearch-6.4.3.jar:6.4.3]
Caused by: org.elasticsearch.transport.BindTransportException: Failed to bind to [9300-9400]
at org.elasticsearch.transport.TcpTransport.bindToPort(TcpTransport.java :821) ~[elasticsearch-6.4.3.jar:6.4.3]
at org.elasticsearch.transport.TcpTransport.bindServer(TcpTransport.java :786) ~[elasticsearch-6.4.3.jar:6.4.3]
at org.elasticsearch.transport.netty4.Netty4Transport.doStart(Netty4Tran sport.java:134) ~[?:?]
at org.elasticsearch.xpack.core.security.transport.netty4.SecurityNetty4 Transport.doStart(SecurityNetty4Transport.java:87) ~[?:?]
at org.elasticsearch.xpack.security.transport.netty4.SecurityNetty4Serve rTransport.doStart(SecurityNetty4ServerTransport.java:41) ~[?:?]
at org.elasticsearch.common.component.AbstractLifecycleComponent.start(A bstractLifecycleComponent.java:66) ~[elasticsearch-6.4.3.jar:6.4.3]
at org.elasticsearch.transport.TransportService.doStart(TransportService .java:217) ~[elasticsearch-6.4.3.jar:6.4.3]
at org.elasticsearch.common.component.AbstractLifecycleComponent.start(A bstractLifecycleComponent.java:66) ~[elasticsearch-6.4.3.jar:6.4.3]
at org.elasticsearch.node.Node.start(Node.java:667) ~[elasticsearch-6.4. 3.jar:6.4.3]
at org.elasticsearch.bootstrap.Bootstrap.start(Bootstrap.java:265) ~[ela sticsearch-6.4.3.jar:6.4.3]
at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:335) ~[elas ticsearch-6.4.3.jar:6.4.3]
at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:136 ) ~[elasticsearch-6.4.3.jar:6.4.3]
... 6 more
Caused by: java.net.BindException: Cannot assign requested address
at sun.nio.ch.Net.bind0(Native Method) ~[?:?]
at sun.nio.ch.Net.bind(Net.java:433) ~[?:?]
at sun.nio.ch.Net.bind(Net.java:425) ~[?:?]
at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java: 223) ~[?:?]
at io.netty.channel.socket.nio.NioServerSocketChannel.doBind(NioServerSo cketChannel.java:128) ~[?:?]
at io.netty.channel.AbstractChannel$AbstractUnsafe.bind(AbstractChannel. java:558) ~[?:?]
at io.netty.channel.DefaultChannelPipeline$HeadContext.bind(DefaultChann elPipeline.java:1283) ~[?:?]
at io.netty.channel.AbstractChannelHandlerContext.invokeBind(AbstractCha nnelHandlerContext.java:501) ~[?:?]
at io.netty.channel.AbstractChannelHandlerContext.bind(AbstractChannelHa ndlerContext.java:486) ~[?:?]
at io.netty.channel.DefaultChannelPipeline.bind(DefaultChannelPipeline.j ava:989) ~[?:?]
at io.netty.channel.AbstractChannel.bind(AbstractChannel.java:254) ~[?:? ]
at io.netty.bootstrap.AbstractBootstrap$2.run(AbstractBootstrap.java:365 ) ~[?:?]
at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEv entExecutor.java:163) ~[?:?]
at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(Single ThreadEventExecutor.java:403) ~[?:?]
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:463) ~[?:?]
at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThread EventExecutor.java:858) ~[?:?]
at java.lang.Thread.run(Thread.java:745) [?:1.8.0_66]
[2018-11-15T14:30:14,428][INFO ][o.e.n.Node ] [node-1] stopping .. .
[2018-11-15T14:30:14,432][INFO ][o.e.n.Node ] [node-1] stopped
[2018-11-15T14:30:14,432][INFO ][o.e.n.Node ] [node-1] closing ...
[2018-11-15T14:30:14,464][INFO ][o.e.n.Node ] [node-1] closed
我再次运行:go run fec-go-shell.go 7
2018/11/15 14:31:08 GetEngine complete
2018/11/15 14:31:08 Base Info GetEngine complete
2018/11/15 14:31:08 ------start:2018-11-15 14:31:08.450492703 +0800 CST m=+0.00 4886910
2018/11/15 14:31:08 /root/go/src/github.com/fecshopsoft/fec-go/shell/index.go:23 : 2018-11-15 06:31:08 - Init Db Index Begin ...
2018/11/15 14:31:08 /root/go/src/github.com/fecshopsoft/fec-go/shell/index.go:31 : 2018-11-15 06:31:08 - Init Db Index Complete ...
2018/11/15 14:31:08 /root/go/src/github.com/fecshopsoft/fec-go/shell/mapReduct.g o:60: ###########
2018/11/15 14:31:08 /root/go/src/github.com/fecshopsoft/fec-go/shell/mapReduct.g o:61: 7
2018/11/15 14:31:08 /root/go/src/github.com/fecshopsoft/fec-go/shell/mapReduct.g o:85: 2018-11-15
2018/11/15 14:31:08 /root/go/src/github.com/fecshopsoft/fec-go/shell/mapReduct.g o:86: mapReduceByDate ...
2018/11/15 14:31:08 /root/go/src/github.com/fecshopsoft/fec-go/shell/mapReduct.g o:85: 2018-11-14
2018/11/15 14:31:08 /root/go/src/github.com/fecshopsoft/fec-go/shell/mapReduct.g o:86: mapReduceByDate ...
2018/11/15 14:31:08 /root/go/src/github.com/fecshopsoft/fec-go/shell/mapReduct.g o:85: 2018-11-13
2018/11/15 14:31:08 /root/go/src/github.com/fecshopsoft/fec-go/shell/mapReduct.g o:86: mapReduceByDate ...
2018/11/15 14:31:08 /root/go/src/github.com/fecshopsoft/fec-go/shell/mapReduct.g o:85: 2018-11-12
2018/11/15 14:31:08 /root/go/src/github.com/fecshopsoft/fec-go/shell/mapReduct.g o:86: mapReduceByDate ...
2018/11/15 14:31:08 /root/go/src/github.com/fecshopsoft/fec-go/shell/mapReduct.g o:85: 2018-11-11
2018/11/15 14:31:08 /root/go/src/github.com/fecshopsoft/fec-go/shell/mapReduct.g o:86: mapReduceByDate ...
2018/11/15 14:31:08 /root/go/src/github.com/fecshopsoft/fec-go/shell/mapReduct.g o:85: 2018-11-10
2018/11/15 14:31:08 /root/go/src/github.com/fecshopsoft/fec-go/shell/mapReduct.g o:86: mapReduceByDate ...
2018/11/15 14:31:08 /root/go/src/github.com/fecshopsoft/fec-go/shell/mapReduct.g o:85: 2018-11-09
2018/11/15 14:31:08 /root/go/src/github.com/fecshopsoft/fec-go/shell/mapReduct.g o:86: mapReduceByDate ...
2018/11/15 14:31:08 /root/go/src/main/fec-go-shell.go:35: ------end:2018-11-15 14:31:08.45475137 +0800 CST m=+0.009145626
晕,,解决了,,原来,g3.go 文件的ip地址不能填写服务器ip,真的改成0.0.0.0:53100即可以了,客户浏览器直接使用服务器+端口号来访问,如,http://12.12.12.12:53100/ping 结果成功,页面反馈 {"message":"pong"}