CN109120432A - A kind of failed server localization method and device - Google Patents
A kind of failed server localization method and device Download PDFInfo
- Publication number
- CN109120432A CN109120432A CN201810791660.4A CN201810791660A CN109120432A CN 109120432 A CN109120432 A CN 109120432A CN 201810791660 A CN201810791660 A CN 201810791660A CN 109120432 A CN109120432 A CN 109120432A
- Authority
- CN
- China
- Prior art keywords
- server
- address
- code information
- corresponding relationship
- destination server
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L41/00—Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
- H04L41/06—Management of faults, events, alarms or notifications
- H04L41/0677—Localisation of faults
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Computer And Data Communications (AREA)
Abstract
The present invention provides a kind of failed server localization method and devices, belong to field of computer technology.Wherein, terminal can be first based on the inquiry request received, determine the IP address of at least one destination server, it is then based on the IP address of at least one destination server, obtain the information of currently running code on each destination server, obtain at least one comparison code information, then, obtain object code information, wherein, which is the information for the object code that terminal is destination server deployment, finally, it determines destination server corresponding with the unmatched comparison code information of object code information, obtains failed server.In this way, without establishing connection with each server respectively, terminal is based on autonomous obtain and compares code information base object code information, that is, can determine that whether the destination server is the server for occurring restarting unsuccessfully failure, it is lower to improve determining efficiency, reduces required cost.
Description
Technical field
The invention belongs to field of computer technology, more particularly to a kind of failed server localization method and device.
Background technique
With the continuous development of computer technology, user is more and more for the demand of network service, correspondingly, in order to full
The growing demand of sufficient user, Network Provider are often directed to the demand of user, increase new function for network service.Specifically
, when increasing new function for network service, new service code is often first developed based on new function, then by new industry
Business code is deployed on corresponding server, finally, control server is restarted, the new business so that server brings into operation
Code, and then finishing service code update.But it often will appear Server Restart failure in practical application, and then lead to portion
Administration's failure, so that the service code before still running on this part server, can not normally handle the request for new function.
Therefore, the problem of server that deployment failure failure occurs becomes people's extensive concern how is determined.
In the prior art, manually-operated mode is often used, is established one by one with each server by test terminal
Connection, and after connection is successfully established, test request is sent to the server, whether this can normally be handled based on server
Test request come judge the server whether deployment success, either, after connection is successfully established, pass through test terminal access
The server, based on the content of institute's accession page whether be the corresponding page of new service code judge the server whether portion
It affixes one's name to successfully.But due to including a large amount of server in network system, connection is established with server one by one and is surveyed
The mode of examination, efficiency is lower, and required cost is larger.
Summary of the invention
The present invention provides a kind of failed server localization method and device, occurs restarting unsuccessfully failure to solve determination
Server efficiency is lower, the larger problem of required cost.
According to the present invention in a first aspect, provide a kind of failed server localization method, be applied to terminal, this method packet
It includes:
Based on the inquiry request received, the IP address of at least one destination server is determined;
Based on the IP address of at least one destination server, currently running code on each destination server is obtained
Information, obtain at least one comparison code information;
Obtain object code information;The object code information is the target that the terminal is destination server deployment
The information of code;
It determines destination server corresponding with the unmatched comparison code information of the object code information, obtains failure clothes
Business device.
It optionally, include destination server attribute in the inquiry request, the destination server attribute includes that target is set
Set place and/or target service type;
Correspondingly, described based on the inquiry request received, determine the IP address of at least one destination server, comprising:
Extract the target set-up site in the inquiry request and/or the target service type;
From preset server database search it is corresponding with the target set-up site and/or with the target service class
The IP address of the corresponding server of type;
The IP address of the corresponding server is determined as to the IP address of destination server;
Wherein, the IP address of any server in network system is stored in the preset server database.
Optionally, described based on the inquiry request received, before the IP address for determining at least one destination server, institute
State method further include:
Based on any server in network system, the corresponding pass of the first corresponding relationship, the second corresponding relationship and third is established
System;
Based on first corresponding relationship, second corresponding relationship and the third corresponding relationship, generate described default
Server database;
Wherein, first corresponding relationship is between the IP address and the set-up site of the identical server of set-up site
Corresponding relationship, second corresponding relationship be the identical server of type of service provided IP address and the type of service
Between corresponding relationship, the third corresponding relationship is the IP of the identical server of type of service that set-up site is identical and provides
Corresponding relationship between address and the set-up site and the type of service.
It optionally, include the IP address of at least one server in the inquiry request;
Correspondingly, described based on the inquiry request received, determine the IP address of at least one destination server, comprising:
The IP address at least one server for including in the inquiry request is extracted, and will at least one described clothes
The IP address of business device is determined as the IP address of the destination server.
Optionally, in determination destination service corresponding with the unmatched comparison code information of the object code information
Device, after obtaining failed server, the method also includes:
The object code is redeployed for the failed server;
The information for obtaining currently running code in the failed server obtains current code information;
If the current code information and the object code information mismatch, maintenance prompting message is shown.
Second aspect according to the present invention provides a kind of failed server positioning device, which is applied to terminal, should
Device may include:
First determining module, for determining the IP address of at least one destination server based on the inquiry request received;
First acquisition module obtains each destination service for the IP address based at least one destination server
The information of currently running code on device obtains at least one comparison code information;
Second obtains module, for obtaining object code information;The object code information is that the terminal is the mesh
Mark the information of the object code of server disposition;
Second determining module, for determining target corresponding with the unmatched comparison code information of the object code information
Server obtains failed server.
It optionally, include destination server attribute in the inquiry request, the destination server attribute includes that target is set
Set place and/or target service type;
Correspondingly, first determining module, comprising:
Extracting sub-module, for extracting the target set-up site and/or the target service in the inquiry request
Type;
Search submodule, for from preset server database search it is corresponding with the target set-up site and/or
The IP address of server corresponding with the target service type;
Submodule is determined, for the IP address of the corresponding server to be determined as to the IP address of destination server;
Wherein, the IP address of any server in network system is stored in the preset server database.
Optionally, described device further include:
Module is established, for establishing the first corresponding relationship, the second corresponding relationship based on any server in network system
And third corresponding relationship;
Generation module, for being based on first corresponding relationship, second corresponding relationship and the third corresponding relationship,
Generate the preset server database;
Wherein, first corresponding relationship is between the IP address and the set-up site of the identical server of set-up site
Corresponding relationship, second corresponding relationship be the identical server of type of service provided IP address and the type of service
Between corresponding relationship, the third corresponding relationship is the IP of the identical server of type of service that set-up site is identical and provides
Corresponding relationship between address and the set-up site and the type of service.
It optionally, include the IP address of at least one server in the inquiry request;
Correspondingly, first determining module, is used for:
The IP address at least one server for including in the inquiry request is extracted, and will at least one described clothes
The IP address of business device is determined as the IP address of the destination server.
Optionally, described device further include:
Deployment module, for redeploying the object code for the failed server;
Third obtains module and obtains working as former generation for obtaining the information of currently running code in the failed server
Code information;
Display module shows that maintenance mentions if mismatching for the current code information and the object code information
Awake information.
The third aspect according to the present invention provides a kind of mobile terminal, comprising: processor, memory and is stored in institute
The failed server finder that can be run on memory and on the processor is stated, the failed server finder is by institute
State the step realized in the failed server localization method as described in first aspect when processor executes.
Fourth aspect according to the present invention provides a kind of computer readable storage medium, the computer-readable storage
It is stored with failed server finder on medium, such as first party is realized when which is executed by processor
Described in face the step of failed server localization method.
For first technology, the present invention has following advantage:
Terminal can determine the IP address of at least one destination server, then base first based on the inquiry request received
In the IP address of at least one destination server, the information of currently running code on each destination server is obtained, is obtained
At least one comparison code information then obtains object code information, wherein the object code information is that terminal takes for target
The information of the object code of business device deployment, finally, determining mesh corresponding with the unmatched comparison code information of object code information
Server is marked, failed server is obtained.In this way, without establishing connection with each server respectively, terminal is based on autonomous acquisition pair
Than code information base object code information, that is, can determine that whether the destination server is the service for occurring restarting unsuccessfully failure
Device, it is lower to improve determining efficiency, reduces required cost.
The above description is only an overview of the technical scheme of the present invention, in order to better understand the technical means of the present invention,
And it can be implemented in accordance with the contents of the specification, and in order to allow above and other objects of the present invention, feature and advantage can
It is clearer and more comprehensible, the followings are specific embodiments of the present invention.
Detailed description of the invention
By reading the following detailed description of the preferred embodiment, various other advantages and benefits are common for this field
Technical staff will become clear.The drawings are only for the purpose of illustrating a preferred embodiment, and is not considered as to the present invention
Limitation.And throughout the drawings, the same reference numbers will be used to refer to the same parts.In the accompanying drawings:
Fig. 1 is a kind of step flow chart for failed server localization method that the embodiment of the present invention one provides;
Fig. 2 is a kind of step flow chart of failed server localization method provided by Embodiment 2 of the present invention;
Fig. 3 is a kind of block diagram for failed server positioning device that the embodiment of the present invention three provides;
Fig. 4 is a kind of block diagram for failed server positioning device that the embodiment of the present invention four provides.
Specific embodiment
The exemplary embodiment that the present invention will be described in more detail below with reference to accompanying drawings.Although showing the present invention in attached drawing
Exemplary embodiment, it being understood, however, that may be realized in various forms the present invention without should be by embodiments set forth here
It is limited.It is to be able to thoroughly understand the present invention on the contrary, providing these embodiments, and can be by the scope of the present invention
It is fully disclosed to those skilled in the art.
Embodiment one
Fig. 1 is a kind of step flow chart for failed server localization method that the embodiment of the present invention one provides, and is applied to eventually
End, as shown in Figure 1, this method may include:
Step 101, based on the inquiry request received, with determining the Internet protocol IP of at least one destination server
Location.
In the embodiment of the present invention, which can be user when being necessary to determine whether Server Restart failure,
It is sent to terminal, specifically, due to after redeploying code for server, server needs to restart that could to run this heavy
Newly deployed code, therefore, in order to detect deployment server whether the successful operation code redeployed, user generally can
After having redeployed code into server, the inquiry request is sent to terminal, in order to which whether terminal determines server
Deployment success.Further, which can be the server for having redeployed code, the internet of destination server
Protocol address (Internet Protocol Address, IP) is a kind of unified address format that IP agreement provides.
Step 102, the IP address based at least one destination server, obtain and currently transport on each destination server
The information of capable code obtains at least one comparison code information.
In the embodiment of the present invention, terminal can access each destination server based on the IP address of each destination server,
From the information for obtaining currently running code in the destination server in destination server, and will currently be transported in the destination server
The code information as a comparison of the information of capable code.Wherein, comparison code information can be currently running on destination server
The version number of code.In practical application, for the demand of user, repeatedly the code on server can be updated, that is, be exactly,
Server can be often and redeploy new service code, the new service code disposed every time can all have a unique version
Number, it is based on for identifying this new service code specifically, the version number can be terminal when to server disposition
What deployment time point generated.It is, of course, also possible to which the predeterminated position in the new service code disposed every time is inserted into one uniquely
Default mark, correspondingly, comparison code information can be on destination server the default of predeterminated position in currently running code
Mark, the default mark can be based on Generating Random Number generation, which can be last position of code,
Further, comparison code information can also be the default line code section, etc. of currently running code on destination server, this
Inventive embodiments are not construed as limiting this.
Step 103 obtains object code information;The object code information is that the terminal is the destination server portion
The information of the object code of administration.
In the embodiment of the present invention, object code can be the last newest code for destination server deployment, example
, it is assumed that until up to now, on July 10th, 2018 to code 01 has been redeployed on destination server, in July, 2018
No. 13 to deploying code 01 on destination server, then on July 13rd, 2018 to the code 02 disposed on destination server i.e.
For object code.Further, terminal can obtain the information of object code, and then obtain mesh from the deployment of storage record
Mark code information.Wherein, when comparing code information is the version number of currently running code on destination server, the target generation
The information of code can be the version number of object code, when comparison code information be on destination server in currently running code it is pre-
If when the default mark of position, the information of the object code can be the default mark of predeterminated position in object code, work as comparison
When code information is the default line code section of currently running code on destination server, the information of the object code can be mesh
Mark the default line code section of code.
Step 104 determines destination server corresponding with the unmatched comparison code information of the object code information, obtains
To failed server.
In the embodiment of the present invention, if terminal after deploying object code to destination server, destination server at
Function completes reboot operation, then the version number of currently running code should be with the version number of object code on destination server
It is identical, that is, comparison code information matches with object code information, and correspondingly, terminal is deploying target to destination server
After code, destination server breaks down, and reboot operation is not completed, then currently running code on destination server
Version number will be different from the version number of object code, that is, and comparison code information and object code information mismatch, therefore, this
In step, comparison code information and the unmatched destination server of object code information can be determined as failed services by terminal
Device.
In conclusion the failed server localization method that the embodiment of the present invention one provides, terminal can first be based on receiving
Inquiry request, determine the IP address of at least one destination server, with being then based on the IP of at least one destination server
Location obtains the information of currently running code on each destination server, obtains at least one comparison code information and then obtains
Take object code information, wherein the object code information is the information for the object code that terminal is destination server deployment, most
Afterwards, it determines destination server corresponding with the unmatched comparison code information of object code information, obtains failed server.This
Sample, without establishing connection with each server respectively, terminal is based on autonomous obtain and compares code information base object code information, i.e.,
Can determine that whether the destination server is the server for occurring restarting unsuccessfully failure, it is lower to improve determining efficiency, reduces
Required cost.
Embodiment two
Fig. 2 is a kind of step flow chart of failed server localization method provided by Embodiment 2 of the present invention, is applied to eventually
End, as shown in Fig. 2, this method may include:
Step 201, based on the inquiry request received, determine the IP address of at least one destination server.
It may include destination server attribute in the inquiry request in this step, which may include
Target set-up site and/or target service type.Wherein, target set-up site indicates the set-up site of destination server, target
Type of service indicates the type of service that destination server provides.In practical application, in order to keep the range of service coverage bigger, network
Often server is respectively set in multiple and different areas in supplier, for example, 30 servers are arranged in Xi'an, sets in Guangdong
50 servers are set, 20 servers are arranged in Chengdu in order to attract more users, can further provide not for user
The business of same type, correspondingly, corresponding server can be set for different types of business to realize, exemplary, Ke Yiwei
1st~9 server disposition of the 1st~10 server in Xi'an, the 1st~20 server in Guangdong and Chengdu is directed to A
The code of type service, to provide type-A business by this 39 servers;Can for Xi'an the 11st~20 server,
21st~35 server in Guangdong and the 10th~17 server disposition in Chengdu are directed to the code of B type service, with logical
It crosses this 33 servers and B type service is provided;For the 21st~30 server in Xi'an, Guangdong the 36th~50 server with
And the 18th~20 server disposition in Chengdu is directed to the code of C type service, to provide C type industry by this 28 servers
Business.
It, therefore, can when redeploying code for server because the code for different business is all stand-alone development
Independent deployment can be carried out for the server for providing different business, for example, can be only the 1st of Xi'an when disposing code
1st~9 server disposition of~10 servers, the 1st~20 server in Guangdong and Chengdu is for type-A business
Fresh code, it is of course also possible to for the 1st of the 1st~10 server in Xi'an, the 1st~20 server in Guangdong and Chengdu
~9 server dispositions are directed to the fresh code of type-A business, and for the 21st~30 server in Xi'an, Guangdong the 36th
~50 servers and the 18th~20 server disposition in Chengdu are directed to the fresh code of C type service.
Further, if after disposing fresh code, only there are the clothes for restarting failure in the server in some area
The problem of business device, at this point, just will do it many unnecessary if the server disposed to all regions all detects
Operation, and then the system resource of terminal is wasted, further, the server of failure is restarted when existing in the server in some area
When, then correspondingly, the service traffics in this area will be relatively low, therefore, in the embodiment of the present invention, user can be new in deployment
After code, it regard the lower area of corresponding service traffics as target set-up site, using the type business as target service,
The inquiry request including target set-up site and/or target service type is sent to terminal, only target is arranged with controlling terminal
The server in place and/or the service for providing target service type are detected, and then avoid carrying out unnecessary detection, are improved
Detection accuracy.
Correspondingly, when in inquiry request including target set-up site and/or target service type terminals, terminal can lead to
It crosses following sub-steps (1)~sub-step (3) and realizes step 201:
Sub-step (1): the target set-up site in the inquiry request and/or the target service type are extracted.
Specifically, terminal can first parse inquiry request in this step, then analytically after inquiry request in
Extract the target set-up site and/or target service type.Specifically, when only including target set-up site in inquiry request,
The target set-up site is then extracted, when only including target service type in inquiry request, then extracts the target service type, into
One step, when in inquiry request including target set-up site and target service type, then extract the target set-up site and mesh
Mark type of service.
Sub-step (2): from preset server database search it is corresponding with the target set-up site and/or with it is described
The IP address of the corresponding server of target service type.
In this step, with can store in network system the IP of any server in the preset server database
Location, the predetermined server can be what terminal was established before step 201 in advance, specifically, terminal can be based on network system
In any server, establish the first corresponding relationship, the second corresponding relationship and third corresponding relationship;Based on the first corresponding relationship,
Second corresponding relationship and third corresponding relationship, generate preset server database;Wherein, which is to be configured
Corresponding relationship between the IP address and set-up site of the identical server of point, which is the type of service provided
Corresponding relationship between the IP address and type of service of identical server, third corresponding relationship are that set-up site is identical and provide
The identical server of type of service IP address and set-up site and type of service between corresponding relationship.
It is exemplary, it is assumed that include server 01, server 02, server 03 and the clothes of the setting of the area a in network system
Business device 04, the IP address of this 4 servers are respectively as follows: a001, a002, a003 and a004;The server 05 of the area b setting,
Server 06 and server 07, the IP address of this 3 servers are respectively as follows: b005, b006 and b007;The setting of the area c
Server 08, server 09, server 10 and server 11, the IP address of this 4 servers be respectively as follows: c008, c009,
C0010 and c0011;Wherein, the type of service that server 01, server 02, server 06 and server 11 provide is X,
The type of service that server 03, server 05 and server 09 provide is Y, server 04, server 07, server 08 and
The type of service that server 10 provides is Z, then can establish the first relationship as shown in table 1 below:
Set-up site | The IP address of server |
The area a | a001、a002、a003、a004 |
The area b | b005、b006、b007 |
The area c | c008、c009、c0010、c0011 |
Table 1
It is possible to further establish the second relationship as shown in table 2 below:
Type of service | The IP address of server |
X | a001、a002、b006、c0011 |
Y | a003、b005、c009 |
Z | a004、b007、c008、c0010 |
Table 2
It is possible to further establish third relationship as shown in table 3 below:
Table 3
Further, terminal can establish database based on this 3 corresponding relationships, obtain preset server database.
Assuming that including target set-up site " area b " in inquiry request, then terminal can be with first in preset server database
In relationship, the IP address of server corresponding with target set-up site " area b " is searched, " b005, b006, b007 " is obtained;It is false
If in inquiry request including target service type " Z ", then terminal can in the second relationship in preset server database,
The IP address for searching server corresponding with target service type " Z ", obtains " a004, b007, c008, c0010 ";Assuming that inquiry
It include target set-up site " area c " and target service type " Z " in request, then terminal can be with preset server data
In third relationship in library, the IP of server corresponding with target set-up site " area c " and target service type " Z " is searched
Address obtains " c008, c0010 ".
Sub-step (3): the IP address of the corresponding server is determined as to the IP address of destination server.
It is exemplary, it is assumed that include in inquiry request target set-up site " b area ", then terminal can will " b005,
B006, b007 " are determined as the IP address of destination server, it is assumed that include target service type " Z " in inquiry request, then terminal
" a004, b007, c008, c0010 " can be determined as to the IP address of destination server;Assuming that being set in inquiry request including target
Place " area c " and target service type " Z " are set, then " c008, c0010 " can be determined as destination server by terminal
IP address.
In practical application, when disposing code, if only to being in some set-up site and/or some type of service
Part server is disposed, that is at this time with regard to without carrying out server in some set-up site and/or some type of service
Detection, for example, only being redeployed to the server 01 in the area a, then being set using target is arranged in inquiry request
The mode in place is set, the mode that controlling terminal is detected will carry out unnecessary inspection to other servers in the area a
It surveys, and then therefore the system resource for wasting terminal is also possible to include at least one in the embodiment of the present invention, in inquiry request
The IP address of server, wherein the IP address of server can be the IP address of server, the IP of at least one server
Location can be user setting, and correspondingly, when in inquiry request including the IP address of at least one server, terminal can be mentioned
The IP address at least one server for including in inquiry request is taken, and the IP address of at least one server is determined as mesh
Mark the IP address of server.In this way, user can be specified whole to realize by the IP address of the setting server in inquiry request
Specific server is detected at end, and then avoids terminal from carrying out unnecessary detection, and then waste the system resource of terminal.
For example, user sends the information including server 01 to terminal, that is, the inquiry request of the address of server 01, with controlling terminal
Using the information of server 01 as the IP address of destination server, server 01 is detected.
Step 202, the IP address based at least one destination server, obtain and currently transport on each destination server
The information of capable code obtains at least one comparison code information.
Specifically, the implementation of this step can refer to above-mentioned steps 102, this will not be repeated here for the embodiment of the present invention.
Step 203 obtains object code information;The object code information is that the terminal is the destination server portion
The information of the object code of administration.
Specifically, the implementation of this step can refer to above-mentioned steps 103, this will not be repeated here for the embodiment of the present invention.
Step 204 determines destination server corresponding with the unmatched comparison code information of the object code information, obtains
To failed server.
Specifically, the implementation of this step can refer to above-mentioned steps 104, this will not be repeated here for the embodiment of the present invention.
Step 205 redeploys the object code for the failed server.
It is exemplary, it is assumed that failed server is server 01, then terminal can dispose target generation again for server 01
Code, so that server 01 and server 03 it is corresponding can to provide the object code for user based on object code is operated normally
New function.
Step 206, the information for obtaining currently running code in the failed server, obtain current code information.
In practical application, there are failure so that cause the server for restarting failure may be due to software fault, for example, by
There is system mistake in restarting process and cause to restart unsuccessfully, it is also possible to due to hardware fault, for example, due to hardware damage
And cause to restart unsuccessfully.Generally, the server that failure is restarted as caused by software fault, redeployed object code it
Afterwards, when being restarted again, restarting can be successfully completed, correspondingly, on the server will operational objective code, due to
The server that failure is restarted caused by hardware fault, redeployed object code and then it is secondary restarted when, Ke Nengyi
It is old to restart, it correspondingly, would not operational objective code on the server.
Therefore, can be after redeploying object code for failed server in the embodiment of the present invention, available event
Hinder server in currently running code information, obtain current code information, in order to determine the failed server in whether
Operational objective code, and then judge whether the failure that the failed server occurs is the hardware fault for needing to repair.
If step 207, the current code information and the object code information mismatch, show that letter is reminded in maintenance
Breath.
In this step, which can be used for that user is reminded to overhaul failed server, further,
If current code information and object code information mismatch, not running object code in failed server, failure can be determined
There are hardware faults for server, are detected, at this point it is possible to maintenance prompting message be shown, in order to which maintenance personal can
Failed server is overhauled in time, and then guarantees the normal work of server.
In conclusion failed server localization method provided by Embodiment 2 of the present invention, terminal can first be based on receiving
Inquiry request, determine the IP address of at least one destination server, with being then based on the IP of at least one destination server
Location obtains the information of currently running code on each destination server, obtains at least one comparison code information and then obtains
Take object code information, wherein the object code information is the information for the object code that terminal is destination server deployment, most
Afterwards, it determines destination server corresponding with the unmatched comparison code information of object code information, obtains failed server.This
Sample, without establishing connection with each server respectively, terminal is based on autonomous obtain and compares code information base object code information, i.e.,
Can determine that whether the destination server is the server for occurring restarting unsuccessfully failure, it is lower to improve determining efficiency, reduces
Required cost, meanwhile, terminal can also redeploy object code for failed server, then, obtain current in failed server
The information of the code of operation obtains current code information, finally, if current code information and object code information mismatch,
Display maintenance prompting message, in order to which maintenance personal can in time overhaul failed server, and then guarantees server
It works normally.
Embodiment three
Fig. 3 is a kind of block diagram for failed server positioning device that the embodiment of the present invention three provides, as shown in figure 3, the dress
Setting 30 may include:
First determining module 301, for based on the inquiry request received, with determining the IP of at least one destination server
Location.
First obtains module 302, for the IP address based at least one destination server, obtains each target clothes
The information of currently running code on business device obtains at least one comparison code information.
Second obtains module 303, for obtaining object code information;It is described that the object code information, which is the terminal,
The information of the object code of destination server deployment.
Second determining module 304, it is corresponding with the unmatched comparison code information of the object code information for determination
Destination server obtains failed server.
In conclusion the failed server positioning device that the embodiment of the present invention three provides, the first determining module can first base
In the inquiry request received, the IP address of at least one destination server is determined, then the first acquisition module can be based on being somebody's turn to do
The IP address of at least one destination server obtains the information of currently running code on each destination server, obtains at least
One comparison code information, then, second obtains the available object code information of module, wherein the object code information is
Terminal is the information of the object code of destination server deployment, finally, the second determining module can determine and object code information
The corresponding destination server of unmatched comparison code information, obtains failed server.In this way, without respectively with each server
Connection is established, terminal is based on autonomous obtain and compares code information base object code information, that is, can determine that the destination server is
No it is lower to improve determining efficiency to occur restarting unsuccessfully the server of failure, reduces required cost.
Example IV
Fig. 4 is a kind of block diagram for failed server positioning device that the embodiment of the present invention four provides, as shown in figure 4, the dress
Setting 40 may include:
First determining module 401, for based on the inquiry request received, with determining the IP of at least one destination server
Location;
First obtains module 402, for the IP address based at least one destination server, obtains each target clothes
The information of currently running code on business device obtains at least one comparison code information;
Second obtains module 403, for obtaining object code information;It is described that the object code information, which is the terminal,
The information of the object code of destination server deployment;
Second determining module 404, it is corresponding with the unmatched comparison code information of the object code information for determination
Destination server obtains failed server.
It optionally, include destination server attribute in the inquiry request, the destination server attribute includes that target is set
Set place and/or target service type;
Correspondingly, first determining module 401, comprising:
Extracting sub-module, for extracting the target set-up site and/or the target service in the inquiry request
Type;
Search submodule, for from preset server database search it is corresponding with the target set-up site and/or
The IP address of server corresponding with the target service type;
Submodule is determined, for the IP address of the corresponding server to be determined as to the IP address of destination server;
Wherein, the IP address of any server in network system is stored in the preset server database.
Optionally, described device 40 further include:
Module is established, for establishing the first corresponding relationship, the second corresponding relationship based on any server in network system
And third corresponding relationship;
Generation module, for being based on first corresponding relationship, second corresponding relationship and the third corresponding relationship,
Generate the preset server database;
Wherein, first corresponding relationship is between the IP address and the set-up site of the identical server of set-up site
Corresponding relationship, second corresponding relationship be the identical server of type of service provided IP address and the type of service
Between corresponding relationship, the third corresponding relationship is the IP of the identical server of type of service that set-up site is identical and provides
Corresponding relationship between address and the set-up site and the type of service.
It optionally, include the IP address of at least one server in the inquiry request;
Correspondingly, first determining module 401, is used for:
The IP address at least one server for including in the inquiry request is extracted, and will at least one described clothes
The IP address of business device is determined as the IP address of the destination server.
Optionally, described device 40 further include:
Deployment module 405, for redeploying the object code for the failed server;
Third obtains module 406, for obtaining the information of currently running code in the failed server, obtains current
Code information;
Display module 407 shows maintenance if mismatching for the current code information and the object code information
Prompting message.
In conclusion the failed server positioning device that the embodiment of the present invention four provides, the first determining module can first base
In the inquiry request received, the IP address of at least one destination server is determined, then the first acquisition module can be based on being somebody's turn to do
The IP address of at least one destination server obtains the information of currently running code on each destination server, obtains at least
One comparison code information, then, second obtains the available object code information of module, wherein the object code information is
Terminal is the information of the object code of destination server deployment, finally, the second determining module can determine and object code information
The corresponding destination server of unmatched comparison code information, obtains failed server.In this way, without respectively with each server
Connection is established, terminal is based on autonomous obtain and compares code information base object code information, that is, can determine that the destination server is
No it is lower to improve determining efficiency to occur restarting unsuccessfully the server of failure, reduces required cost, meanwhile, deployment module
Also object code can be redeployed for failed server, then, third obtains currently transports in the available failed server of module
The information of capable code obtains current code information, finally, display module can be in current code information and object code information
When mismatch, display maintenance prompting message in order to which maintenance personal can in time overhaul failed server, and then guarantees
The normal work of server.
For above-mentioned apparatus embodiment, since it is basically similar to the method embodiment, so be described relatively simple,
The relevent part can refer to the partial explaination of embodiments of method.
Further, according to one embodiment of present invention, a kind of mobile terminal is provided, comprising: processor, memory
And it is stored in the failed server finder that can be run on the memory and on the processor, the failed server
The failed server localization method of previous embodiment is realized when positioning is executed by the processor.
According to one embodiment of present invention, a kind of computer readable storage medium is additionally provided, it is described computer-readable
Failed server finder is stored on storage medium, before realizing when the failed server finder is executed by processor
State the failed server localization method of embodiment.
All the embodiments in this specification are described in a progressive manner, the highlights of each of the examples are with
The difference of other embodiments, the same or similar parts between the embodiments can be referred to each other.
It would have readily occurred to a person skilled in the art that: any combination application of above-mentioned each embodiment is all feasible, therefore
Any combination between above-mentioned each embodiment is all embodiment of the present invention, but this specification exists as space is limited,
This is not just detailed one by one.
Failed server localization method is not solid with any certain computer, virtual system or other equipment provided herein
There is correlation.Various general-purpose systems can also be used together with teachings based herein.As described above, construction has this hair
Structure required by the system of bright scheme is obvious.In addition, the present invention is also not directed to any particular programming language.It should
Understand, can use various programming languages and realize summary of the invention described herein, and language-specific is done above
Description is in order to disclose the best mode of carrying out the invention.
In the instructions provided here, numerous specific details are set forth.It is to be appreciated, however, that implementation of the invention
Example can be practiced without these specific details.In some instances, well known method, structure is not been shown in detail
And technology, so as not to obscure the understanding of this specification.
Similarly, it should be understood that in order to simplify the present invention and help to understand one or more of the various inventive aspects,
Above in the description of exemplary embodiment of the present invention, each feature of the invention is grouped together into single implementation sometimes
In example, figure or descriptions thereof.However, the disclosed method should not be interpreted as reflecting the following intention: i.e. required to protect
Shield the present invention claims features more more than feature expressly recited in each claim.More precisely, such as right
As claim reflects, inventive aspect is all features less than single embodiment disclosed above.Therefore, it then follows tool
Thus claims of body embodiment are expressly incorporated in the specific embodiment, wherein each claim conduct itself
Separate embodiments of the invention.
Those skilled in the art will understand that can be carried out adaptively to the module in the equipment in embodiment
Change and they are arranged in one or more devices different from this embodiment.It can be the module or list in embodiment
Member or component are combined into a module or unit or component, and furthermore they can be divided into multiple submodule or subelement or
Sub-component.Other than such feature and/or at least some of process or unit exclude each other, it can use any
Combination is to all features disclosed in this specification (including adjoint claim, abstract and attached drawing) and so disclosed
All process or units of what method or apparatus are combined.Unless expressly stated otherwise, this specification is (including adjoint power
Benefit require, abstract and attached drawing) disclosed in each feature can carry out generation with an alternative feature that provides the same, equivalent, or similar purpose
It replaces.
In addition, it will be appreciated by those of skill in the art that although some embodiments described herein include other embodiments
In included certain features rather than other feature, but the combination of the feature of different embodiments mean it is of the invention
Within the scope of and form different embodiments.For example, in detail in the claims, embodiment claimed it is one of any
Can in any combination mode come using.
Various component embodiments of the invention can be implemented in hardware, or to run on one or more processors
Software module realize, or be implemented in a combination thereof.It will be understood by those of skill in the art that can be used in practice
Microprocessor or digital signal processor (DSP) are realized in failed server localization method according to an embodiment of the present invention
The some or all functions of some or all components.The present invention is also implemented as executing method as described herein
Some or all device or device programs (for example, computer program and computer program product).Such reality
Existing program of the invention can store on a computer-readable medium, or may be in the form of one or more signals.
Such signal can be downloaded from an internet website to obtain, and perhaps be provided on the carrier signal or in any other forms
It provides.
It should be noted that the above-mentioned embodiments illustrate rather than limit the invention, and ability
Field technique personnel can be designed alternative embodiment without departing from the scope of the appended claims.In the claims,
Any reference symbol between parentheses should not be configured to limitations on claims.Word "comprising" does not exclude the presence of not
Element or step listed in the claims.Word "a" or "an" located in front of the element does not exclude the presence of multiple such
Element.The present invention can be by means of including the hardware of several different elements and being come by means of properly programmed computer real
It is existing.In the unit claims listing several devices, several in these devices can be through the same hardware branch
To embody.The use of word first, second, and third does not indicate any sequence.These words can be explained and be run after fame
Claim.
Claims (10)
1. a kind of failed server localization method, which is characterized in that be applied to terminal, which comprises
Based on the inquiry request received, the internet protocol address of at least one destination server is determined;
Based on the IP address of at least one destination server, the letter of currently running code on each destination server is obtained
Breath obtains at least one comparison code information;
Obtain object code information;The object code information is the object code that the terminal is destination server deployment
Information;
It determines destination server corresponding with the unmatched comparison code information of the object code information, obtains failed services
Device.
2. the method according to claim 1, wherein including destination server attribute, institute in the inquiry request
Stating destination server attribute includes target set-up site and/or target service type;
Correspondingly, described based on the inquiry request received, determine the IP address of at least one destination server, comprising:
Extract the target set-up site in the inquiry request and/or the target service type;
From preset server database search it is corresponding with the target set-up site and/or with the target service type pair
The IP address for the server answered;
The IP address of the corresponding server is determined as to the IP address of destination server;
Wherein, the IP address of any server in network system is stored in the preset server database.
3. according to the method described in claim 2, it is characterized in that, described based on the inquiry request received, determination at least one
Before the IP address of a destination server, the method also includes:
Based on any server in network system, the first corresponding relationship, the second corresponding relationship and third corresponding relationship are established;
Based on first corresponding relationship, second corresponding relationship and the third corresponding relationship, the preset clothes are generated
Business device database;
Wherein, first corresponding relationship is pair between the IP address and the set-up site of the identical server of set-up site
It should be related to, second corresponding relationship is between the IP address and the type of service of the identical server of type of service provided
Corresponding relationship, the third corresponding relationship is the IP address of the identical server of type of service that set-up site is identical and provides
With the corresponding relationship between the set-up site and the type of service.
4. the method according to claim 1, wherein including the IP of at least one server in the inquiry request
Address;
Correspondingly, described based on the inquiry request received, determine the IP address of at least one destination server, comprising:
The IP address at least one server for including in the inquiry request is extracted, and will at least one described server
IP address be determined as the IP address of the destination server.
5. the method according to claim 1, wherein unmatched in the determination and the object code information
The corresponding destination server of code information is compared, after obtaining failed server, the method also includes:
The object code is redeployed for the failed server;
The information for obtaining currently running code in the failed server obtains current code information;
If the current code information and the object code information mismatch, maintenance prompting message is shown.
6. a kind of failed server positioning device, which is characterized in that be applied to terminal, described device includes:
First determining module, for determining the IP address of at least one destination server based on the inquiry request received;
First acquisition module obtains on each destination server for the IP address based at least one destination server
The information of currently running code obtains at least one comparison code information;
Second obtains module, for obtaining object code information;The object code information is that the terminal takes for the target
The information of the object code of business device deployment;
Second determining module, for determining destination service corresponding with the unmatched comparison code information of the object code information
Device obtains failed server.
7. device according to claim 6, which is characterized in that include destination server attribute, institute in the inquiry request
Stating destination server attribute includes target set-up site and/or target service type;
Correspondingly, first determining module, comprising:
Extracting sub-module, for extracting the target set-up site and/or the target service type in the inquiry request;
Search submodule, for from preset server database search it is corresponding with the target set-up site and/or with institute
State the IP address of the corresponding server of target service type;
Submodule is determined, for the IP address of the corresponding server to be determined as to the IP address of destination server;
Wherein, the IP address of any server in network system is stored in the preset server database.
8. device according to claim 7, which is characterized in that described device further include:
Module is established, for establishing the first corresponding relationship, the second corresponding relationship and based on any server in network system
Three corresponding relationships;
Generation module is generated for being based on first corresponding relationship, second corresponding relationship and the third corresponding relationship
The preset server database;
Wherein, first corresponding relationship is pair between the IP address and the set-up site of the identical server of set-up site
It should be related to, second corresponding relationship is between the IP address and the type of service of the identical server of type of service provided
Corresponding relationship, the third corresponding relationship is the IP address of the identical server of type of service that set-up site is identical and provides
With the corresponding relationship between the set-up site and the type of service.
9. device according to claim 6, which is characterized in that include the IP of at least one server in the inquiry request
Address;
Correspondingly, first determining module, is used for:
The IP address at least one server for including in the inquiry request is extracted, and will at least one described server
IP address be determined as the IP address of the destination server.
10. device according to claim 6, which is characterized in that described device further include:
Deployment module, for redeploying the object code for the failed server;
Third obtains module, for obtaining the information of currently running code in the failed server, obtains current code letter
Breath;
Display module shows that letter is reminded in maintenance if mismatching for the current code information and the object code information
Breath.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810791660.4A CN109120432B (en) | 2018-07-18 | 2018-07-18 | Fault server positioning method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810791660.4A CN109120432B (en) | 2018-07-18 | 2018-07-18 | Fault server positioning method and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN109120432A true CN109120432A (en) | 2019-01-01 |
CN109120432B CN109120432B (en) | 2021-10-15 |
Family
ID=64862205
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810791660.4A Active CN109120432B (en) | 2018-07-18 | 2018-07-18 | Fault server positioning method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109120432B (en) |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110535685A (en) * | 2019-07-25 | 2019-12-03 | 北京奇艺世纪科技有限公司 | A kind of fault determination method, device and computer readable storage medium |
CN114039842A (en) * | 2021-09-26 | 2022-02-11 | 天翼爱音乐文化科技有限公司 | Fault positioning method, system, equipment and storage medium for distributed service |
CN115378801A (en) * | 2022-08-10 | 2022-11-22 | 福州六察网络科技有限公司 | Multi-server communication method and terminal |
CN117596187A (en) * | 2024-01-19 | 2024-02-23 | 融科联创(天津)信息技术有限公司 | Server operation and maintenance method, device, equipment and medium based on multi-cloud platform |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1752930A (en) * | 2004-09-23 | 2006-03-29 | 华为技术有限公司 | Chip program loading method |
CN104978191A (en) * | 2015-06-24 | 2015-10-14 | 小米科技有限责任公司 | Application deployment method and server |
CN106095483A (en) * | 2016-05-31 | 2016-11-09 | 乐视控股(北京)有限公司 | The Automation arranging method of service and device |
CN106445613A (en) * | 2016-10-11 | 2017-02-22 | 北京北方烽火科技有限公司 | Code upgrading method and system |
-
2018
- 2018-07-18 CN CN201810791660.4A patent/CN109120432B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1752930A (en) * | 2004-09-23 | 2006-03-29 | 华为技术有限公司 | Chip program loading method |
CN104978191A (en) * | 2015-06-24 | 2015-10-14 | 小米科技有限责任公司 | Application deployment method and server |
CN106095483A (en) * | 2016-05-31 | 2016-11-09 | 乐视控股(北京)有限公司 | The Automation arranging method of service and device |
CN106445613A (en) * | 2016-10-11 | 2017-02-22 | 北京北方烽火科技有限公司 | Code upgrading method and system |
Cited By (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110535685A (en) * | 2019-07-25 | 2019-12-03 | 北京奇艺世纪科技有限公司 | A kind of fault determination method, device and computer readable storage medium |
CN110535685B (en) * | 2019-07-25 | 2023-01-13 | 北京奇艺世纪科技有限公司 | Fault determination method and device and computer readable storage medium |
CN114039842A (en) * | 2021-09-26 | 2022-02-11 | 天翼爱音乐文化科技有限公司 | Fault positioning method, system, equipment and storage medium for distributed service |
CN115378801A (en) * | 2022-08-10 | 2022-11-22 | 福州六察网络科技有限公司 | Multi-server communication method and terminal |
CN115378801B (en) * | 2022-08-10 | 2024-01-30 | 福州六察网络科技有限公司 | Multi-server communication method and terminal |
CN117596187A (en) * | 2024-01-19 | 2024-02-23 | 融科联创(天津)信息技术有限公司 | Server operation and maintenance method, device, equipment and medium based on multi-cloud platform |
CN117596187B (en) * | 2024-01-19 | 2024-04-30 | 融科联创(天津)信息技术有限公司 | Server operation and maintenance method, device, equipment and medium based on multi-cloud platform |
Also Published As
Publication number | Publication date |
---|---|
CN109120432B (en) | 2021-10-15 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109120432A (en) | A kind of failed server localization method and device | |
CN107453960B (en) | Method, device and system for processing test data in service test | |
CN111240653B (en) | Interface document generation method, device and readable storage medium | |
US7870169B2 (en) | Method for enabling traceability and recovery from errors during migration of software applications | |
CN107807877A (en) | A kind of method and apparatus of code performance test | |
CN107357558B (en) | Method and device for constructing codes | |
CN111158741B (en) | Method and device for monitoring dependency relationship change of service module on third party class library | |
US20100218049A1 (en) | Method of Creating Signatures for Classifying Program Failures | |
CN101178684A (en) | Symbol locating method of embedded system | |
CN104636252A (en) | Online code reviewing method and system based on SonarQube | |
CN106991046A (en) | Application testing method and device | |
CN105095769A (en) | Information service software vulnerability detection method | |
CN111694612A (en) | Configuration checking method, device, computer system and storage medium | |
CN106681783A (en) | Detection method and system for SVN code | |
WO2023179749A1 (en) | Configuration data processing system and method, and electronic device | |
CN104899134A (en) | Automatic domain name registration server testing system and method | |
CN106991045A (en) | Page method of calibration and device | |
CN110474821B (en) | Node fault detection method and device | |
CN105743725A (en) | Method and device for testing application programs | |
CN113342560A (en) | Fault processing method, system, electronic equipment and storage medium | |
US20030135496A1 (en) | Management program, method and apparatus for business process definition | |
CN112612706A (en) | Automated testing method, computer device and storage medium | |
CN106933743A (en) | A kind of method of testing and device | |
CN112765041B (en) | Game automation testing method and device and electronic equipment | |
CN113238956B (en) | Fault analysis method, device, equipment and storage medium for abnormal application |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |