Category Archives: Error

[Solved] Vue Error: Uncaught TypeError: Cannot read property ‘getters‘ of undefined

The error is as follows:

Cause analysis

I wanted to add a public data source in the modules folder under the store directory to cache data for sharing by multiple components, but I haven’t finished writing it yet. Therefore, this error is reported.

Solution:

Write the basic structure completely. As follows:
the directory is: store/modules/xxx. JS

Novices continue to grope for themselves

Vue el-table Error: Duplicated keys detected This may casuse an update error

Errors are similar to

The component used is El table. Combined with the prompt in the figure, the key should be repeated when TL table renders the row node again.

El table has an EL key attribute. My assignment is: row key = “step”_ id”

Combined with data, step_ ID does have a duplicate. Replace with:

row-key=”id”

A key value that will not be repeated will solve the problem.

[Solved] CentOS build a docker error: job for docker.service failed….

Build docker in centos.
At first everything went well, but after configuring the image, I restarted docker and got an error
Restarting docker reports the following error message:
Job for docker.service failed because the control process exited with error code. See “systemctl status docker.service” and “journalctl -xe” for details.
The start docker error message reads:
Job for docker.service failed because start of the service was attempted too often. See “systemctl status docker.service” and “journalctl -xe” for details.
To force a start use “systemctl reset-failed docker.service” followed by “systemctl start docker.service” again.

Reason for the problem: daemon file suffix format causes reboot/boot failure
The solution is
1、Enter the docker directory: cd /etc/docker
2、Modify the suffix of daemon file: mv daemon.json daemon.conf
3, restart/start docker: systemctl start docker

image852×367 12.3 KB

Cli Write Error: This is related to npm not being able to find a file. [Solved]

npm ERR! path C:\Users\admin\AppData\Roaming\npm\node_modules\lcli\bin\l
npm ERR! code ENOENT
npm ERR! errno -4058
npm ERR! syscall chmod
npm ERR! enoent ENOENT: no such file or directory, chmod ‘C:\Users\admin\AppData\Roaming\npm\node_modules\lcli\bin\l’
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent
npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\admin\AppData\Roaming\npm-cache\_logs\2021-08-15T05_05_12_841Z-debug.log

Write the cli by hand and report an error, it won’t work.

Solution:
You need to open the first line of the path, and then delete the package, re-run the npm link can be

[Solved] SpringBoot integration with Redis error: java.net.ConnectException: Connection refused: no further information

Error message

springboot integrated redis error reason:
you need to modify the bind in the redis.conf configuration file to your own IP address in Linux

redis.conf configuration file

start the service (123 is the password set by myself, set in redis.conf)

Finally, don’t forget to modify the redis configuration file

# Redis database index (default is 0)
spring.redis.database=0
# Redis server address
spring.redis.host=192.168.20.128
# Redis server connection port
spring.redis.port=6379
# Redis server connection password (default is empty)
spring.redis.password=123
# Maximum number of connections to the connection pool (use negative values to indicate no limit)
spring.redis.pool.max-active=8
# Maximum connection pool blocking wait time (use negative values to indicate no limit)
spring.redis.pool.max-wait=-1
# The maximum idle connections in the connection pool
spring.redis.pool.max-idle=8
# The minimum idle connections in the connection pool
spring.redis.pool.min-idle=0
# Connection timeout (milliseconds)
spring.redis.timeout=5000

[Solved] Github Push Codes Error: “error:RPC failed;curl 56 OpenSSL SSL_read:SSL_ERROR_SYSCALL,errno 10054”

Error description

At the weekend, I did something with my computer, installed GitHub again, and reported an error “error: RPC failed” when I made some changes to the cloning project and prepared to push it; curl 56 OpenSSL SSL_ read: SSL_ ERROR_ Syscall, errno 10054 “, searched various solutions on the Internet. It is found that the GIT upload file has a limited file size. Just set the cache size.

Solution

Use Git   Bash enter the code under the current project:

git config --global http.postBuffer 1048576000

Globally set the cache size to 1g, and the problem is solved. I guess this may be because I use HTTPS. I don’t encounter this problem with SSH transmission and pull code in my office.

Tensorflow GPU error (4 Type Error and their Solutions)

I have just changed my laptop, and I have been reporting errors when training models with TensorFlow-gpu, so I am writing down my solution here. Because I tried to replace the cuda version, replace the cudnn version, replace the tensorflow-gpu and keras version when solving the gpu can not run, so the reported errors are also a mess.
Error 1:
2021-08-09 21:04:53.637764: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library cublas64_100.dll
2021-08-09 21:04:58.598447: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library cudnn64_7.dll
2021-08-09 21:17:47.603456: W tensorflow/stream_executor/cuda/redzone_allocator.cc:312] Internal: Invoking ptxas not supported on Windows
Relying on driver to perform ptx compilation. This message will be only logged once.
2021-08-09 21:17:47.675868: E tensorflow/stream_executor/cuda/cuda_blas.cc:428] failed to run cuBLAS routine: CUBLAS_STATUS_EXECUTION_FAILED
2021-08-09 21:17:47.676730: I tensorflow/stream_executor/stream.cc:4963] [stream=000001774007A1F0,impl=00000177393F7250] did not memzero GPU location; source: 000000726209DF28
2021-08-09 21:17:47.676867: I tensorflow/stream_executor/stream.cc:316] did not allocate timer: 000000726209DED0
2021-08-09 21:17:47.676954: I tensorflow/stream_executor/stream.cc:1964] [stream=000001774007A1F0,impl=00000177393F7250] did not enqueue ‘start timer’: 000000726209DED0
2021-08-09 21:17:47.677084: I tensorflow/stream_executor/stream.cc:1976] [stream=000001774007A1F0,impl=00000177393F7250] did not enqueue ‘stop timer’: 000000726209DED0
2021-08-09 21:17:47.677201: F tensorflow/stream_executor/gpu/gpu_timer.cc:65] Check failed: start_event_ != nullptr && stop_event_ != nullptr
Error 2:
Error 3:
tensorflow.python.framework.errors_impl.UnknownError:  Failed to get convolution algorithm. This is probably because cuDNN failed to initialize, so try looking to see if a warning log message was printed above.
Error 4:
CuDNN library: 7.4.1 but source was compiled with: 7.6.0.  CuDNN library major and minor version needs to match or have higher minor version in case of CuDNN 7.0 or later version. If using a binary install, upgrade your CuDNN library.  If building from sources, make sure the library loaded at runtime is compatible with the version specified during compile configuration
In fact, these errors are caused by a problem: my computer graphics card is 3050ti, belongs to the 30 series, can only install cuda11 version or higher, so I reinstalled cuda11.3.1 and the corresponding cudnn8.2.0 version (cudnn8.2.1 is reported as an error)

The problem of error reporting caused by fluent swift

flutter oc-based flutter project using swift-based plugin leads to error reporting problem
Xcode’s output:

ld: warning: Could not find or use auto-linked library ‘swiftCoreGraphics’
ld: warning: Could not find or use auto-linked library ‘swiftDarwin’
ld: warning: Could not find or use auto-linked library ‘swiftUIKit’
ld: warning: Could not find or use auto-linked library ‘swiftFoundation’
ld: warning: Could not find or use auto-linked library ‘swiftCompatibility51’
ld: warning: Could not find or use auto-linked library ‘swiftMetal’
ld: warning: Could not find or use auto-linked library ‘swiftObjectiveC’
ld: warning: Could not find or use auto-linked library ‘swiftCoreFoundation’
ld: warning: Could not find or use auto-linked library ‘swiftCompatibility50’
ld: warning: Could not find or use auto-linked library ‘swiftCoreImage’
ld: warning: Could not find or use auto-linked library
‘swiftCompatibilityDynamicReplacements’
ld: warning: Could not find or use auto-linked library ‘swiftDispatch’
ld: warning: Could not find or use auto-linked library ‘swiftCoreMedia’
ld: warning: Could not find or use auto-linked library ‘swiftQuartzCore’
ld: warning: Could not find or use auto-linked library ‘swiftCore’
ld: warning: Could not find or use auto-linked library ‘swiftCoreAudio’
ld: warning: Could not find or use auto-linked library ‘swiftSwiftOnoneSupport’
Undefined symbols for architecture x86_64:
“value witness table for Builtin.UnknownObject”, referenced from:
full type metadata for kzcity_picker.SwiftKzcityPickerPlugin in
libkzcity_picker.a(SwiftKzcityPickerPlugin.o)
“_swift_FORCE_LOADKaTeX parse error: Expected group after ‘_’ at position 69: …rom: _̲_swift_FORCE_LO…swiftCompatibilityDynamicReplacementsKaTeX parse error: Expected group after ‘_’ at position 111: …eant: _̲_swift_FORCE_LO…swiftCompatibilityDynamicReplacementsKaTeX parse error: Expected group after ‘_’ at position 24: …picker) “_̲_swift_FORCE_LO…_swiftCompatibility51”, referenced from:
_swift_FORCE_LOADKaTeX parse error: Expected group after ‘_’ at position 22: …Compatibility51_̲_kzcity_picker in
libkzcity_picker.a(SwiftKzcityPickerPlugin.o)
(maybe you meant: _swift_FORCE_LOADKaTeX parse error: Expected group after ‘_’ at position 22: …Compatibility51_̲_kzcity_picker)
“_swift_FORCE_LOADKaTeX parse error: Expected group after ‘_’ at position 52: …rom: _̲_swift_FORCE_LO…swiftCompatibility50KaTeX parse error: Expected group after ‘_’ at position 102: …ybe you meant: _̲_swift_FORCE_LO…swiftCompatibility50KaTeX parse error: Expected group after ‘_’ at position 24: …picker) “_̲_swift_FORCE_LO…_swiftQuartzCore”, referenced from:
_swift_FORCE_LOADKaTeX parse error: Expected group after ‘_’ at position 17: …swiftQuartzCore_̲_kzcity_picker in
libkzcity_picker.a(SwiftKzcityPickerPlugin.o)
(maybe you meant: _swift_FORCE_LOADKaTeX parse error: Expected group after ‘_’ at position 17: …swiftQuartzCore_̲_kzcity_picker)
“_swift_FORCE_LOADKaTeX parse error: Expected group after ‘_’ at position 46: …rom: _̲_swift_FORCE_LO…swiftCoreImageKaTeX parse error: Expected group after ‘_’ at position 102: …ybe you meant: _̲_swift_FORCE_LO…swiftCoreImageKaTeX parse error: Expected group after ‘_’ at position 24: …picker) “_̲_swift_FORCE_LO…_swiftCoreGraphics”, referenced from:
_swift_FORCE_LOADKaTeX parse error: Expected group after ‘_’ at position 19: …iftCoreGraphics_̲_kzcity_picker in
libkzcity_picker.a(SwiftKzcityPickerPlugin.o)
(maybe you meant: _swift_FORCE_LOADKaTeX parse error: Expected group after ‘_’ at position 19: …iftCoreGraphics_̲_kzcity_picker)
“_swift_FORCE_LOADKaTeX parse error: Expected group after ‘_’ at position 51: …rom: _̲_swift_FORCE_LO…swiftCoreFoundationKaTeX parse error: Expected group after ‘_’ at position 102: …ybe you meant: _̲_swift_FORCE_LO…swiftCoreFoundationKaTeX parse error: Expected group after ‘_’ at position 144: …ith: _̲_C.FlutterPlugi…_swiftUIKit”, referenced from:
_swift_FORCE_LOADKaTeX parse error: Expected group after ‘_’ at position 12: _swiftUIKit_̲_kzcity_picker in
libkzcity_picker.a(SwiftKzcityPickerPlugin.o)
(maybe you meant: _swift_FORCE_LOADKaTeX parse error: Expected group after ‘_’ at position 12: _swiftUIKit_̲_kzcity_picker)
“swift_allocObject”, referenced from:
@objc kzcity_picker.SwiftKzcityPickerPlugin.handle(: __C.FlutterMethodCall, result:
(Any?) -> ()) -> () in libkzcity_picker.a(SwiftKzcityPickerPlugin.o)
“static (extension in
Foundation):Swift.String.unconditionallyBridgeFromObjectiveC(__C.NSString?) ->
Swift.String”, referenced from:
kzcity_picker.SwiftKzcityPickerPlugin.handle(: __C.FlutterMethodCall, result:
(Any?) -> ()) -> () in libkzcity_picker.a(SwiftKzcityPickerPlugin.o)
“swift_getInitializedObjCClass”, referenced from:
type metadata accessor for __C.FlutterMethodChannel in
libkzcity_picker.a(SwiftKzcityPickerPlugin.o)
type metadata accessor for kzcity_picker.SwiftKzcityPickerPlugin in
libkzcity_picker.a(SwiftKzcityPickerPlugin.o)
kzcity_picker.SwiftKzcityPickerPlugin.handle(: __C.FlutterMethodCall, result:
(Any?) -> ()) -> () in libkzcity_picker.a(SwiftKzcityPickerPlugin.o)
“_swift_FORCE_LOADKaTeX parse error: Expected group after ‘_’ at position 47: …rom: _̲_swift_FORCE_LO…swiftFoundationKaTeX parse error: Expected group after ‘_’ at position 102: …ybe you meant: _̲_swift_FORCE_LO…swiftFoundationKaTeX parse error: Expected group after ‘_’ at position 24: …picker) “_̲_swift_FORCE_LO…_swiftCoreAudio”, referenced from:
_swift_FORCE_LOADKaTeX parse error: Expected group after ‘_’ at position 16: _swiftCoreAudio_̲_kzcity_picker in
libkzcity_picker.a(SwiftKzcityPickerPlugin.o)
(maybe you meant: _swift_FORCE_LOADKaTeX parse error: Expected group after ‘_’ at position 16: _swiftCoreAudio_̲kzcity_picker)
“static Swift.String.+ infix(Swift.String, Swift.String) -> Swift.String”, referenced
from:
kzcity_picker.SwiftKzcityPickerPlugin.handle(: __C.FlutterMethodCall, result:
(Any?) -> ()) -> () in libkzcity_picker.a(SwiftKzcityPickerPlugin.o)
“_swift_FORCE_LOADKaTeX parse error: Expected group after ‘_’ at position 43: …rom: _̲_swift_FORCE_LO…swiftDarwinKaTeX parse error: Expected group after ‘_’ at position 102: …ybe you meant: _̲_swift_FORCE_LO…swiftDarwinKaTeX parse error: Expected group after ‘_’ at position 151: …ith: _̲_C.FlutterPlugi…_swiftDispatch”, referenced from:
_swift_FORCE_LOADKaTeX parse error: Expected group after ‘_’ at position 15: _swiftDispatch_̲_kzcity_picker in
libkzcity_picker.a(SwiftKzcityPickerPlugin.o)
(maybe you meant: _swift_FORCE_LOADKaTeX parse error: Expected group after ‘_’ at position 15: _swiftDispatch_̲_kzcity_picker)
“swift_release”, referenced from:
kzcity_picker.SwiftKzcityPickerPlugin.handle(: __C.FlutterMethodCall, result:
(Any?) -> ()) -> () in libkzcity_picker.a(SwiftKzcityPickerPlugin.o)
__swift_destroy_boxed_opaque_existential_0 in
libkzcity_picker.a(SwiftKzcityPickerPlugin.o)
@objc kzcity_picker.SwiftKzcityPickerPlugin.handle(: __C.FlutterMethodCall, result:
(Any?) -> ()) -> () in libkzcity_picker.a(SwiftKzcityPickerPlugin.o)
“_swift_deallocObject”, referenced from:
l_objectdestroy in libkzcity_picker.a(SwiftKzcityPickerPlugin.o)
“_swift_FORCE_LOADKaTeX parse error: Expected group after ‘_’ at position 42: …rom: _̲_swift_FORCE_LO…swiftMetalKaTeX parse error: Expected group after ‘_’ at position 102: …ybe you meant: _̲_swift_FORCE_LO…swiftMetalKaTeX parse error: Double subscript at position 115: …ugin.handle(_: _̲_C.FlutterMetho…_swiftObjectiveC”, referenced from:
_swift_FORCE_LOADKaTeX parse error: Expected group after ‘_’ at position 17: …swiftObjectiveC_̲_kzcity_picker in
libkzcity_picker.a(SwiftKzcityPickerPlugin.o)
(maybe you meant: _swift_FORCE_LOADKaTeX parse error: Expected group after ‘_’ at position 17: …swiftObjectiveC_̲_kzcity_picker)
“_swift_unknownObjectRetain”, referenced from:
@objc static kzcity_picker.SwiftKzcityPickerPlugin.register(with:
__C.FlutterPluginRegistrar) -> () in libkzcity_picker.a(SwiftKzcityPickerPlugin.o)
“Swift._bridgeAnythingToObjectiveC(A) -> Swift.AnyObject”, referenced from:
reabstraction thunk helper from @escaping @callee_unowned @convention(block)
(@unowned Swift.AnyObject?) -> () to @escaping @callee_guaranteed (@in_guaranteed
Any?) -> () in libkzcity_picker.a(SwiftKzcityPickerPlugin.o)
“_swift_getObjCClassMetadata”, referenced from:
type metadata accessor for __C.FlutterMethodChannel in
libkzcity_picker.a(SwiftKzcityPickerPlugin.o)
@objc static kzcity_picker.SwiftKzcityPickerPlugin.register(with:
__C.FlutterPluginRegistrar) -> () in libkzcity_picker.a(SwiftKzcityPickerPlugin.o)
“(extension in Foundation):Swift.String._bridgeToObjectiveC() -> __C.NSString”,
referenced from:
@nonobjc __C.FlutterMethodChannel.__allocating_init(name: Swift.String,
binaryMessenger: __C.FlutterBinaryMessenger) -> __C.FlutterMethodChannel in
libkzcity_picker.a(SwiftKzcityPickerPlugin.o)
“_swift_getObjCClassFromMetadata”, referenced from:
@nonobjc __C.FlutterMethodChannel.__allocating_init(name: Swift.String,
binaryMessenger: __C.FlutterBinaryMessenger) -> __C.FlutterMethodChannel in
libkzcity_picker.a(SwiftKzcityPickerPlugin.o)
“_swift_FORCE_LOADKaTeX parse error: Expected group after ‘_’ at position 46: …rom: _̲_swift_FORCE_LO…swiftCoreMediaKaTeX parse error: Expected group after ‘_’ at position 102: …ybe you meant: _̲_swift_FORCE_LO…swiftCoreMedia$kzcity_picker)
“type metadata for Swift.S

[Solved] Elasticsearch-7.2.1 startup error: ERROR: [1] bootstrap checks failed

1、elasticsearch-7.2.1 startup error: 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 [elsearch@slaver2 elasticsearch-7.2.1]$ ./bin/elasticsearch
 2 future versions of Elasticsearch will require Java 11; your Java version from [/usr/local/soft/jdk1.8.0_281/jre] does not meet this requirement
 3 [2021-03-23T15:13:43,592][INFO ][o.e.e.NodeEnvironment    ] [slaver2] using [1] data paths, mounts [[/ (/dev/mapper/centos-root)]], net usable_space [1.1gb], net total_space [9.9gb], types [xfs]
 4 [2021-03-23T15:13:43,599][INFO ][o.e.e.NodeEnvironment    ] [slaver2] heap size [990.7mb], compressed ordinary object pointers [true]
 5 [2021-03-23T15:13:43,605][INFO ][o.e.n.Node               ] [slaver2] node name [slaver2], node ID [FsI1qieBQ5Kn4MYh001oHQ], cluster name [elasticsearch]
 6 [2021-03-23T15:13:43,607][INFO ][o.e.n.Node               ] [slaver2] version[7.2.1], pid[10143], build[default/tar/fe6cb20/2019-07-24T17:58:29.979462Z], OS[Linux/3.10.0-1160.el7.x86_64/amd64], JVM[Oracle Corporation/Java HotSpot(TM) 64-Bit Server VM/1.8.0_281/25.281-b09]
 7 [2021-03-23T15:13:43,610][INFO ][o.e.n.Node               ] [slaver2] JVM home [/usr/local/soft/jdk1.8.0_281/jre]
 8 [2021-03-23T15:13:43,612][INFO ][o.e.n.Node               ] [slaver2] JVM arguments [-Xms1g, -Xmx1g, -XX:+UseConcMarkSweepGC, -XX:CMSInitiatingOccupancyFraction=75, -XX:+UseCMSInitiatingOccupancyOnly, -Des.networkaddress.cache.ttl=60, -Des.networkaddress.cache.negative.ttl=10, -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-6519446121284753262, -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, -Dio.netty.allocator.type=unpooled, -XX:MaxDirectMemorySize=536870912, -Des.path.home=/usr/local/soft/elasticsearch-7.2.1, -Des.path.conf=/usr/local/soft/elasticsearch-7.2.1/config, -Des.distribution.flavor=default, -Des.distribution.type=tar, -Des.bundled_jdk=true]
 9 [2021-03-23T15:13:49,428][INFO ][o.e.p.PluginsService     ] [slaver2] loaded module [aggs-matrix-stats]
10 [2021-03-23T15:13:49,429][INFO ][o.e.p.PluginsService     ] [slaver2] loaded module [analysis-common]
11 [2021-03-23T15:13:49,431][INFO ][o.e.p.PluginsService     ] [slaver2] loaded module [data-frame]
12 [2021-03-23T15:13:49,433][INFO ][o.e.p.PluginsService     ] [slaver2] loaded module [ingest-common]
13 [2021-03-23T15:13:49,434][INFO ][o.e.p.PluginsService     ] [slaver2] loaded module [ingest-geoip]
14 [2021-03-23T15:13:49,435][INFO ][o.e.p.PluginsService     ] [slaver2] loaded module [ingest-user-agent]
15 [2021-03-23T15:13:49,435][INFO ][o.e.p.PluginsService     ] [slaver2] loaded module [lang-expression]
16 [2021-03-23T15:13:49,436][INFO ][o.e.p.PluginsService     ] [slaver2] loaded module [lang-mustache]
17 [2021-03-23T15:13:49,438][INFO ][o.e.p.PluginsService     ] [slaver2] loaded module [lang-painless]
18 [2021-03-23T15:13:49,439][INFO ][o.e.p.PluginsService     ] [slaver2] loaded module [mapper-extras]
19 [2021-03-23T15:13:49,441][INFO ][o.e.p.PluginsService     ] [slaver2] loaded module [parent-join]
20 [2021-03-23T15:13:49,443][INFO ][o.e.p.PluginsService     ] [slaver2] loaded module [percolator]
21 [2021-03-23T15:13:49,445][INFO ][o.e.p.PluginsService     ] [slaver2] loaded module [rank-eval]
22 [2021-03-23T15:13:49,446][INFO ][o.e.p.PluginsService     ] [slaver2] loaded module [reindex]
23 [2021-03-23T15:13:49,447][INFO ][o.e.p.PluginsService     ] [slaver2] loaded module [repository-url]
24 [2021-03-23T15:13:49,448][INFO ][o.e.p.PluginsService     ] [slaver2] loaded module [transport-netty4]
25 [2021-03-23T15:13:49,448][INFO ][o.e.p.PluginsService     ] [slaver2] loaded module [x-pack-ccr]
26 [2021-03-23T15:13:49,448][INFO ][o.e.p.PluginsService     ] [slaver2] loaded module [x-pack-core]
27 [2021-03-23T15:13:49,449][INFO ][o.e.p.PluginsService     ] [slaver2] loaded module [x-pack-deprecation]
28 [2021-03-23T15:13:49,449][INFO ][o.e.p.PluginsService     ] [slaver2] loaded module [x-pack-graph]
29 [2021-03-23T15:13:49,449][INFO ][o.e.p.PluginsService     ] [slaver2] loaded module [x-pack-ilm]
30 [2021-03-23T15:13:49,450][INFO ][o.e.p.PluginsService     ] [slaver2] loaded module [x-pack-logstash]
31 [2021-03-23T15:13:49,450][INFO ][o.e.p.PluginsService     ] [slaver2] loaded module [x-pack-ml]
32 [2021-03-23T15:13:49,450][INFO ][o.e.p.PluginsService     ] [slaver2] loaded module [x-pack-monitoring]
33 [2021-03-23T15:13:49,451][INFO ][o.e.p.PluginsService     ] [slaver2] loaded module [x-pack-rollup]
34 [2021-03-23T15:13:49,451][INFO ][o.e.p.PluginsService     ] [slaver2] loaded module [x-pack-security]
35 [2021-03-23T15:13:49,452][INFO ][o.e.p.PluginsService     ] [slaver2] loaded module [x-pack-sql]
36 [2021-03-23T15:13:49,456][INFO ][o.e.p.PluginsService     ] [slaver2] loaded module [x-pack-watcher]
37 [2021-03-23T15:13:49,460][INFO ][o.e.p.PluginsService     ] [slaver2] no plugins loaded
38 [2021-03-23T15:13:59,813][INFO ][o.e.x.s.a.s.FileRolesStore] [slaver2] parsed [0] roles from file [/usr/local/soft/elasticsearch-7.2.1/config/roles.yml]
39 [2021-03-23T15:14:01,757][INFO ][o.e.x.m.p.l.CppLogMessageHandler] [slaver2] [controller/10234] [Main.cc@110] controller (64 bit): Version 7.2.1 (Build 4ad685337be7fd) Copyright (c) 2019 Elasticsearch BV
40 [2021-03-23T15:14:03,624][DEBUG][o.e.a.ActionModule       ] [slaver2] Using REST wrapper from plugin org.elasticsearch.xpack.security.Security
41 [2021-03-23T15:14:05,122][INFO ][o.e.d.DiscoveryModule    ] [slaver2] using discovery type [zen] and seed hosts providers [settings]
42 [2021-03-23T15:14:09,123][INFO ][o.e.n.Node               ] [slaver2] initialized
43 [2021-03-23T15:14:09,125][INFO ][o.e.n.Node               ] [slaver2] starting ...
44 [2021-03-23T15:14:09,472][INFO ][o.e.t.TransportService   ] [slaver2] publish_address {192.168.110.135:9300}, bound_addresses {192.168.110.135:9300}
45 [2021-03-23T15:14:09,504][INFO ][o.e.b.BootstrapChecks    ] [slaver2] bound or publishing to a non-loopback address, enforcing bootstrap checks
46 ERROR: [1] bootstrap checks failed
47 [1]: 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
48 [2021-03-23T15:14:09,550][INFO ][o.e.n.Node               ] [slaver2] stopping ...
49 [2021-03-23T15:14:09,627][INFO ][o.e.n.Node               ] [slaver2] stopped
50 [2021-03-23T15:14:09,629][INFO ][o.e.n.Node               ] [slaver2] closing ...
51 [2021-03-23T15:14:09,681][INFO ][o.e.n.Node               ] [slaver2] closed
52 [2021-03-23T15:14:09,690][INFO ][o.e.x.m.p.NativeController] [slaver2] Native controller process has stopped - no new native processes can be started

Solution:

In the config directory of elasticsearch, modify the elasticsearch.yml configuration file and add the following configuration to the configuration file:

1 ip replace host1, etc., multiple nodes please add more than one ip address, single node can be written by default to
2 # configure the following three, at least one of them #[discovery.seed_hosts, discovery.seed_providers, cluster.initial_master_nodes]
3 #cluster.initial_master_nodes: ["node-1", "node-2"]
4 cluster.initial_master_nodes: ["192.168.110.135"]

[Solved] Spring cloud load balancing, error: no instances available for localhost

In the spring cloud ribbon load balancing project, an error is reported: no instances available for localhost, as follows:

java.lang.IllegalStateException: Request URI does not contain a valid hostname: http://CHENYL_PROVIDER/getAll
	at org.springframework.util.Assert.state(Assert.java:73) ~[spring-core-5.1.6.RELEASE.jar:5.1.6.RELEASE]
	at org.springframework.cloud.client.loadbalancer.LoadBalancerInterceptor.intercept(LoadBalancerInterceptor.java:56) ~[spring-cloud-commons-2.1.1.RELEASE.jar:2.1.1.RELEASE]
	at org.springframework.http.client.InterceptingClientHttpRequest$InterceptingRequestExecution.execute(InterceptingClientHttpRequest.java:92) ~[spring-web-5.1.6.RELEASE.jar:5.1.6.RELEASE]
	at org.springframework.http.client.InterceptingClientHttpRequest.executeInternal(InterceptingClientHttpRequest.java:76) ~[spring-web-5.1.6.RELEASE.jar:5.1.6.RELEASE]
	at org.springframework.http.client.AbstractBufferingClientHttpRequest.executeInternal(AbstractBufferingClientHttpRequest.java:48) ~[spring-web-5.1.6.RELEASE.jar:5.1.6.RELEASE]
	at org.springframework.http.client.AbstractClientHttpRequest.execute(AbstractClientHttpRequest.java:53) ~[spring-web-5.1.6.RELEASE.jar:5.1.6.RELEASE]
	at org.springframework.web.client.RestTemplate.doExecute(RestTemplate.java:735) ~[spring-web-5.1.6.RELEASE.jar:5.1.6.RELEASE]
	at org.springframework.web.client.RestTemplate.execute(RestTemplate.java:670) ~[spring-web-5.1.6.RELEASE.jar:5.1.6.RELEASE]
	at org.springframework.web.client.RestTemplate.getForObject(RestTemplate.java:311) ~[spring-web-5.1.6.RELEASE.jar:5.1.6.RELEASE]
	at com.my_consumer.controller.MyController.getAllFromProvider(MyController.java:20) ~[classes/:na]
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_11]
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_11]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_11]
	at java.lang.reflect.Method.invoke(Method.java:483) ~[na:1.8.0_11]
	at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:189) ~[spring-web-5.1.6.RELEASE.jar:5.1.6.RELEASE]
	at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:138) ~[spring-web-5.1.6.RELEASE.jar:5.1.6.RELEASE]
	at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:102) ~[spring-webmvc-5.1.6.RELEASE.jar:5.1.6.RELEASE]
	at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:892) ~[spring-webmvc-5.1.6.RELEASE.jar:5.1.6.RELEASE]
	at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:797) ~[spring-webmvc-5.1.6.RELEASE.jar:5.1.6.RELEASE]
	at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87) ~[spring-webmvc-5.1.6.RELEASE.jar:5.1.6.RELEASE]
	at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1038) ~[spring-webmvc-5.1.6.RELEASE.jar:5.1.6.RELEASE]
	at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:942) ~[spring-webmvc-5.1.6.RELEASE.jar:5.1.6.RELEASE]
	at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1005) ~[spring-webmvc-5.1.6.RELEASE.jar:5.1.6.RELEASE]
	at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:897) ~[spring-webmvc-5.1.6.RELEASE.jar:5.1.6.RELEASE]
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:634) ~[tomcat-embed-core-9.0.17.jar:9.0.17]
	at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:882) ~[spring-webmvc-5.1.6.RELEASE.jar:5.1.6.RELEASE]
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:741) ~[tomcat-embed-core-9.0.17.jar:9.0.17]
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231) ~[tomcat-embed-core-9.0.17.jar:9.0.17]
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-9.0.17.jar:9.0.17]
	at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53) ~[tomcat-embed-websocket-9.0.17.jar:9.0.17]
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[tomcat-embed-core-9.0.17.jar:9.0.17]
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-9.0.17.jar:9.0.17]
	at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:99) ~[spring-web-5.1.6.RELEASE.jar:5.1.6.RELEASE]
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) ~[spring-web-5.1.6.RELEASE.jar:5.1.6.RELEASE]
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[tomcat-embed-core-9.0.17.jar:9.0.17]
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-9.0.17.jar:9.0.17]
	at org.springframework.web.filter.FormContentFilter.doFilterInternal(FormContentFilter.java:92) ~[spring-web-5.1.6.RELEASE.jar:5.1.6.RELEASE]
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) ~[spring-web-5.1.6.RELEASE.jar:5.1.6.RELEASE]
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[tomcat-embed-core-9.0.17.jar:9.0.17]
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-9.0.17.jar:9.0.17]
	at org.springframework.web.filter.HiddenHttpMethodFilter.doFilterInternal(HiddenHttpMethodFilter.java:93) ~[spring-web-5.1.6.RELEASE.jar:5.1.6.RELEASE]
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) ~[spring-web-5.1.6.RELEASE.jar:5.1.6.RELEASE]
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[tomcat-embed-core-9.0.17.jar:9.0.17]
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-9.0.17.jar:9.0.17]
	at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:200) ~[spring-web-5.1.6.RELEASE.jar:5.1.6.RELEASE]
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) ~[spring-web-5.1.6.RELEASE.jar:5.1.6.RELEASE]
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[tomcat-embed-core-9.0.17.jar:9.0.17]
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-9.0.17.jar:9.0.17]
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:200) ~[tomcat-embed-core-9.0.17.jar:9.0.17]
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96) [tomcat-embed-core-9.0.17.jar:9.0.17]
	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:490) [tomcat-embed-core-9.0.17.jar:9.0.17]
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:139) [tomcat-embed-core-9.0.17.jar:9.0.17]
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92) [tomcat-embed-core-9.0.17.jar:9.0.17]
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74) [tomcat-embed-core-9.0.17.jar:9.0.17]
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343) [tomcat-embed-core-9.0.17.jar:9.0.17]
	at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:408) [tomcat-embed-core-9.0.17.jar:9.0.17]
	at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66) [tomcat-embed-core-9.0.17.jar:9.0.17]
	at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:834) [tomcat-embed-core-9.0.17.jar:9.0.17]
	at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1415) [tomcat-embed-core-9.0.17.jar:9.0.17]

Service provider’s profile:

spring:
  datasource:
    username: root
    password: sj18927073362
    url: jdbc:mysql://localhost:3306/chenyl?serverTimezone=UTC&useUnicode=true&characterEncoding=utf-8
    driver-class-name: com.mysql.cj.jdbc.Driver
  application:
    name: chenyl_provider


mybatis:
  type-aliases-package: com.my_provider.pojo
  mapper-locations: classpath:mapper/*.xml

server:
  port: 8001


# Eureka Configuration: Configure the service registry address
eureka:
  instance:
    instance-id: chenyl
    hostname: localhost
  client:
    register-with-eureka: true
    fetch-registry: true
    service-url:
      defaultZone: http://localhost:7002/eureka/,http://localhost:7001/eureka/

info:
  app.name: chenyl-springcloud
  company.name:

Service consumer profile:

# Eureka Configuration: Configure the service registry address
eureka:
  instance:
    instance-id: chenyl
    hostname: localhost
  client:
    register-with-eureka: true
    fetch-registry: true
    service-url:
      defaultZone: http://localhost:7002/eureka/,http://localhost:7001/eureka/

info:
  app.name: chenyl-springcloud
  company.name: xxx

Configuration class of service consumer

@Configuration
public class RestConfig {
    @Bean
    @LoadBalanced
    public RestTemplate restTemplate(){
        return new RestTemplate();
    }
}

Service consumer interface

@RestController
public class MyController {

    @Autowired
    RestTemplate restTemplate;

    private static final String REST_URL_PREFIX = "http://localhost:8001";

    @RequestMapping("/cGet")
    public Object getAllFromProvider(){
        List object = restTemplate.getForObject(REST_URL_PREFIX + "/getAll", List.class);
        return object;
    }
}

When running, no instances available for localhost reports an error. Through research, it is found that the reason lies in the annotation of the configuration class: @ loadbalanced
after adding this annotation, you should use the service name instead of the IP address. After all, it is load balancing for multiple servers. It is meaningless to use the IP address to access. So I changed the URL prefix to:

private static final String REST_URL_PREFIX = "http://CHENYL_PROVIDER";

However, such an error occurs: request URI does not contain a valid hostname: http://CHENYL_PROVIDER。 This is another pit
after checking the data on the Internet, it is found that the reason is: the service name cannot be underlined, otherwise the specific address cannot be resolved