CN108667649B - A kind of malfunction elimination method, apparatus and server - Google Patents

A kind of malfunction elimination method, apparatus and server Download PDF

Info

Publication number
CN108667649B
CN108667649B CN201810298049.8A CN201810298049A CN108667649B CN 108667649 B CN108667649 B CN 108667649B CN 201810298049 A CN201810298049 A CN 201810298049A CN 108667649 B CN108667649 B CN 108667649B
Authority
CN
China
Prior art keywords
flag bit
log
operation requests
target
subject thread
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.)
Active
Application number
CN201810298049.8A
Other languages
Chinese (zh)
Other versions
CN108667649A (en
Inventor
陈岗
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Chongqing Xiaoyu Small Loan Co Ltd
Original Assignee
Chongqing Xiaoyu Small Loan Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Chongqing Xiaoyu Small Loan Co Ltd filed Critical Chongqing Xiaoyu Small Loan Co Ltd
Priority to CN201810298049.8A priority Critical patent/CN108667649B/en
Publication of CN108667649A publication Critical patent/CN108667649A/en
Application granted granted Critical
Publication of CN108667649B publication Critical patent/CN108667649B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/02Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/06Management of faults, events, alarms or notifications
    • H04L41/069Management of faults, events, alarms or notifications using logs of notifications; Post-processing of notifications

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The embodiment of the invention provides a kind of malfunction elimination method, apparatus and servers, wherein method includes: when receiving the operation requests for the first webpage web application, flag bit is added for the operation requests, and the invocation target thread process operation requests, while flag bit is added for the log generated in treatment process.When detecting subject thread failure alarm, is searched in log library and include the target journaling of flag bit and export the target journaling, in order to malfunction elimination.Malfunction elimination range can be reduced using the embodiment of the present invention, improve troubleshooting efficiency.

Description

A kind of malfunction elimination method, apparatus and server
Technical field
The present invention relates to computer field more particularly to a kind of malfunction elimination method, apparatus and servers.
Background technique
In webpage web application, if multiple threads or multiple processes handle different operations simultaneously, it is easy to go out Existing failure.The method of currently used debugging is all log outputs in applying web, then artificial in all logs The reason of middle lookup is broken down, and then carry out troubleshooting.Obviously it as the time that web application is come into operation increases, generates Log increase, common debugging method will increase the workload of malfunction elimination, reduce troubleshooting efficiency.
Summary of the invention
The embodiment of the invention provides a kind of malfunction elimination method, apparatus and servers, can reduce malfunction elimination range, Improve troubleshooting efficiency.
First aspect of the embodiment of the present invention provides a kind of malfunction elimination method, comprising:
When receiving the operation requests for the first webpage web application, flag bit is added for operation requests;
The request of invocation target thread processing operations, and flag bit is added for the log generated during processing;
When detecting subject thread failure alarm, the target journaling including flag bit is searched in log library;
Target journaling is exported, target journaling is used for malfunction elimination.
Optionally, after receiving the operation requests for the first webpage web application, flag bit is added for operation requests Before, malfunction elimination method further include:
Judge whether carry flag bit in operation requests;If it is not, then executing is the step of operation requests add flag bit.
Optionally, flag bit is added in the log to generate during processing, comprising:
Obtain each operation that subject thread call chain in processing operation request process includes;It adds and marks for each operation Will position;Each operation of flag bit will be added as a log recording into log library.
Optionally, in flag bit include mark for sending the target interface of operation requests, export target journaling, packet It includes:
Target journaling is sent to marked target interface is identified.
Optionally, when detecting subject thread failure alarm, the target including flag bit is searched in log library Before log, malfunction elimination method further include:
Whether the cooperative node for judging that call chain includes in subject thread processing operation request process has issued fault warning;
If cooperative node does not issue fault warning, executes and search the target journaling including flag bit in log library Step.
Optionally, the target journaling including flag bit is searched in log library, comprising:
Log is sent to log management server and extracts request, and log extracts and carries flag bit in request, and log extraction is asked It asks and is used to indicate log management server and searches the extraction log including flag bit in the log library of itself;
Receive the extraction log that log management server is sent;
Log will be extracted as target journaling.
Optionally, flag bit is added for operation requests, comprising: in the hypertext transfer protocol HTTP gauge outfit of operation requests Flag bit is added.
Second aspect of the embodiment of the present invention provides a kind of malfunction elimination device, comprising:
Receiving unit, for receiving the operation requests for being directed to the first webpage web application;
Adding unit, for adding flag bit for operation requests when receiving unit receives operation requests;
Processing unit is requested for invocation target thread processing operations;
Adding unit is also used to add flag bit for the log generated during processing;
Searching unit, for searching the mesh including flag bit in log library when detecting that subject thread breaks down Mark log;
Output unit, for exporting target journaling, target journaling is used for malfunction elimination.
Optionally, malfunction elimination device further include: judging unit, for receiving when receiving unit for the first webpage When the operation requests of web application, judge whether carry flag bit in operation requests.
Optionally, adding unit is used to add the concrete mode of flag bit in treatment process for the log generated are as follows:
Obtain each operation that subject thread call chain in processing operation request process includes;It adds and marks for each operation Will position;Each operation of flag bit will be added as a log recording into log library.
It optionally, include mark for sending the target interface of the operation requests in flag bit, output unit is specific For: the target journaling is sent to marked target interface is identified.
Optionally, judging unit is also used to judge the cooperation that call chain includes in subject thread processing operation request process Whether node has issued fault warning.
Optionally, searching unit is specifically used for:
Log is sent to log management server and extracts request, and log extracts and carries flag bit in request, and log extraction is asked It asks and is used to indicate log management server and searches the extraction log including flag bit in the log library of itself;
Receive the extraction log that log management server is sent;
Log will be extracted as target journaling.
Optionally, adding unit is used to add the concrete mode of flag bit for operation requests are as follows: in the super text of operation requests Flag bit is added in this transport protocol HTTP gauge outfit.
The present invention implements the third aspect and provides a kind of server, including processor, network interface and memory, handles Device, network interface and memory are connected with each other, wherein for memory for storing computer program, computer program includes program Instruction, processor are configured for caller instruction, execute the failure Slagoff method of first aspect.
Fourth aspect of the embodiment of the present invention provides a kind of computer readable storage medium, and computer readable storage medium is deposited Contain computer program, computer program includes program instruction, and program instruction makes processor execute the when being executed by a processor The malfunction elimination method of one side.
The embodiment of the present invention is asked when server receives the operation requests for the first webpage web application for the operation Addition flag bit is sought, and starts subject thread and handles the operation requests, while being raw in subject thread processing operation request process At log add flag bit.If detecting that subject thread breaks down to alert, that is to say, that subject thread is in processing operation It breaks down in request process, then can extract the flag bit in subject thread, searching in log library includes the flag bit Target journaling, and the target journaling is exported, in order to carry out malfunction elimination, malfunction elimination range can be reduced, is improved at failure Manage efficiency.
Detailed description of the invention
In order to more clearly explain the embodiment of the invention or the technical proposal in the existing technology, to embodiment or will show below There is attached drawing needed in technical description to be briefly described, it should be apparent that, the accompanying drawings in the following description is only this Some embodiments of invention for those of ordinary skill in the art without creative efforts, can be with It obtains other drawings based on these drawings.
Fig. 1 is a kind of malfunction elimination method flow schematic diagram provided in an embodiment of the present invention;
Fig. 2 is another malfunction elimination method flow schematic diagram provided in an embodiment of the present invention;
Fig. 3 is a kind of malfunction elimination apparatus structure schematic diagram provided in an embodiment of the present invention;
Fig. 4 is a kind of structural schematic diagram of server provided in an embodiment of the present invention.
Specific embodiment
It has been investigated that the malfunction elimination method of web application at present is log is more or multiple web application collaborative process In the case where some operation requests, lead to the low efficiency of troubleshooting.For this problem, the embodiment of the present invention proposes a kind of event Barrier investigation method, apparatus and server: in web framework establishment web in application, the middleware that can add marker is added to In web application, when receiving the operation requests for the first webpage web application, the server calls middleware is the operation Request addition flag bit.Then, server calls subject thread handles the operation requests, and the day to generate during processing Will adds flag bit.When detecting subject thread during handling the operation requests and breaking down alarm namely target When breaking down in thread processing operations request process, server searches the target journaling including flag bit in log library, most Target journaling is exported afterwards, in order to which staff carries out malfunction elimination in target journaling.Guarantee the target day of output in this way Will is log relevant to the subject thread of failure, reduces malfunction elimination range, accelerates the malfunction elimination time, in turn Improve troubleshooting efficiency.
Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention carries out clear, complete Site preparation description, it is clear that described embodiments are only a part of the embodiments of the present invention, instead of all the embodiments.It is based on Embodiment in the present invention, it is obtained by those of ordinary skill in the art without making creative efforts every other Embodiment shall fall within the protection scope of the present invention.
It is a kind of flow diagram of malfunction elimination method provided in an embodiment of the present invention, such as the failure of Fig. 1 with reference to Fig. 1 Investigation method, it may include following steps:
101, when receiving the operation requests for the first webpage web application, server is operation requests addition mark Position.
Wherein, the operation requests of the first webpage web application can be inquiry creditor and take in information, or be also possible to look into Ask the loan history information etc. of creditor.Optionally, when receiving operation requests, server can call middleware to be should Operation requests add flag bit, wherein the middleware can refer to when web framework establishment web applies for web application addition, should Flag bit and the operation requests are uniquely corresponding namely the flag bit is equivalent to the identity of operation requests.Optionally, server Flag bit is added for the operation requests, comprising: in hypertext transfer protocol (the Hyper Text Transfer of the operation requests Protocol, HTTP) flag bit is added in gauge outfit.Or server can also be by other means operation requests addition mark Will position is not specifically limited in the embodiment of the present invention.
Optionally, it after receiving the operation requests for the first webpage web application, adds and indicates for the operation requests Before position, further includes: judge whether carry flag bit in the operation requests;If it is not, then executing is operation requests addition mark The step of will position.In other words, the operation requests for the first web application may be to be triggered by user, it is also possible to by it What his web application or other equipment were sent.Flag bit is not carried in operation requests by user's triggering, is applied by other web Or in the operation requests of other equipment transmission, flag bit may be carried, it is also possible to not carry flag bit.Therefore, server First judge whether carry flag bit in the operation requests before adding flag bit for operation requests: being taken if carrying flag bit Business device can not then execute the step of adding flag bit for the operation requests;Server, which can be performed, if not carrying flag bit is The operation requests add the step of flag bit, can avoid going out the case where repeating addition flag bit for same operation requests in this way It is existing, to save server energy consumption expense.
102, server calls subject thread processing operation is requested, and the log addition mark to generate during processing Position.
Optionally, server can select an idle thread as subject thread from multiple threads and handle aforesaid operations Request, and subject thread can store the flag bit in operation requests into the attribute of subject thread itself, can also manage Solution is once subject thread starts to process the operation requests including flag bit, then the subject thread is associated with the operation requests.
Optionally, server can indicate for each log addition generated during the request of subject thread processing operation Position, and above-mentioned each log including flag bit is stored into local log library or log management server.That is, When server calls subject thread handles aforesaid operations request, the flag bit for including in operation requests can be stored in by subject thread In the attribute of subject thread.In subject thread processing aforesaid operations request process, server can call log module to read mesh Flag bit in graticule journey, the criteria field in log generated when which is requested as the subject thread processing operation A part, namely the every log printed under the subject thread all carries the flag bit, asks in this way, operate Ask, subject thread and subject thread log three it is interrelated, identical flag bit is all carried in three, if it is known that operation The flag bit of request can find the subject thread for handling the operation requests and the subject thread handles the operation requests mistake All log informations generated in journey, so may be implemented quickly to be found in log library according to flag bit and subject thread Associated log.
103, when detecting subject thread failure alarm, server searches the mesh including flag bit in log library Mark log.
Optionally, when server detects the subject thread failure alarm of processing operation request, show score Journey breaks down when processing operation is requested, and traditional malfunction elimination method is to export logs all in log library, and work people Member searches the reason of subject thread breaks down in all logs, then uses the relevant technologies handling failure.The present invention is real It applies in example, when the subject thread for detecting processing operation request breaks down, server, which can obtain in the subject thread, includes Flag bit, then searched in log library include the flag bit target journaling, and target journaling is exported, in order to work Make personnel and carries out malfunction elimination in target journaling.Compared with conventional failure checks method, failure provided in an embodiment of the present invention Investigation method reduces malfunction elimination range, and then troubleshooting efficiency can be improved.
Optionally, when server detect subject thread break down in processing operation request process alarm when, in day The target journaling including flag bit is searched in will library, it may include: the first log including flag bit is searched in local log library; The server applied to the 2nd web sends log call request;Receive the second log that the server of the 2nd web application is sent; Using the first log and the second log as target journaling.Wherein, flag bit, log call request are carried in log call request The server for being used to indicate the 2nd web application searches the second mark including flag bit in the log library of itself.That is, If the log of each web application is stored in local, in the server for based on the operation requests needing that the 2nd web is called to apply In the case where the execution business that cooperates, if the subject thread of the operation requests breaks down, server can be applied first in the first web Local log library in search include flag bit the first log, then server can be by way of broadcast to the 2nd web The server of application sends log call request.After the server of 2nd web application receives the log call request, it can detect It whether is stored with the second log including the flag bit in its local log library, if so, the then service of the 2nd web application Second log is returned to server by device;If it is not, the server of the 2nd web application can not do any response.Server The first log and the second log called from the 2nd web application server will be found in local log library as target journaling Output.Wherein, the first log content can may not have for empty namely the first log, illustrate when the first log content is empty The process that subject thread handles the operation requests is completely by calling the 2nd web application cooperation completion, therefore subject thread The log generated in treatment process is stored in the 2nd web using in local.Optionally, it includes at least one web that the 2nd web, which is applied, Using, that is to say, that the operation requests of the first web application can be completed by several web application cooperation.
104, server exports target journaling.
Optionally, server includes the target interface for sending the operation requests in the flag bit added for operation requests Mark exports target journaling, comprising: sends target journaling to marked target interface is identified.In simple terms, server may Multiple external interfaces are provided, for receiving and handling different task requests, server is asked for operation in the embodiment of the present invention It seeks addition flag bit simultaneously, is also the target interface addition mark for sending the operation requests, can occur in this way in subject thread In the case where failure, target journaling relevant to the subject thread is exported to target interface, checks failure convenient for staff, Staff can be thus made according to target journaling to be just to learn it is which operation requests occurs by the output of which interface Failure.
In the embodiment of the present invention when receiving the operation requests for the first webpage web application, server is the operation Request addition flag bit, and start subject thread and handle the operation requests, while in subject thread processing operation request process Flag bit is added in the log of generation.If detecting that subject thread breaks down, the flag bit in subject thread can be extracted, Searched in log library include the flag bit target journaling, and export the target journaling, can be in order to carry out malfunction elimination Malfunction elimination range is reduced, troubleshooting efficiency is improved.
It is a kind of schematic flow diagram of malfunction elimination method provided in an embodiment of the present invention, such as the failure of Fig. 2 with reference to Fig. 2 Investigation method, it may include following steps:
201, when receiving the operation requests for the first webpage web application, server is operation requests addition mark Position.
202, server calls subject thread processing operation is requested.
The feasible embodiment of step 201-202 specifically describes in the embodiment shown in fig. 1, and details are not described herein.
203, server obtains subject thread each operation that call chain includes during processing operation is requested, and is each Flag bit is added in a operation.
204, server will be added to each operation of flag bit as a log recording into log library.
In step 203, call chain can refer at least one server to the entire treatment process of operation requests.It is simple next It says, when server process operation requests, it may be necessary to which the cooperation of other web application servers executes.It is handled to operation requests In the process, the process that each server participates in handling the operation requests can be referred to as an operation stream, the operation of multiple servers Stream composition call chain.Optionally, when receiving the operation requests for the first webpage web application, if server judges this Operation requests do not carry flag bit, then add flag bit for the operation requests, and then invocation target thread processing operations are requested, And flag bit is added for the log generated during processing, specifically can include: server obtains subject thread in processing operation Each operation that call chain includes in request process adds flag bit for each operation;The each operation for adding flag bit is made It is a log recording into log library.That is, after the request of server calls subject thread processing operation, monitoring server And the operation for participating in the every other server in the operation requests treatment process is obtained, flag bit is added for each operation, is made Then each server will be added to each operation of flag bit to flag bit is carried in each step of the operation requests As a log storage into log library.In this way, which every log in log library under the subject thread has identity Mark, which, which can be used to distinguish every log, is printed under which thread.
205, when detecting subject thread failure alarm, server judges subject thread processing operation request process Whether the cooperative node that middle call chain includes has issued fault warning.
If 206, cooperative node does not issue fault warning, server searches the target day including flag bit in log library Will.
207, server exports target journaling.
In step 205, the cooperative node that call chain includes refers in subject thread processing operation request process, cooperates Other servers of the server process operation requests, optionally, if server detects that subject thread processing operation is requested When break down, can first judge whether that other servers for participating in the operation requests have issued fault warning: if other take It is engaged in the issued fault warning of device, then shows the failure occurred in handling the subject thread via other servers, because This fault warning then can be ignored in this server, does not execute the step that the target journaling including flag bit is searched in log library Suddenly, the power dissipation overhead of server can be saved in this way;The alarm if other servers do not break down shows that there are no other It breaks down in the server process subject thread, therefore step 206 can be performed in server, to guarantee failure in the subject thread It can be checked and be removed in time.
Optionally, in step 206, if the log of each web application is stored in log management server, When subject thread breaks down, server needs from searching in log management server to include flag bit under the subject thread Target journaling.Optionally, it includes: to log management server that server searches the target journaling including flag bit in log library It sends log and extracts request, and log extracts and carries flag bit in request, log extracts request and is used to indicate log management service Device searches the extraction log including flag bit in the log library of itself;Receive the extraction log that log management server is sent; Log will be extracted as target journaling.In other words, the call request that server can carry flag bit by one is from log Invocation target log in management server.Wherein, the log stored in log management server can be according to web application not Together, each web log applied is stored separately, for example the classification of log is stored in log management server can be with are as follows: first The log of web application, the log of the 2nd web application and log of the 3rd web application etc..Or in log management server The log of storage can also store all web log applied according to time or size, such as log management service The log of 3 web application is stored in device, all logs that 3 web can be applied are according to the time from the near to the remote or by remote It is either descending according to log or ascending stored to closely being stored.The embodiment of the present invention only enumerates two The mode of log is stored in the possible log management server of kind, the log stored in log management server can also be according to it He stores mode.
Optionally, in step 206, if the log stored in log management server is the difference applied according to web Be stored separately, then server to log management server send log extract request when, the log extract request in addition to Flag bit is carried, web application identities can also be carried, which is used to indicate log management server corresponding Web application log classification is lower to search target journaling.In this way, the log seeking scope that can abridge, guarantees quickly to find target day Will simultaneously exports, and malfunction elimination efficiency can be improved.Wherein, the quantity of web application identities is at least one, when web application identities Quantity be one and when the web application identities are the first web application identities, the operation requests for showing that server receives are not required to The cooperation of other web application servers is wanted to complete;It wraps when the quantity of web application identities is two or more and wherein When including the mark of the first web application, show that the operation requests that server receives need one or more web application server Cooperation is completed.
Server of the embodiment of the present invention is the operation requests addition flag bit received, and the invocation target thread process behaviour It requests.During the request of subject thread processing operation, server obtains each behaviour that call chain includes in treatment process Make, after adding flag bit for each operation, each operation for being added to flag bit is stored as a log into log library. If detect the subject thread failure alarm for handling the operation requests, and cooperative node is not sent out in call chain In the case where cloth fault warning, server searches the target journaling including flag bit and output in log library, in order to work Personnel carry out troubleshooting, can reduce malfunction elimination range, improve troubleshooting efficiency.
It is a kind of structural schematic diagram of malfunction elimination device provided in an embodiment of the present invention, such as the failure of Fig. 3 with reference to Fig. 3 Examination device, it may include: receiving unit 301, adding unit 302, processing unit 303, searching unit 304 and output unit 305。
Receiving unit 301, for receiving the operation requests for being directed to the first webpage web application;
Adding unit 302, for adding flag bit for operation requests when receiving unit receives operation requests;
Processing unit 303 is requested for invocation target thread processing operations;
Adding unit 302, there are also for the log addition flag bit to generate during processing;
Searching unit 304, for when detecting subject thread failure alarm, searching in log library to include mark The target journaling of position;
Output unit 305, for exporting target journaling, target journaling is used for malfunction elimination.
Optionally, malfunction elimination device further include: judging unit 306, for receiving when receiving unit 301 for first When the operation requests of webpage web application, judge whether carry flag bit in operation requests.
Optionally, adding unit 302 is used to add the concrete mode of flag bit in treatment process for the log generated are as follows:
Obtain each operation that subject thread call chain in processing operation request process includes;It adds and marks for each operation Will position;Each operation of flag bit will be added as a log recording into log library.
It optionally, include mark for sending the target interface of the operation requests in flag bit, output unit 305 has Body is used for: sending the target journaling to marked target interface is identified.
Optionally, judging unit 306 are also used to judge the association that call chain includes in subject thread processing operation request process Make whether node has issued fault warning.
Optionally, searching unit 304 is specifically used for:
Log is sent to log management server and extracts request, and log extracts and carries flag bit in request, and log extraction is asked It asks and is used to indicate log management server and searches the extraction log including flag bit in the log library of itself;
Receive the extraction log that log management server is sent;
Log will be extracted as target journaling.
Optionally, adding unit 302 is used to add the concrete mode of flag bit for operation requests are as follows: in the super of operation requests Flag bit is added in text transfer protocol HTTP gauge outfit.
The present embodiment is when receiving unit 301 receives the operation requests for the first webpage web application, adding unit 302 add flag bit, 303 invocation target thread process operation requests of processing unit, while adding unit for the operation requests Flag bit is added in 302 log to generate in subject thread processing operation request process.If detecting that event occurs in subject thread When barrier alarm, searching unit 304 searches the target journaling including the flag bit in log library, and output unit 305 exports the mesh Log is marked, in order to carry out malfunction elimination, malfunction elimination range can be reduced, improve troubleshooting efficiency.
It is understood that each functional module of the processing data information device of the present embodiment, the function of unit can bases Method specific implementation in above method embodiment, the correlation that specific implementation process is referred to above method embodiment are retouched It states, details are not described herein again.
It is a kind of schematic block diagram of server provided in an embodiment of the present invention referring to Fig. 3.The present embodiment as shown in the figure In terminal may include: one or more processors 401;One or more network interfaces 402 and memory 403.Above-mentioned place Reason device 401, network interface 402 and memory 403 are connected by bus 404.Memory 403 is counted for storing computer program Calculation machine program includes program instruction, and processor 401 is used to execute the program instruction of the storage of memory 403.Wherein, processor 401 It is configured for caller instruction execution:
When receiving the operation requests for the first webpage web application, flag bit is added for operation requests;
The request of invocation target thread processing operations, and flag bit is added for the log generated during processing;
When detecting subject thread failure alarm, the target journaling including flag bit is searched in log library;
Target journaling is exported, target journaling is used for malfunction elimination.
Optionally, after receiving the operation requests for the first webpage web application, flag bit is added for operation requests Before, processor 401 is configured for caller instruction also execution:
Judge whether carry flag bit in operation requests;If it is not, then executing is the step of operation requests add flag bit.
Optionally, flag bit is added in the log to generate during processing, and processor 401 is configured for caller Instruction is specific to be executed:
Obtain each operation that subject thread call chain in processing operation request process includes;It adds and marks for each operation Will position;Each operation of flag bit will be added as a log recording into log library.
Optionally, in flag bit include mark for sending the target interface of operation requests, export target journaling, processing Device 401 is configured for the specific execution of caller instruction:
Target journaling is sent to marked target interface is identified.
Optionally, when detecting subject thread failure alarm, the target including flag bit is searched in log library Before log, processor 401 is configured for caller instruction and also executes:
Whether the cooperative node for judging that call chain includes in subject thread processing operation request process has issued fault warning;
If cooperative node does not issue fault warning, executes and search the target journaling including flag bit in log library Step.
Optionally, the target journaling including flag bit is searched in log library, processor 401 is configured for caller Instruction is specific to be executed:
Log is sent to log management server and extracts request, and log extracts and carries flag bit in request, and log extraction is asked It asks and is used to indicate log management server and searches the extraction log including flag bit in the log library of itself;
Receive the extraction log that log management server is sent;
Log will be extracted as target journaling.
Optionally, flag bit is added for operation requests, processor 401 is configured for the specific execution of caller instruction: Flag bit is added in the hypertext transfer protocol HTTP gauge outfit of operation requests.
It should be appreciated that in embodiments of the present invention, alleged processor 401 can be central processing unit (Central Processing Unit, CPU), which can also be other general processors, digital signal processor (Digital Signal Processor, DSP), specific integrated circuit (Application Specific Integrated Circuit, ASIC), ready-made programmable gate array (Field-Programmable Gate Array, FPGA) or other programmable logic Device, discrete gate or transistor logic, discrete hardware components etc..General processor can be microprocessor or this at Reason device is also possible to any conventional processor etc..
Data are received or sent when the network interface 402 is for connecting network
The memory 403 may include read-only memory and random access memory, and to processor 401 provide instruction and Data.The a part of of memory 403 can also include nonvolatile RAM.For example, memory 403 can also be deposited Store up the information of device type.
In the specific implementation, processor 401 described in the embodiment of the present invention, network interface 402 and memory 403 can It executes and is retouched in the embodiment shown in FIG. 1 and embodiment shown in Fig. 2 of the method for malfunction elimination provided in an embodiment of the present invention The implementation of malfunction elimination device described in Fig. 3 of the embodiment of the present invention also can be performed in the implementation stated, no longer superfluous herein It states.
A kind of computer readable storage medium is provided in an embodiment of the present invention, and computer-readable recording medium storage has Computer program, computer program include program instruction, realization when program instruction is executed by processor:
When receiving the operation requests for the first webpage web application, flag bit is added for operation requests;
The request of invocation target thread processing operations, and flag bit is added for the log generated during processing;
When detecting subject thread failure alarm, the target journaling including flag bit is searched in log library;
Target journaling is exported, target journaling is used for malfunction elimination.
Optionally, after receiving the operation requests for the first webpage web application, flag bit is added for operation requests Before, it is also realized when program instruction is executed by processor:
Judge whether carry flag bit in operation requests;If it is not, then executing is the step of operation requests add flag bit.
Optionally, flag bit is added in the log to generate during processing, specific when program instruction is executed by processor It realizes:
Obtain each operation that subject thread call chain in processing operation request process includes;It adds and marks for each operation Will position;Each operation of flag bit will be added as a log recording into log library.
Optionally, in flag bit include mark for sending the target interface of operation requests, export target journaling, program Specific implementation when instruction is executed by processor:
Target journaling is sent to marked target interface is identified.
Optionally, when detecting subject thread failure alarm, the target including flag bit is searched in log library Before log, also realized when program instruction is executed by processor::
Whether the cooperative node for judging that call chain includes in subject thread processing operation request process has issued fault warning;
If cooperative node does not issue fault warning, executes and search the target journaling including flag bit in log library Step.
Optionally, the target journaling including flag bit is searched in log library, it is specific when program instruction is executed by processor It realizes:
Log is sent to log management server and extracts request, and log extracts and carries flag bit in request, and log extraction is asked It asks and is used to indicate log management server and searches the extraction log including flag bit in the log library of itself;
Receive the extraction log that log management server is sent;
Log will be extracted as target journaling.
Optionally, flag bit is added for operation requests, specific implementation when program instruction is executed by processor:: it is asked in operation Flag bit is added in the hypertext transfer protocol HTTP gauge outfit asked.
Those of ordinary skill in the art will appreciate that realizing all or part of the process in above-described embodiment method, being can be with Instruct relevant hardware to complete by computer program, program can be stored in a computer-readable storage medium, The program is when being executed, it may include such as the process of the embodiment of above-mentioned each method.Wherein, storage medium can for magnetic disk, CD, Read-only memory (Read-Only Memory, ROM) or random access memory (Random Access Memory, RAM) etc..
Above disclosed is only a preferred embodiment of the present invention, cannot limit the power of the present invention with this certainly Sharp range, those skilled in the art can understand all or part of the processes for realizing the above embodiment, and weighs according to the present invention Benefit requires made equivalent variations, still belongs to the scope covered by the invention.

Claims (10)

1. a kind of malfunction elimination method characterized by comprising
When receiving the operation requests for the first webpage web application, flag bit is added for the operation requests;
Operation requests described in invocation target thread process, and the flag bit, institute are added for the log generated during processing The flag bit that operation requests include is stated to be added in the attribute of subject thread;
When detecting the subject thread failure alarm, the target day including the flag bit is searched in log library Will;
The target journaling is exported, the target journaling is used for malfunction elimination;
Wherein, described to add flag bit for the operation requests, comprising: to call the first web to be using corresponding middleware The operation requests add flag bit, and the first web, which is when constructing the first web application using corresponding middleware, is The first web application addition;
Wherein, operation requests described in the invocation target thread process, and be described in the log generated during processing is added Flag bit, comprising: log module is called to read the flag bit for including in the subject thread attribute;And by the flag bit A part as the criteria field in the log generated during processing.
2. the method according to claim 1, wherein described work as the behaviour received for the first webpage web application After requesting, before adding flag bit for the operation requests, the method also includes:
Judge whether carry flag bit in the operation requests;
If it is not, then executing is the step of operation requests add flag bit.
3. method according to claim 1 or 2, which is characterized in that the log addition to generate during processing The flag bit, comprising:
Obtain the subject thread each operation that call chain includes during handling the operation requests;
The flag bit is added for each operation;
Each operation of the flag bit will be added as a log recording into log library.
4. method according to claim 1 or 2, which is characterized in that include for sending the operation in the flag bit The mark of the target interface of request, the output target journaling, comprising:
The target journaling is sent to the target interface marked.
5. according to the method described in claim 4, it is characterized in that, described ought detect the subject thread failure alarm When, before searching the target journaling including the flag bit in log library, the method also includes:
Whether the cooperative node for judging that call chain includes during the subject thread handles the operation requests has issued failure Alarm;
If the cooperative node does not issue fault warning, executes and search the target day including the flag bit in log library The step of will.
6. method according to claim 1 or 2, which is characterized in that described search in log library includes the flag bit Target journaling, comprising:
Log is sent to log management server and extracts request, and the log extracts in request and carries the flag bit, the day Will extraction request is used to indicate the log management server and searches the extraction including the flag bit in the log library of itself Log;
Receive the extraction log that the log management server is sent;
Using the extraction log as the target journaling.
7. method according to claim 1 or 2, which is characterized in that described to add flag bit, packet for the operation requests It includes:
The flag bit is added in the hypertext transfer protocol HTTP gauge outfit of the operation requests.
8. a kind of fault removal device characterized by comprising
Receiving unit, for receiving the operation requests for being directed to the first webpage web application;
Adding unit, for adding flag bit for the operation requests when receiving unit receives the operation requests;
Processing unit, for operation requests described in invocation target thread process, the flag bit that the operation requests include is added Into the attribute of subject thread;
The adding unit is also used to add the flag bit for the log generated during processing;
Searching unit includes the mark for being searched in log library when detecting the subject thread failure alarm The target journaling of will position;
Output unit, for exporting the target journaling, the target journaling is used for malfunction elimination;
Wherein, the adding unit is performed the following operations when adding flag bit for the operation requests: calling described first Web is that the operation requests add flag bit using corresponding middleware, and the first web is in structure using corresponding middleware It is added when building the first web application for the first web application;
Wherein, adding unit is specifically used for: log module being called to read the flag bit for including in the subject thread attribute; And using the flag bit as a part of the criteria field in the log generated during processing.
9. a kind of server, which is characterized in that including processor, network interface and memory, the processor, the network are connect Mouth and the memory are connected with each other, wherein for the memory for storing computer program, the computer program includes journey Sequence instruction, the processor are configured for calling described program instruction, execute such as the described in any item sides of claim 1-7 Method.
10. a kind of computer readable storage medium, which is characterized in that the computer-readable recording medium storage has computer journey Sequence, the computer program include program instruction, and described program instruction executes the processor such as The described in any item methods of claim 1-7.
CN201810298049.8A 2018-03-30 2018-03-30 A kind of malfunction elimination method, apparatus and server Active CN108667649B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810298049.8A CN108667649B (en) 2018-03-30 2018-03-30 A kind of malfunction elimination method, apparatus and server

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810298049.8A CN108667649B (en) 2018-03-30 2018-03-30 A kind of malfunction elimination method, apparatus and server

Publications (2)

Publication Number Publication Date
CN108667649A CN108667649A (en) 2018-10-16
CN108667649B true CN108667649B (en) 2019-09-27

Family

ID=63782175

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810298049.8A Active CN108667649B (en) 2018-03-30 2018-03-30 A kind of malfunction elimination method, apparatus and server

Country Status (1)

Country Link
CN (1) CN108667649B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110474809A (en) * 2019-08-20 2019-11-19 北京百度网讯科技有限公司 Method and apparatus for output information
CN111182291B (en) * 2020-01-02 2021-04-30 北京京东振世信息技术有限公司 Video maintenance method, maintenance end, server, system and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105159809A (en) * 2015-09-29 2015-12-16 杭州华为数字技术有限公司 State machine based fault positioning method and apparatus
CN105391772A (en) * 2015-10-16 2016-03-09 百度在线网络技术(北京)有限公司 Service request processing method, log processing method and service request processing device
CN106533810A (en) * 2016-12-28 2017-03-22 Tcl集团股份有限公司 Log management methods, terminal and cloud server
CN107018023A (en) * 2017-04-17 2017-08-04 广东浪潮大数据研究有限公司 A kind of server diagnostic method, apparatus and system
CN107545067A (en) * 2017-09-13 2018-01-05 广东欧珀移动通信有限公司 Log information report method, device and storage medium, ADSP and terminal

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105159809A (en) * 2015-09-29 2015-12-16 杭州华为数字技术有限公司 State machine based fault positioning method and apparatus
CN105391772A (en) * 2015-10-16 2016-03-09 百度在线网络技术(北京)有限公司 Service request processing method, log processing method and service request processing device
CN106533810A (en) * 2016-12-28 2017-03-22 Tcl集团股份有限公司 Log management methods, terminal and cloud server
CN107018023A (en) * 2017-04-17 2017-08-04 广东浪潮大数据研究有限公司 A kind of server diagnostic method, apparatus and system
CN107545067A (en) * 2017-09-13 2018-01-05 广东欧珀移动通信有限公司 Log information report method, device and storage medium, ADSP and terminal

Also Published As

Publication number Publication date
CN108667649A (en) 2018-10-16

Similar Documents

Publication Publication Date Title
RU2419986C2 (en) Combining multiline protocol accesses
CN111030857A (en) Network alarm method, device, system and computer readable storage medium
CN103441861B (en) A kind of data record generation method and device
CN111274604B (en) Service access method, device, equipment and computer readable storage medium
WO2019001312A1 (en) Method and apparatus for realizing alarm association, and computer readable storage medium
US20120297393A1 (en) Data Collecting Method, Data Collecting Apparatus and Network Management Device
CN105516266B (en) A kind of business monitoring method, system and relevant device
CN112350854B (en) Flow fault positioning method, device, equipment and storage medium
CN106201754A (en) Mission bit stream analyzes method and device
CN111258867B (en) Public cloud dial testing method and device
CN108667649B (en) A kind of malfunction elimination method, apparatus and server
JP2009244948A (en) Service processing status analyzing program, service processing status analyzing device, and service processing status analyzing method
CN104639386B (en) fault location system and method
CN103259684A (en) Internet service monitoring method and system
CN114465741B (en) Abnormality detection method, abnormality detection device, computer equipment and storage medium
CN114791846A (en) Method for realizing observability aiming at cloud native chaos engineering experiment
CN104281488B (en) The method and system of server engine
CN114328132A (en) Method, device, equipment and medium for monitoring state of external data source
WO2020006903A1 (en) Financial data interaction method, apparatus computer device and storage medium
CN108959037A (en) A kind of data center's automatic detecting method and device
CN107171873A (en) A kind of method and apparatus of Message Processing
CN110750425A (en) Database monitoring method, device and system and storage medium
CN113407374A (en) Fault processing method and device, fault processing equipment and storage medium
CN115865734B (en) Fault detection method, data generation method, device, equipment and medium
CN116881100A (en) Log detection method, log alarm method, system, equipment and storage medium

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