Tag Archives: problem analysis

This limit can be set by changing the [search.max_open_scroll_context] setting

[2021-07-16T08:57:41,025][WARN ][r.suppressed             ] [CNHQ-20018523N] path: /.kibana_task_manager/_update_by_query, params: {ignore_unavailable=true, refresh=true, conflicts=proceed, index=.kibana_task_manager}
org.elasticsearch.action.search.SearchPhaseExecutionException: all shards failed
at org.elasticsearch.action.search.AbstractSearchAsyncAction.onPhaseFailure(AbstractSearchAsyncAction.java:661) [elasticsearch-7.13.3.jar:7.13.3]
at org.elasticsearch.action.search.AbstractSearchAsyncAction.executeNextPhase(AbstractSearchAsyncAction.java:384) [elasticsearch-7.13.3.jar:7.13.3]
at org.elasticsearch.action.search.AbstractSearchAsyncAction.onPhaseDone(AbstractSearchAsyncAction.java:694) [elasticsearch-7.13.3.jar:7.13.3]
at org.elasticsearch.action.search.AbstractSearchAsyncAction.onShardFailure(AbstractSearchAsyncAction.java:467) [elasticsearch-7.13.3.jar:7.13.3]
at org.elasticsearch.action.search.AbstractSearchAsyncAction.access$000(AbstractSearchAsyncAction.java:62) [elasticsearch-7.13.3.jar:7.13.3]
at org.elasticsearch.action.search.AbstractSearchAsyncAction$1.onFailure(AbstractSearchAsyncAction.java:316) [elasticsearch-7.13.3.jar:7.13.3]
at org.elasticsearch.action.ActionListener$Delegating.onFailure(ActionListener.java:66) [elasticsearch-7.13.3.jar:7.13.3]
at org.elasticsearch.action.ActionListenerResponseHandler.handleException(ActionListenerResponseHandler.java:48) [elasticsearch-7.13.3.jar:7.13.3]
at org.elasticsearch.action.search.SearchTransportService$ConnectionCountingHandler.handleException(SearchTransportService.java:400) [elasticsearch-7.13.3.jar:7.13.3]
at org.elasticsearch.transport.TransportService$5.handleException(TransportService.java:738) [elasticsearch-7.13.3.jar:7.13.3]
at org.elasticsearch.transport.TransportService$ContextRestoreResponseHandler.handleException(TransportService.java:1283) [elasticsearch-7.13.3.jar:7.13.3]
at org.elasticsearch.transport.TransportService$DirectResponseChannel.processException(TransportService.java:1392) [elasticsearch-7.13.3.jar:7.13.3]
at org.elasticsearch.transport.TransportService$DirectResponseChannel.sendResponse(TransportService.java:1366) [elasticsearch-7.13.3.jar:7.13.3]
at org.elasticsearch.transport.TaskTransportChannel.sendResponse(TaskTransportChannel.java:50) [elasticsearch-7.13.3.jar:7.13.3]
at org.elasticsearch.transport.TransportChannel.sendErrorResponse(TransportChannel.java:45) [elasticsearch-7.13.3.jar:7.13.3]
at org.elasticsearch.action.support.ChannelActionListener.onFailure(ChannelActionListener.java:40) [elasticsearch-7.13.3.jar:7.13.3]
at org.elasticsearch.action.ActionRunnable.onFailure(ActionRunnable.java:77) [elasticsearch-7.13.3.jar:7.13.3]
at org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingAbstractRunnable.onFailure(ThreadContext.java:720) [elasticsearch-7.13.3.jar:7.13.3]
at org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:28) [elasticsearch-7.13.3.jar:7.13.3]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [?:1.8.0_131]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [?:1.8.0_131]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_131]
Caused by: org.elasticsearch.ElasticsearchException: Trying to create too many scroll contexts. Must be less than or equal to: [500]. This limit can be set by changing the [search.max_open_scroll_context] setting.
at org.elasticsearch.search.SearchService.createAndPutReaderContext(SearchService.java:676) ~[elasticsearch-7.13.3.jar:7.13.3]
at org.elasticsearch.search.SearchService.createOrGetReaderContext(SearchService.java:661) ~[elasticsearch-7.13.3.jar:7.13.3]
at org.elasticsearch.search.SearchService.executeQueryPhase(SearchService.java:434) ~[elasticsearch-7.13.3.jar:7.13.3]
at org.elasticsearch.search.SearchService.lambda$executeQueryPhase$2(SearchService.java:411) ~[elasticsearch-7.13.3.jar:7.13.3]
at org.elasticsearch.action.ActionRunnable.lambda$supply$0(ActionRunnable.java:47) ~[elasticsearch-7.13.3.jar:7.13.3]
at org.elasticsearch.action.ActionRunnable$2.doRun(ActionRunnable.java:62) ~[elasticsearch-7.13.3.jar:7.13.3]
at org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingAbstractRunnable.doRun(ThreadContext.java:732) ~[elasticsearch-7.13.3.jar:7.13.3]
at org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:26) ~[elasticsearch-7.13.3.jar:7.13.3] 

Solution:
http://localhost:9200/_cluster/settings
Set the value of the variable: search.max_open_scroll_context

{

"persistent": {

    "search.max_open_scroll_context": 5000

},

"transient": {

    "search.max_open_scroll_context": 5000

}

}

[Solved] nested exception is com.alibaba.dubbo.rpc.RpcException: Failed t o invoke the method findPage

When calling the background interface, the code reported the following error:

Warning: Servlet.service() for servlet [springmvc] in context with path [] threw exception [Request processing failed; nested exception is com.alibaba.dubbo.rpc.RpcException: Failed t
o invoke the method findPage in the service com.service.BrandService. Tried 3 times of the providers [172.16.94.115:20881] (1/1) from the registry 192.168.25.129:2181 on the consum
er 172.16.94.115 using the dubbo version 2.8.4. Last error is: Invoke remote method timeout. method: findPage, provider: dubbo://172.16.94.115:20881/com.service.BrandService?anyhos
t=true&application=tystore-manager-web&check=false&dubbo=2.8.4&generic=false&interface=com.service.BrandService&methods=add,findById,update,findPage,delete,findAll&pid=15116&revisi
on=1.0-SNAPSHOT&side=consumer&timestamp=1624929883885, cause: Waiting server-side response timeout. start time: 2021-06-29 09:25:49.385, end time: 2021-06-29 09:25:50.386, client e
lapsed: 0 ms, server elapsed: 1001 ms, timeout: 1000 ms, request: Request [id=17, version=2.0.0, twoway=true, event=false, broken=false, data=RpcInvocation [methodName=findPage, pa
rameterTypes=[class com.pojo.TbBrand, class java.lang.Integer, class java.lang.Integer], arguments=[com.pojo.TbBrand@7268b2f8, 1, 10], attachments={path=com.service.BrandService, i
nterface=com.service.BrandService, version=0.0.0}]], channel: /172.16.94.115:53263 -> /172.16.94.115:20881] with root cause
com.alibaba.dubbo.remoting.TimeoutException: Waiting server-side response timeout. start time: 2021-06-29 09:25:49.385, end time: 2021-06-29 09:25:50.386, client elapsed: 0 ms, ser
ver elapsed: 1001 ms, timeout: 1000 ms, request: Request [id=17, version=2.0.0, twoway=true, event=false, broken=false, data=RpcInvocation [methodName=findPage, parameterTypes=[cla
ss com.pojo.TbBrand, class java.lang.Integer, class java.lang.Integer], arguments=[com.pojo.TbBrand@7268b2f8, 1, 10], attachments={path=com.service.BrandService, interface=com.serv
ice.BrandService, version=0.0.0}]], channel: /172.16.94.115:53263 -> /172.16.94.115:20881

After checking the following:

    1. POJO serializes local IP and service ipdubbo running state, and closes firewall

The final reason is that the server performance is not enough, the response time is long, and the automatic timeout.

@Service(
        interfaceName = "com.service.BrandService",
        timeout = 600000)

After setting the timeout on the service, it will be normal.

Max virtual memory areas vm.max_map_count [65530] is too low, increase to at least 

[2021-05-03T11:54:49,018][INFO ][o.e.p.PluginsService     ] [search-node1] loaded plugin [ingest-geoip]
[2021-05-03T11:54:49,018][INFO ][o.e.p.PluginsService     ] [search-node1] loaded plugin [ingest-user-agent]
[2021-05-03T11:54:52,096][INFO ][o.e.x.s.a.s.FileRolesStore] [search-node1] parsed [0] roles from file [/usr/share/elasticsearch/config/roles.yml]
[2021-05-03T11:54:52,684][INFO ][o.e.x.m.p.l.CppLogMessageHandler] [search-node1] [controller/89] [Main.cc@109] controller (64 bit): Version 6.6.1 (Build a033f1b9679cab) Copyright (c) 2019 Elasticsearch BV
[2021-05-03T11:54:53,296][INFO ][o.e.d.DiscoveryModule    ] [search-node1] using discovery type [zen] and host providers [settings]
[2021-05-03T11:54:53,875][INFO ][o.e.n.Node               ] [search-node1] initialized
[2021-05-03T11:54:53,875][INFO ][o.e.n.Node               ] [search-node1] starting ...
[2021-05-03T11:54:54,067][INFO ][o.e.t.TransportService   ] [search-node1] publish_address {192.168.0.108:9300}, bound_addresses {0.0.0.0:9300}
[2021-05-03T11:54:54,091][INFO ][o.e.b.BootstrapChecks    ] [search-node1] bound or publishing to a non-loopback address, enforcing bootstrap checks
ERROR: [1] bootstrap checks failed
[1]: max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]
[2021-05-03T11:54:54,115][INFO ][o.e.n.Node               ] [search-node1] stopping ...
[2021-05-03T11:54:54,140][INFO ][o.e.n.Node               ] [search-node1] stopped
[2021-05-03T11:54:54,140][INFO ][o.e.n.Node               ] [search-node1] closing ...
[2021-05-03T11:54:54,154][INFO ][o.e.n.Node               ] [search-node1] closed
[2021-05-03T11:54:54,156][INFO ][o.e.x.m.p.NativeController] [search-node1] Native controller process has stopped - no new native processes can be started

ERROR: [1] bootstrap checks failed
[1]: max virtual memory areas vm.max_map_count [65530] is too low, increase to at least

 

Solution.

Add a line to the end of the /etc/sysctl.conf file
vm.max_map_count=262144
Run /sbin/sysctl -p to take effect immediately

Solution to abnormal errors during startup of Python’s Anaconda

Anaconda
A very good Python distribution.
Question raising
One day, suddenly found that after starting Spyder, has been in Connecting to Kernel, Loading endless, in essence is not connected.
when IPython is started, the following error message is reported:

ERROR:tornado.general:Uncaught exception in ZMQStream callback
Traceback (most recent call last):
File "d:\ProgramData\Anaconda3\lib\site-packages\zmq\eventloop\zmqstream.py", line 432, in _run_callback
callback(*args, **kwargs)
File "d:\ProgramData\Anaconda3\lib\site-packages\tornado\stack_context.py", line 277, in null_wrapper
return fn(*args, **kwargs)
File "d:\ProgramData\Anaconda3\lib\site-packages\ipykernel\kernelbase.py", line 283, in dispatcher
return self.dispatch_shell(stream, msg)
File "d:\ProgramData\Anaconda3\lib\site-packages\ipykernel\kernelbase.py", line 233, in dispatch_shell
self.pre_handler_hook()
File "d:\ProgramData\Anaconda3\lib\site-packages\ipykernel\kernelbase.py", line 248, in pre_handler_hook
self.saved_sigint_handler = signal(SIGINT, default_int_handler)
File "d:\ProgramData\Anaconda3\lib\signal.py", line 47, in signal
handler = _signal.signal(_enum_to_int(signalnum), _enum_to_int(handler))
ValueError: signal only works in main thread
ERROR:tornado.general:Uncaught exception in zmqstream callback
Traceback (most recent call last):
File "d:\ProgramData\Anaconda3\lib\site-packages\zmq\eventloop\zmqstream.py", line 450, in _handle_events
self._handle_recv()
File "d:\ProgramData\Anaconda3\lib\site-packages\zmq\eventloop\zmqstream.py", line 480, in _handle_recv
self._run_callback(callback, msg)
File "d:\ProgramData\Anaconda3\lib\site-packages\zmq\eventloop\zmqstream.py", line 432, in _run_callback
callback(*args, **kwargs)
File "d:\ProgramData\Anaconda3\lib\site-packages\tornado\stack_context.py", line 277, in null_wrapper
return fn(*args, **kwargs)
File "d:\ProgramData\Anaconda3\lib\site-packages\ipykernel\kernelbase.py", line 283, in dispatcher
return self.dispatch_shell(stream, msg)
File "d:\ProgramData\Anaconda3\lib\site-packages\ipykernel\kernelbase.py", line 233, in dispatch_shell
self.pre_handler_hook()
File "d:\ProgramData\Anaconda3\lib\site-packages\ipykernel\kernelbase.py", line 248, in pre_handler_hook
self.saved_sigint_handler = signal(SIGINT, default_int_handler)
File "d:\ProgramData\Anaconda3\lib\signal.py", line 47, in signal
handler = _signal.signal(_enum_to_int(signalnum), _enum_to_int(handler))
ValueError: signal only works in main thread
ERROR:tornado.application:Exception in callback functools.partial(.null_wrapper at 0x0000000005B33488>)
Traceback (most recent call last):
File "d:\ProgramData\Anaconda3\lib\site-packages\tornado\ioloop.py", line 605, in _run_callback
ret = callback()
File "d:\ProgramData\Anaconda3\lib\site-packages\tornado\stack_context.py", line 277, in null_wrapper
return fn(*args, **kwargs)
File "d:\ProgramData\Anaconda3\lib\site-packages\zmq\eventloop\zmqstream.py", line 536, in 
self.io_loop.add_callback(lambda : self._handle_events(self.socket, 0))
File "d:\ProgramData\Anaconda3\lib\site-packages\zmq\eventloop\zmqstream.py", line 450, in _handle_events
self._handle_recv()
File "d:\ProgramData\Anaconda3\lib\site-packages\zmq\eventloop\zmqstream.py", line 480, in _handle_recv
self._run_callback(callback, msg)
File "d:\ProgramData\Anaconda3\lib\site-packages\zmq\eventloop\zmqstream.py", line 432, in _run_callback
callback(*args, **kwargs)
File "d:\ProgramData\Anaconda3\lib\site-packages\tornado\stack_context.py", line 277, in null_wrapper
return fn(*args, **kwargs)
File "d:\ProgramData\Anaconda3\lib\site-packages\ipykernel\kernelbase.py", line 283, in dispatcher
return self.dispatch_shell(stream, msg)
File "d:\ProgramData\Anaconda3\lib\site-packages\ipykernel\kernelbase.py", line 233, in dispatch_shell
self.pre_handler_hook()
File "d:\ProgramData\Anaconda3\lib\site-packages\ipykernel\kernelbase.py", line 248, in pre_handler_hook
self.saved_sigint_handler = signal(SIGINT, default_int_handler)
File "d:\ProgramData\Anaconda3\lib\signal.py", line 47, in signal
handler = _signal.signal(_enum_to_int(signalnum), _enum_to_int(handler))
ValueError: signal only works in main thread

Judging from the error message, it must be a version conflict for one of the packages.
Problem solving
After searching the Internet, I decided to try the following:

conda uninstall jupyter tornado

Solving environment: done


==> WARNING: A newer version of conda exists. <==
  current version: 4.4.6
  latest version: 4.5.9

Please update conda by running

    $ conda update -n base conda



## Package Plan ##

  environment location: D:\ProgramData\Anaconda3

  removed specs:
    - jupyter
    - tornado


The following packages will be REMOVED:

    anaconda-project: 0.8.0-py36h8b3bf89_0
    jupyter:          1.0.0-py36h422fd7e_2
    jupyter_console:  5.2.0-py36h6d89b47_1
    seaborn:          0.8.0-py36h62cb67c_0
    tornado:          4.5.3-py36_0

Proceed ([y]/n)?y

Preparing transaction: done
Verifying transaction: done
Executing transaction: done

After uninstalling, reinstall:

conda install jupyter tornado

The information output during installation is as follows:

Solving environment: done


==> WARNING: A newer version of conda exists. <==
  current version: 4.4.6
  latest version: 4.5.9

Please update conda by running

    $ conda update -n base conda



## Package Plan ##

  environment location: D:\ProgramData\Anaconda3

  added/updated specs:
    - jupyter
    - tornado


The following packages will be downloaded:

    package                    |            build
    ---------------------------|-----------------
    ipykernel-4.8.2            |           py36_0         146 KB
    ipywidgets-7.4.0           |           py36_0         150 KB
    jupyter_client-5.2.3       |           py36_0         188 KB
    nbconvert-5.3.1            |           py36_0         422 KB
    widgetsnbextension-3.4.0   |           py36_0         1.7 MB
    tornado-5.1                |   py36hfa6e2cd_0         669 KB
    jupyter-1.0.0              |           py36_5           6 KB
    jupyter_console-5.2.0      |           py36_1          53 KB
    ------------------------------------------------------------
                                           Total:         3.3 MB

The following NEW packages will be INSTALLED:

    jupyter:            1.0.0-py36_5
    jupyter_console:    5.2.0-py36_1
    tornado:            5.1-py36hfa6e2cd_0

The following packages will be UPDATED:

    ipykernel:          4.6.1-py36hbb77b34_0 --> 4.8.2-py36_0
    ipywidgets:         7.0.0-py36h2e74ada_0 --> 7.4.0-py36_0
    jupyter_client:     5.2.2-py36_0         --> 5.2.3-py36_0
    nbconvert:          5.3.1-py36h8dc0fde_0 --> 5.3.1-py36_0
    widgetsnbextension: 3.0.2-py36h364476f_1 --> 3.4.0-py36_0

Proceed ([y]/n)?y


Downloading and Extracting Packages
ipykernel 4.8.2: ################################################################
ipywidgets 7.4.0: ###############################################################
jupyter_client 5.2.3: ###########################################################
nbconvert 5.3.1: ################################################################
widgetsnbextension 3.4.0: #######################################################
tornado 5.1: ####################################################################
jupyter 1.0.0: ##################################################################
jupyter_console 5.2.0: ##########################################################
Preparing transaction: done
Verifying transaction: done
Executing transaction: done

conclusion
Often walk from the river, occasionally wet shoes, these tools will occasionally report errors, if there is a problem, just try to solve it.

Python’s importerror: DLL load failed: the specified module was not found and the problem was solved

environment description

Window 7, Python 3.6.5

problem description

, while importing based on python, reports the following error:

>> from PIL import Image
Traceback (most recent call last):
  File "<ipython-input-12-0f6709e38f49>", line 1, in <module>
    from PIL import Image

  File "d:\ProgramData\Anaconda3\lib\site-packages\PIL\Image.py", line 58, in <module>
    from . import _imaging as core

ImportError: DLL load failed: 找不到指定的模块。

sometimes, a similar error is reported:

>> from PIL import Image
Traceback (most recent call last):

  File "<ipython-input-13-0f6709e38f49>", line 1, in <module>
    from PIL import Image

ImportError: cannot import name 'Image'

problem analysis

such problems are generally when installing the library, the security is not complete, or the installed library is overwritten or broken, so the corresponding class library cannot be known.

problem solved

C:\Users\xxxx\>pip install Pillow
Requirement already satisfied: Pillow in d:\programdata\anaconda3\lib\site-packages (5.0.0)


C:\Users\xxxx>pip show Pillow
Name: Pillow
Version: 5.2.0
Summary: Python Imaging Library (Fork)
Home-page: http://python-pillow.org
Author: Alex Clark (Fork Author)
Author-email: [email protected]
License: Standard PIL License
Location: d:\programdata\anaconda3\lib\site-packages
Requires:
Required-by:

as you can see from the instructions above, the class library is already installed. But because it has a problem, it needs to be reinstalled.
uninstalls

first

pip uninstall Pillow

Uninstalling Pillow-5.0.0:
  Would remove:
    d:\programdata\anaconda3\lib\site-packages\pillow-5.0.0.dist-info\*
Proceed (y/n)?y
  Successfully uninstalled Pillow-5.0.0

and then reinstall :

pip install Pillow

Collecting Pillow
  Downloading https://files.pythonhosted.org/packages/1b/50/869910cd7110157fbefd0fed3db3656c1951f1bceecdd00e3716aa269609/Pillow-5.2.0-cp36-cp36m-win_amd64.whl (1.6MB)
    100% |████████████████████████████████| 1.6MB 69kB/s
Installing collected packages: Pillow
Successfully installed Pillow-5.2.0

validation

and then re-import the Image to see that everything is fine.

summary

if it has been installed but cannot be found, the high probability is that the installation is damaged and needs to be reinstalled.