error:listcollections failed: {"note": "From ExecCommand", "OK": 0, "ErrMsg" : ' Not master '} at
Error ( Proof from the library is not writable, default is unreadable, need to execute rs.slaveok (), or Db.getmongo (). Setslaveok (), and only valid for the current session, so each connection from the library needs to be executed. Five, fault testing and solutions1.master Downtime1) shut down the master$ MONGO
MongoDB shell version:3.0.6
connecting to:test
> Use admin;
Switched to DB admi
range {global, local }. The default value is global -- memory-hugetlb = [on | off. The default value is off -- memory-memory = STRING memory operation type. {Read, write, none}: The default value is write -- memory-access-mode = STRING memory access mode {seq, rnd}. The default value is seq.
#Sysbench -- test = threads help-- Thread-yields = N: The number of threads each request generates. The default value is 1000 -- thread-locks = N. The number of locks for each thread. The def
propagation phase interrupts replication for network reasons, but re-connects to the primary server via automatic reconnection from the server and continues to replicate the primary server.
For initial replication, the legacy replication feature works well, but for re-copying after a wire break, the Legacy replication feature allows the master and slave servers to return to a consistent state, but is inefficient.We give an example to illustrate:From the server finally
.
Registering slave on master
Determine a transient status after the master node is connected.
Requesting binlog dump
Determine a transient status after the master node is connected. This thread sends a request to the master to inform it of the binary file to be requested and the starting position.
Waiting to reconnect after a failed binlog dump request
If a binary log dump request fails (due to disconnection), the thread enters this state during slee
setting the reconnection attribute, such as whether to reconnect or not.
4. Request distribution: distribute request messages to independent threads and automatically call the method of the application module for processing.
5. Statistics and management: You can query the statistics of the TCP Service Module. You can also use SNMP and JMX to control the status of TCP connections, such as enabling or disabling TCP connections. Thread allocation
T
on master
Determine a transient status after the master node is connected.
Requesting binlog dump
Determine a transient status after the master node is connected. This thread sends a request to the master to inform it of the binary file to be requested and the starting position.
Waiting to reconnect after a failed binlog dump request
If a binary log dump Request fails (due to disconnection), the thread enters this state during sleep and reconn
the data sent by a pin does not reduce the preview rate of the captured pin. capturing a pin has a higher priority than previewing a pin.Capture pin and preview pin must send data in the same format. In this way, they are connected through the same media data type. If the pin is captured first, the preview pin should provide the same media type, and reject other data media types. If the preview pin is connected first, if the capture pin is connected to another media type, the preview pin should
default write -- memory-access-mode = STRING storage access mode {seq, rnd} is seq # sysbench -- test = threads help -- thread-yields = N. the number of threads each request generates. The default value is 1000 -- thread-locks = N. the number of locks for each thread. The default value is 8 # sysbench -- test = mutex help -- mutex-num = the total size of the N array mutex. The default value is 4096 -- mutex-locks = N. the number of mutex locks for each thread. The default value is 50000 -- mute
. This thread sends a request to the master to inform it of the binary file to be requested and the starting position.
Waiting
To
Reconnect
After
A
Failed
Binlog
Dump
Request
If binary log dump (binary
Log
Dump) if the request fails (due to disconnection), the thread enters this state during sleep and reconnects regularly. The reconnection interval is
--
Master-connect-retry
Option.
Reconnecting
After
A
Failed
Binlog
Dump
Request
This thread is trying
the remote address.
(2) register the socketchannel to the poller of the IO thread and set the connect event.
(3) what to do for the callback of the connect event is to cancel the registration of the socketchannel on the poeller object, and then create a new streamengine object to wrap the socketchannel, then, associate the streamEngine object with the session object ..
Here, let's take a look at what the connect Event Callback method has done:
// Connection established Event Callback may also
= mutex help-Mutex-num = the total size of the N Array mutex. The default value is 4096.-Mutex-locks = N the number of mutex locks for each thread. The default value is 50000.-Mutex-loops = N: number of empty cycles of internal mutex locks. The default value is 10000.
[Root @ localhost bin] #./sysbench-test = oltp helpOltp options:-Oltp-test-mode = STRING Execution mode {simple, complex (advanced transactional), nontrx (non-transactional), sp }. The default value is complex.-Oltp-
Small Series Summary: If you hit the WiFi password correct phone can not even, the other people are normal problems we first look at the small set their own sharing method, restart the phone if not, the current WiFi delete, and then reconnect the input password can generally be resolved.
Method 1:
Settings-General-wlan-turns off WLAN functionality, turns it off and then turns it back on and then reconn
sends a request to the primary server to request the contents of the binary log starting from the requested binary log file name and location.Waiting to reconnect after a failed Binlog dump requestIf the binary log dump request fails (because there is no connection), the thread goes to sleep and then periodically tries to reconnect. You can use the –master-connect-retry option to specify the interval betwe
From:http://itindex.net/detail/54161-netty-clientWhen we implement a TCP client with Netty, we certainly hope that Netty can reconnect automatically when the connection is broken.Netty client needs to be re-connected in two cases:
Netty client needs to be re-connected when booting
Reconnection is required when the program is running.
For the first case, the author of Netty the solution on StackOverflow,For the second case, a solution
|| wait_timeout | 28800 |+----------------------------+-------+10 rows in set (0.00 sec)
It is found that the minimum timeout time is 10 s, and the execution of my program is obviously not 10 s. Because I have checked the related error, it is estimated that this is probably another error: 2006, MySQL server has gone away. Now it should be okay with the time-out period. then, try to test through MySQLdb ping. if an exception is caught, reconnect
14.14 Distrib 5.1.73, for redhat-linux-gnu (i386) using readline 5.1Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.Oracle is a registered trademark of Oracle Corporation and/or itsaffiliates. Other names may be trademarks of their respectiveowners.Usage: mysql [OPTIONS] [database] -?, --help Display this help and exit. -I, --help Synonym for -? --auto-rehash Enable automatic rehashing. One doesn't need to use 'rehash'
[C # source code] TCP-based client Reconnection,
Source code download
In the CS program, reconnection is a common feature.
The reconnection here mainly refers to the restart of the server program or system due to a certain fault. The client can automatically detect a disconnection from the server and try to connect again.
This program is based on networkcomms (2.3.1) from the open-source c # communication framework in the UK)
First look at the effect
Initial status:
When the server program is c
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.