WO2018019242A1 - 网站服务器的自恢复方法和自恢复系统 - Google Patents

网站服务器的自恢复方法和自恢复系统 Download PDF

Info

Publication number
WO2018019242A1
WO2018019242A1 PCT/CN2017/094396 CN2017094396W WO2018019242A1 WO 2018019242 A1 WO2018019242 A1 WO 2018019242A1 CN 2017094396 W CN2017094396 W CN 2017094396W WO 2018019242 A1 WO2018019242 A1 WO 2018019242A1
Authority
WO
WIPO (PCT)
Prior art keywords
website
script
self
service
server
Prior art date
Application number
PCT/CN2017/094396
Other languages
English (en)
French (fr)
Inventor
邹强
Original Assignee
深圳创维数字技术有限公司
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 深圳创维数字技术有限公司 filed Critical 深圳创维数字技术有限公司
Publication of WO2018019242A1 publication Critical patent/WO2018019242A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/14Error detection or correction of the data by redundancy in operation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/14Error detection or correction of the data by redundancy in operation
    • G06F11/1402Saving, restoring, recovering or retrying
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3003Monitoring arrangements specially adapted to the computing system or computing system component being monitored

Definitions

  • the present disclosure relates to the field of data network control technologies, for example, to a self-recovery method and a self-recovery system for a website server.
  • the website (WEB) server as the center for providing data services, must run 24 hours.
  • the engineers hope to find out that the system is running abnormally through the monitoring program, and hope that the website server can automatically restore the website service in time and the website server can notify the relevant management personnel.
  • performance monitoring can only be performed on the website server.
  • the website server does not have a mechanism for automatically recovering the website service, and cannot resume the system operation when the website service is found to be faulty.
  • the website server lacks a mechanism for short message notification and email notification.
  • the self-recovery method and the self-recovery system of the website server can monitor the website server, timely discover the failure of the website service of the website server, and automatically restore the website service in time, which is highly implementable.
  • a self-healing method for a website server comprising:
  • the preset web service monitoring script of the web server is called every preset period
  • the preset self-recovery script of the website server is invoked, so that the website service restarts.
  • the method further includes:
  • the preset notification script of the website server is invoked to issue at least one of a short message notification and an email notification.
  • the method further includes:
  • the process name, the process port, and the log output path of the monitored website service are configured, and the website service monitoring script, the self-recovery script, and the notification script are preset.
  • the website service monitoring script is used to monitor a process name and a process port of the monitored website service.
  • the method further includes:
  • the website server running status is recorded periodically, and the information of the self-recovery script is called.
  • the monitoring unit is configured to invoke a preset web service monitoring script of the web server every preset period;
  • a determining unit configured to determine, according to the website service monitoring script, whether the website service of the website server stops running
  • a recovery unit configured to: if the website service of the website server stops running, invoke a preset self-recovery script of the website server, so that the website service restarts.
  • the system further includes a notification unit, wherein the notification unit is configured to invoke a preset notification script of the website server to send a short message notification and mail if the website service of the website server stops running. At least one of the notifications.
  • system further includes a configuration unit, where the configuration unit is configured to:
  • the process name, the process port, and the log output path of the monitored website service are configured, and the website service monitoring script, the self-recovery script, and the notification script are preset.
  • the website service monitoring script is used to monitor a process name and a process port of the monitored website service.
  • system further includes a log unit, wherein the log unit is configured to periodically record a website server running status, and invoke information of the self-recovery script.
  • a computer readable storage medium storing computer executable instructions arranged to perform the above method.
  • a web server that includes:
  • At least one processor At least one processor
  • the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to cause the at least one processor to perform the method described above.
  • a self-recovery method and a self-recovery system for a website server wherein the self-recovery system includes a monitoring unit, a judging unit, and a restoring unit, and the monitoring unit is configured to invoke a preset web service of the web server every preset period.
  • Monitoring the script the determining unit is configured to determine, according to the website service monitoring script, whether the website service of the website server stops running; and the recovery unit is configured to: if the website service of the website server stops running, call the location Pre-set self-recovery scripts for the web server to restart the web service.
  • the self-recovery method and self-recovery system of the website server can monitor the website server, timely discover the failure of the website service of the website server, and automatically restore the website service in time, which is highly implementable.
  • FIG. 1 is a flow chart of a method of a first embodiment of a self-recovery method of a website server.
  • FIG. 2 is a flow chart of a method of a second embodiment of a self-recovery method of a website server.
  • FIG. 3 is a flow chart of a method of a third embodiment of a self-recovery method of a website server.
  • FIG. 4 is a block diagram showing the structure of a first embodiment of a self-recovery system of a website server.
  • Figure 5 is a block diagram showing the structure of a second embodiment of the self-recovery system of the website server.
  • FIG. 6 is a schematic diagram of a hardware structure of a website server according to an embodiment.
  • FIG. 1 is a flow chart of a method of a first embodiment of a self-recovery method for a website (WEB) server.
  • the self-recovery method of the website server provided in this embodiment can be applied to various website services of the website server.
  • the self-healing method of the website server includes the following steps.
  • step 101 a preset web service monitoring script of the web server is called every preset period.
  • a website (WEB) service may refer to a computer program stored on the Internet.
  • the website server may provide a document to a website client such as a browser, and place the website file for browsing by users all over the world; the website server may also place a data file for the website server. Downloaded by users all over the world.
  • the three main web server systems are Apache, Nginx, and Internet Information Services (IIS).
  • the preset period may be 2 seconds (s), 10s or 5 minutes (min).
  • the website service monitoring script can be used to monitor a process name and a process port of the monitored website service.
  • step 102 it is determined whether the website service of the website server stops running.
  • the workflow of a web service can include: a connection process, a request process, a reply process, and closing a connection.
  • the web server can establish a connection with the browser. Users can find and open the virtual file socket (socket) to see if the connection process is implemented. The establishment of this virtual file means that the web server has successfully established a connection with the browser.
  • the web server's browser can use the socket file to make multiple requests to its server.
  • a request submitted by the browser during the request process may be transmitted to the website server by using a Hyper Text Transfer Protocol (HTTP), so that the website server processes the request, and the website server utilizes HTTP.
  • HTTP Hyper Text Transfer Protocol
  • Closing the connection can be the process of disconnecting between the web server and the browser after the previous step (answering process) is completed.
  • the above steps of the web service are closely related and logical.
  • the web server can support multiple processes, multiple threads, and multiple processes and multiple threads. Problems in any of the above steps may cause the website service to stop working. Determine whether the website service of the website server stops running.
  • the website service of the website server is stopped, if it is determined that the identification (ID) of the process (or the name of the process) exists, it may be determined that the website service has not stopped; if it is determined that the process identifier does not exist ( Identification, ID) (or the name of the process), you can judge that the website service has stopped.
  • ID the identification
  • ID the process identifier
  • step 103 if the website service of the website server stops running, the preset self-recovery script of the website server is invoked, so that the website service restarts.
  • the self-recovery script can be a variety of scripts for launching the web server's web service.
  • the above various scripts can be developed in advance and various scripts can be configured in advance to the web server's web service.
  • the website server When the website server is started, information such as the process name and process port of the website service of the website server can be obtained, and the preset website service monitoring script of the website server can be periodically called, and the result returned by the website service monitoring script is judged. Whether the website service of the website server stops running, and whether it is necessary to call a preset self-recovery script;
  • the self-recovery method of the website server provided by the embodiment can monitor the website server, and can timely discover the failure of the website service of the website server, so that the website service of the website server is automatically restored in time, and the implementation is strong.
  • the self-recovery method of the website server of this embodiment can selectively issue notifications, configuration parameters, preset scripts, and record information for different stages of the website service on the basis of the first embodiment.
  • the self-healing method of the website server includes the following steps.
  • step 201 the process name, process port, and log output path of the monitored website service are configured; preset website service monitoring scripts, self-recovery scripts, and notification scripts.
  • the subsequent process does not need to call the notification script, you can configure only the process of the monitored website service. Name, process port, log output path, and default website service monitoring scripts and self-recovery scripts. If the subsequent process needs to invoke the website service monitoring script, the self-recovery script, and the notification script, you can configure the process name, process port, log output path, preset website service monitoring script, self-recovery script, and notification script of the monitored website service.
  • step 202 a preset website service monitoring script is called every preset period.
  • step 203 it is determined whether the website service of the website server stops running.
  • the self-recovery method of the website server provided in this embodiment may further include: periodically recording the running status of the website server, and calling the information of the self-recovery script.
  • the system script can be used to record the system running steps and results for later viewing.
  • step 2041 if the website service of the website server stops running, the preset self-recovery script of the website server is invoked, so that the website service restarts.
  • step 2042 if the website service of the website server stops running, the preset notification script of the website server is invoked to issue at least one of a short message notification and a mail notification.
  • the preset website service monitoring script of the website service may be periodically called. If the website service has stopped running according to the result returned by the website service monitoring script, the self-recovery script may be called. Notify the script and wait for the next cycle.
  • the notification script can send notifications by calling the SMS interface and the mail interface.
  • the step 2041 and the step 2042 are not in the order of the sequence.
  • the step 2041 can be performed before the step 2042 is performed.
  • the step 2042 can be performed first, and then the step 2041 can be performed. Steps 2041 and 2042 can be performed simultaneously, and steps 2041 and 2042 can be performed. one of.
  • the self-healing methods of the website server include:
  • the development notification script calls the short message interface and the mail interface
  • the automatic recovery module and the notification module are called, waiting for the next cycle, and when the monitoring of the website server is normal, waiting for the next monitoring cycle.
  • the method in this embodiment includes the following steps.
  • step 301 the configuration file is loaded.
  • step 302 the process information to be monitored is read.
  • step 303 the process monitoring command script is invoked, the service running status result is returned, and the log is recorded.
  • step 304 it is determined whether the website service is running normally. If the website service is running normally, step 305 is performed. If the website service is stopped, step 306 is performed.
  • step 305 the waiting time of the configuration file is read, the thread waits, and step 301 is continued.
  • step 306 the (self-recovery) script of the website server is executed, and step 307 is performed.
  • step 307 the short message interface service and the mail interface service are invoked, the log is recorded, and the process returns to step 305.
  • the self-recovery method of the website server provided in this embodiment can dynamically configure the process name, process port, log output path, monitoring period, and notification information of the monitored website service, and automatically restore the website when the website server fails.
  • Service send SMS notifications and email notifications to inform relevant personnel.
  • the self-recovery system of the website server in this embodiment may perform the self-recovery method of the website server in the above embodiment.
  • the system can be implemented in a computer program, which can be a functional software architecture implemented in a computer program.
  • FIG. 4 is a block diagram showing the structure of a first embodiment of a self-recovery system of a website server.
  • the self-recovery system of the website server provided in this embodiment is applicable to various website services of the website server.
  • the self-recovery system of the website server can be applied to a website server, and the self-recovery system of the website server can include: a monitoring unit, a judging unit, and a restoring unit.
  • the monitoring unit is configured to invoke a preset web service monitoring script of the web server every preset period.
  • the determining unit is configured to determine, according to the website service monitoring script, whether the website service of the website server stops running.
  • the recovery unit is configured to call a preset self-recovery script of the website server if the website service of the website server stops running, so that the website service restarts.
  • the self-recovery system of the website server provided in this embodiment can monitor the website server, and timely discover the failure of the website service of the website server, and automatically restore the website service in time, which is highly implementable.
  • Figure 5 is a block diagram showing the structure of a second embodiment of the self-recovery system of the website server.
  • the self-recovery system of the website server provided by this embodiment adds a notification unit, a configuration unit, and a log unit.
  • the self-recovery system of the website server can be applied to a website server, including: a monitoring unit, a judging unit, and a restoring unit.
  • the monitoring unit is configured to invoke a preset web service monitoring script of the web server every preset period.
  • the determining unit is configured to determine, according to the website service monitoring script, whether the website service of the website server stops running.
  • a recovery unit configured to: if the website service of the website server stops running, invoke a preset self-recovery script of the website server, so that the website service restarts.
  • the self-recovery system of the website server further includes a notification unit, wherein the notification unit is configured to invoke a preset notification script of the website server if the website service of the website server stops running, so that Send at least one of a text message notification and an email notification.
  • the self-recovery system of the website server further includes a configuration unit, where the configuration unit is configured to: configure a process name, a process port, and a log output path of the monitored website service, The website service monitoring script and the self-recovery script; or
  • the website service monitoring script is used to monitor a process name and a process port of the monitored website service.
  • the self-recovery system of the website server further includes a log unit, wherein the log unit is configured to periodically record a website server running status, and invoke information of the self-recovery script.
  • the self-recovery system of the website server provided in this embodiment can dynamically configure the process name, process port, log output path, monitoring period, and notification information of the monitored website service, and when the website service of the website server fails. Automatically restore the website service, send SMS notifications and email notifications to inform relevant personnel.
  • a self-recovery method and a self-recovery system for a website server can monitor a website server and discover in time when the website server's website service fails, and automatically restore the website service in time, which is highly implementable.
  • All or part of the steps of implementing the above embodiments may be implemented by hardware, or may be instructed by a program to execute related hardware, the program may be stored in a computer readable storage medium, the computer readable storage medium storing the computer executable The instructions, the computer executable instructions are arranged to perform the method of any of the above embodiments.
  • the storage medium may be a non-transitory storage medium, including: a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and the like.
  • the medium of the code can also be a transient storage medium.
  • the website server includes:
  • At least one processor 60 is exemplified by a processor 60 in FIG. 6; a memory 61; and a communication interface 62 and a bus 63.
  • the processor 60, the memory 61, and the communication interface 62 can complete communication with each other through the bus 63.
  • Communication interface 62 can transmit data and signals.
  • Processor 60 may invoke logic instructions in memory 61 to perform the methods of the above-described embodiments.
  • logic instructions in the memory 61 described above may be implemented in the form of a software functional unit and sold or used as a stand-alone product, and may be stored in a computer readable storage medium.
  • the memory 61 is used as a computer readable storage medium for storing software programs, computer executable programs, and program instructions or modules corresponding to the methods in the above embodiments.
  • the processor 60 executes the functional application and the data processing by executing a software program, an instruction or a module stored in the memory 61, that is, the method in the above embodiment is implemented.
  • the memory 61 may include a storage program area and an storage data area, wherein the storage program area may store an operating system, an application required for at least one function; the storage data area may store data created according to usage of the terminal device, and the like. Further, the memory 61 may include a high speed random access memory, and may also include a nonvolatile memory.
  • the above technical solution may be embodied in the form of a software product stored in a storage medium, including one or more instructions for causing a computer device (which may be a personal computer, a server, a network device, etc.) to execute All or part of the steps of the method described in the above embodiments.
  • a computer device which may be a personal computer, a server, a network device, etc.
  • the self-recovery method and self-recovery system of the website server can monitor the website server, timely discover the failure of the website service of the website server, and automatically restore the website service in time.

Abstract

一种网站服务器的自恢复方法和自恢复系统,其中,所述自恢复系统包括监控单元、判断单元和恢复单元,所述监控单元设置为每间隔预设周期调用网站服务器的预设的网站服务监控脚本;所述判断单元设置为根据所述网站服务监控脚本,判断所述网站服务器的网站服务是否停止运行;以及所述恢复单元设置为若所述网站服务器的网站服务停止运行,则调用所述网站服务器的预设的自恢复脚本,以便所述网站服务重新开始运行。

Description

网站服务器的自恢复方法和自恢复系统 技术领域
本公开涉及数据网络控制技术领域,例如,涉及一种网站服务器的自恢复方法和自恢复系统。
背景技术
网站(WEB)服务器作为提供数据服务的中心,必须24小时运行。当网站服务器出现故障的时候,工程师们希望能够通过监控程序第一时间发现系统运行异常,并希望网站服务器及时地自动恢复网站服务以及网站服务器可以向相关管理人员发出通知。相关技术中,只能对网站服务器进行性能监控,网站服务器没有自动恢复网站服务的机制,不能在发现网站服务出现故障的时候及时恢复系统运行,网站服务器缺乏短信通知和邮件通知的机制。
发明内容
一种网站服务器的自恢复方法和自恢复系统,能够监控网站服务器,及时发现网站服务器的网站服务出现的故障及时自动恢复网站服务,可实施性强。
一种网站服务器的自恢复方法,包括:
每间隔预设周期调用网站服务器的预设的网站服务监控脚本;
根据所述网站服务监控脚本,判断所述网站服务器的网站服务是否停止运行;以及
若所述网站服务器的网站服务停止运行,则调用所述网站服务器的预设的自恢复脚本,以便所述网站服务重新开始运行。
可选的,所述方法还包括:
若所述网站服务器的网站服务停止运行,则调用所述网站服务器的预设的通知脚本,以便发出短信通知和邮件通知中的至少之一。
可选的,每间隔预设周期调用网站服务器的预设的网站服务监控脚本之前,所述方法还包括:
配置被监控的网站服务的进程名称、进程端口和日志输出路径,预设所述网站服务监控脚本和所述自恢复脚本;或,
配置被监控的网站服务的进程名称、进程端口和日志输出路径,预设所述网站服务监控脚本、所述自恢复脚本和所述通知脚本。
可选的,所述网站服务监控脚本用于监控被监控的网站服务的进程名称和进程端口。
可选的,所述方法还包括:
定时记录网站服务器运行状态,以及调用所述自恢复脚本的信息。
一种网站服务器的自恢复系统,设置于网站服务器,包括:
监控单元,设置为每间隔预设周期调用网站服务器的预设的网站服务监控脚本;
判断单元,设置为根据所述网站服务监控脚本,判断所述网站服务器的网站服务是否停止运行;以及
恢复单元,设置为若所述网站服务器的网站服务停止运行,则调用所述网站服务器的预设的自恢复脚本,以便所述网站服务重新开始运行。
可选的,所述系统还包括通知单元,其中,所述通知单元设置为若所述网站服务器的网站服务停止运行,则调用所述网站服务器的预设的通知脚本,以便发出短信通知和邮件通知中的至少之一。
可选的,所述系统还包括配置单元,其中,所述配置单元设置为:
配置被监控的网站服务的进程名称、进程端口和日志输出路径,预设所述网站服务监控脚本和所述自恢复脚本;或,
配置被监控的网站服务的进程名称、进程端口和日志输出路径,预设所述网站服务监控脚本、所述自恢复脚本和所述通知脚本。
可选的,所述网站服务监控脚本用于监控被监控的网站服务的进程名称和进程端口。
可选的,所述系统还包括日志单元,其中,所述日志单元设置为定时记录网站服务器运行状态,以及调用所述自恢复脚本的信息。
一种计算机可读存储介质,存储有计算机可执行指令,所述计算机可执行指令设置为执行上述方法。
一种网站服务器,包括:
至少一个处理器;以及
与所述至少一个处理器通信连接的存储器;其中,
所述存储器存储有可被所述至少一个处理器执行的指令,所述指令被所述至少一个处理器执行,以使所述至少一个处理器执行上述的方法。
一种网站服务器的自恢复方法和自恢复系统,其中,所述自恢复系统包括监控单元、判断单元和恢复单元,所述监控单元设置为每间隔预设周期调用网站服务器的预设的网站服务监控脚本;所述判断单元设置为根据所述网站服务监控脚本,判断所述网站服务器的网站服务是否停止运行;以及所述恢复单元设置为若所述网站服务器的网站服务停止运行,则调用所述网站服务器的预设的自恢复脚本,以便所述网站服务重新开始运行。该网站服务器的自恢复方法和自恢复系统,能够监控网站服务器,及时发现网站服务器的网站服务出现的故障,及时自动恢复网站服务,可实施性强。
附图说明
图1是网站服务器的自恢复方法第一个实施例的方法流程图。
图2是网站服务器的自恢复方法第二个实施例的方法流程图。
图3是网站服务器的自恢复方法第三个实施例的方法流程图。
图4是网站服务器的自恢复系统第一个实施例的结构方框图。
图5是网站服务器的自恢复系统第二个实施例的结构方框图。
图6是一实施例提供的网站服务器的硬件结构示意图。
具体实施方式
为使技术方案更加清楚,下面将结合附图对实施例的技术方案作详细描述。
实施例1
图1是网站(WEB)服务器的自恢复方法第一个实施例的方法流程图。本实施例提供的网站服务器的自恢复方法,可应用于网站服务器的多种网站服务。
该网站服务器的自恢复方法,包括以下步骤。
在步骤101中,每间隔预设周期调用网站服务器的预设的网站服务监控脚本。
网站(WEB)服务可以是指存储于因特网上一种计算机程序,网站服务器可以向浏览器等网站客户端提供文档,放置网站文件,供全世界的用户浏览;网站服务器也可以放置数据文件,供全世界的用户下载。主流的三个网站服务器系统是Apache、Nginx和互联网信息服务(Internet Information Services,IIS)。
其中,预设周期可以为2秒(s)、10s或5分钟(min)。
其中,所述网站服务监控脚本可以用于监控被监控的网站服务的进程名称和进程端口。
在步骤102中,根据所述网站服务监控脚本,判断所述网站服务器的网站服务是否停止运行。
网站服务的工作流程可包括:连接过程、请求过程、应答过程以及关闭连接。连接过程中,网站服务器可以和浏览器之间建立连接。用户可以找到和打开套接字(socket)这个虚拟文件,查看连接过程是否实现。这个虚拟文件的建立意味着网站服务器已经浏览器成功建立连接。请求过程中,网站服务器的浏览器可以利用套接字(socket)这个文件向其服务器提出多种请求。应答过程中,可以利用超文本传输协议(Hyper Text Transfer Protocol,HTTP)把在所述请求过程中浏览器提出来的请求传输到网站服务器,使得网站服务器对所述请求进行处理,网站服务器利用HTTP把任务处理的结果传输到浏览器,在浏览器上展示上述所请求对应的界面。关闭连接可以是当上一个步骤(应答过程)完成以后,网站服务器和浏览器之间断开连接的过程。网站服务的上述步骤紧密相联,逻辑性比较强,网站服务器可以支持多个进程、多个线程以及多个进程与多个线程相混合的技术。上述步骤中任何一个环节出现问题都可能导致网站服务停止运行。判断所述网站服务器的网站服务是否停止运行。
其中,判断所述网站服务器的网站服务是否停止运行时,如果判断存在进程的标识(Identification,ID)(或进程的名称),可以判断网站服务还未停止;如果判断已不存在进程的标识(Identification,ID)(或进程的名称),可以判断网站服务已停止。
在步骤103中,若所述网站服务器的网站服务停止运行,则调用所述网站服务器的预设的自恢复脚本,以便所述网站服务重新开始运行。
自恢复脚本可以是启动网站服务器的网站服务的多种脚本,可以预先开发上述多种脚本并将多种脚本提前配置到网站服务器的网站服务中。
以下说明本实施例提供的网站服务器的自恢复方法的总体流程:
当网站服务器启动的时候,可以获取到网站服务器的网站服务的进程名称以及进程端口等信息,可以周期性循环调用网站服务器的预设的网站服务监控脚本,根据网站服务监控脚本返回的结果,判断所述网站服务器的网站服务是否停止运行,以及判断是否需要调用预设的自恢复脚本;
当监控到所述网站服务已经停止运行,可以调用自恢复脚本,等待下一个周期;以及
当监控到所述网站服务运行正常,则等待下一个监控周期。
本实施例提供的网站服务器的自恢复方法,能够监控网站服务器,能够及时发现网站服务器的网站服务出现的故障,使得网站服务器的网站服务及时自动恢复,可实施性强。
实施例2
图2是网站服务器的自恢复方法第二个实施例的方法流程图。本实施例的网站服务器的自恢复方法在第一个实施例的基础上,针对网站服务的不同阶段,可以选择性地发出通知、配置参数、预设脚本和记录信息的情况。
该网站服务器的自恢复方法,包括以下步骤。
在步骤201中,配置被监控的网站服务的进程名称、进程端口和日志输出路径;预设网站服务监控脚本、自恢复脚本和通知脚本。
若后续流程不需要调用通知脚本,则可以只配置被监控的网站服务的进程 名称、进程端口、日志输出路径,以及预设网站服务监控脚本和自恢复脚本。若后续流程需要调用网站服务监控脚本、自恢复脚本和通知脚本,则可以配置被监控的网站服务的进程名称、进程端口、日志输出路径,预设网站服务监控脚本、自恢复脚本和通知脚本。
在步骤202中,每间隔预设周期调用预设的网站服务监控脚本。
在步骤203中,根据所述网站服务监控脚本,判断所述网站服务器的网站服务是否停止运行。
本实施例提供的网站服务器的自恢复方法,还可以包括,定时记录网站服务器运行状态,以及调用自恢复脚本的信息。该步骤中,可以通过系统脚本记录系统运行步骤及结果,方便后期查看。
在步骤2041中,若所述网站服务器的网站服务停止运行,则调用所述网站服务器的预设的自恢复脚本,以便所述网站服务重新开始运行。
在步骤2042中,若所述网站服务器的网站服务停止运行,则调用所述网站服务器的预设的通知脚本,以便发出短信通知和邮件通知中的至少之一。
当网站服务器启动的时候,可以周期性循环调用网站服务的预设的网站服务监控脚本,若根据网站服务监控脚本返回的结果,判断出所述网站服务已经停止运行,则可以调用自恢复脚本和通知脚本,等待下一个周期。通知脚本可以通过调用短信接口和邮件接口发送通知。
步骤2041和步骤2042并无先后顺序之分,可以先执行步骤2041再执行步骤2042,可以先执行步骤2042再执行步骤2041,可以同时执行步骤2041和步骤2042,还可以执行步骤2041和步骤2042中的一个。
实施例3
图3是网站服务器的自恢复方法第三个实施例的方法流程图。该网站服务器的自恢复方法包括:
配置网站服务器需要的进程名称、进程端口、监控周期、短信接口和邮件接口;
开发网站服务相关进程的自恢复脚本;
开发通知脚本调用短信接口和邮件接口;
启动程序,调用网站服务监控脚本,根据网站服务监控脚本返回的结果,判断是否调用自恢复脚本和通知脚本;以及
当监控到网站服务已经停止运行,则调用自动恢复模块和通知模块,等待下一个周期,当监控到网站服务器运行正常的时候,则等待下一个监控周期。
参见图3,本实施例中的方法包括以下步骤。
在步骤301中,加载配置文件。
在步骤302中,读取要监控的进程信息。
在步骤303中,调用进程监控命令脚本,返回服务运行状态结果,并记录日志。
在步骤304中,判断网站服务是否正常运行,若网站服务正常运行,执行步骤305,若网站服务停止运行,执行步骤306。
在步骤305中,读取配置文件的等待时间,线程等待,继续执行步骤301。
在步骤306中,执行网站服务器的(自恢复)脚本,执行步骤307。
在步骤307中,调用短信接口服务和邮件接口服务,记录日志,返回执行步骤305。
本实施例提供的网站服务器的自恢复方法,可以动态的配置被监控的网站服务的进程名称、进程端口、日志输出路径、监控周期和通知信息等,并在网站服务器出现故障的时候自动恢复网站服务,发出短信通知和邮件通知,以告知相关人员。
以下为本实施例提供的网站服务器的自恢复系统的实施例。本实施例中的网站服务器的自恢复系统可以执行上述实施例中的网站服务器的自恢复方法。该系统可以用计算机程序来实现的,该系统可以是用计算机程序实现的功能软件架构。
实施例4
图4是网站服务器的自恢复系统第一个实施例的结构方框图。本实施例提供的网站服务器的自恢复系统,适用于网站服务器的多种网站服务。
该网站服务器的自恢复系统可以应用于网站服务器,该网站服务器的自恢复系统可以包括:监控单元、判断单元以及恢复单元。
监控单元设置为每间隔预设周期调用网站服务器的预设的网站服务监控脚本。
判断单元设置为根据所述网站服务监控脚本,判断所述网站服务器的网站服务是否停止运行。
恢复单元设置为若所述网站服务器的网站服务停止运行,则调用所述网站服务器的预设的自恢复脚本,以便所述网站服务重新开始运行。
本实施例提供的网站服务器的自恢复系统,能够监控网站服务器,并及时发现网站服务器的网站服务出现的故障,及时自动恢复网站服务,可实施性强。
实施例5
图5是网站服务器的自恢复系统第二个实施例的结构方框图。在第一个实施例的基础上,本实施例提供的网站服务器的自恢复系统增加了通知单元、配置单元和日志单元。
该网站服务器的自恢复系统,可以应用于网站服务器,包括:监控单元、判断单元以及恢复单元。
监控单元设置为每间隔预设周期调用网站服务器的预设的网站服务监控脚本。
判断单元设置为根据所述网站服务监控脚本,判断所述网站服务器的网站服务是否停止运行。
恢复单元,设置为若所述网站服务器的网站服务停止运行,则调用所述网站服务器的预设的自恢复脚本,以便所述网站服务重新开始运行。
可选的,所述网站服务器的自恢复系统还包括通知单元,其中,所述通知单元设置为若所述网站服务器的网站服务停止运行,则调用所述网站服务器的预设的通知脚本,以便发出短信通知和邮件通知中的至少之一。
可选的,所述网站服务器的自恢复系统还包括配置单元,其中,所述配置单元设置为:配置被监控的网站服务的进程名称、进程端口和日志输出路径, 所述网站服务监控脚本和所述自恢复脚本;或
配置被监控的网站服务的进程名称、进程端口和日志输出路径,所述网站服务监控脚本、所述自恢复脚本和所述通知脚本。
可选的,所述网站服务监控脚本用于监控被监控网站服务的进程名称和进程端口。
可选的,所述网站服务器的自恢复系统还包括日志单元,其中,所述日志单元设置为定时记录网站服务器运行状态,以及调用自恢复脚本的信息。
本实施例提供的网站服务器的自恢复系统,可以动态的配置被监控的网站服务的进程名称、进程端口、日志输出路径、监控周期和通知信息等,并在网站服务器的网站服务出现故障的时候自动恢复网站服务,发出短信通知和邮件通知,以告知相关人员。
一种网站服务器的自恢复方法和自恢复系统,能够监控网站服务器,并在网站服务器的网站服务出现故障的时候及时发现,及时自动恢复网站服务,可实施性强。
实现上述实施例的全部或部分步骤可以通过硬件来完成,也可以通过程序来指令相关的硬件完成,该程序可以存储于一计算机可读存储介质中,该计算机可读存储介质存储有计算机可执行指令,所述计算机可执行指令设置为执行上述任一实施例中的方法。
存储介质可以是非暂态存储介质,包括:U盘、移动硬盘、只读存储器(Read-Only Memory,ROM)、随机存取存储器(Random Access Memory,RAM)、磁盘或光盘等多种可以存储程序代码的介质,也可以是暂态存储介质。
本实施例提供了一种网站服务器的硬件结构示意图。参见图6,该网站服务器包括:
至少一个处理器(processor)60,图6中以一个处理器60为例;存储器(memory)61;还可以包括通信接口(Communications Interface)62和总线63。其中,处理器60、存储器61以及通信接口62可以通过总线63完成相互间的通信。通信接口62可以传输数据和信号。处理器60可以调用存储器61中的逻辑指令,以执行上述实施例的方法。
此外,上述的存储器61中的逻辑指令可以通过软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。
存储器61作为一种计算机可读存储介质,可用于存储软件程序、计算机可执行程序,如上述实施例中的方法对应的程序指令或模块。处理器60通过运行存储在存储器61中的软件程序、指令或模块,从而执行功能应用以及数据处理,即实现上述实施例中的方法。
存储器61可包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需的应用程序;存储数据区可存储根据终端设备的使用所创建的数据等。此外,存储器61可以包括高速随机存取存储器,还可以包括非易失性存储器。
以上技术方案可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括一个或多个指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行上述实施例所述方法的全部或部分步骤。
工业实用性
网站服务器的自恢复方法和自恢复系统,能够监控网站服务器,及时发现网站服务器的网站服务出现的故障,及时自动恢复网站服务。

Claims (11)

  1. 一种网站服务器的自恢复方法,包括:
    每间隔预设周期调用网站服务器的预设的网站服务监控脚本;
    根据所述网站服务监控脚本,判断所述网站服务器的网站服务是否停止运行;以及
    若所述网站服务器的网站服务停止运行,则调用所述网站服务器的预设的自恢复脚本,以便所述网站服务重新开始运行。
  2. 根据权利要求1所述的方法,还包括:
    若所述网站服务器的网站服务停止运行,则调用所述网站服务器的预设的通知脚本,以便发出短信通知和邮件通知中的至少之一。
  3. 根据权利要求2所述的方法,每间隔预设周期调用网站服务器的预设的网站服务监控脚本之前,所述方法还包括:
    配置被监控的网站服务的进程名称、进程端口和日志输出路径,预设所述网站服务监控脚本和所述自恢复脚本;或,
    配置被监控的网站服务的进程名称、进程端口和日志输出路径,预设所述网站服务监控脚本、所述自恢复脚本和所述通知脚本。
  4. 根据权利要求1所述的方法,其中,所述网站服务监控脚本用于监控被监控的网站服务的进程名称和进程端口。
  5. 根据权利要求1所述的方法,还包括:
    定时记录网站服务器运行状态,以及调用所述自恢复脚本的信息。
  6. 一种网站服务器的自恢复系统,设置于网站服务器,包括:
    监控单元,设置为每间隔预设周期调用网站服务器的预设的网站服务监控脚本;
    判断单元,设置为根据所述网站服务监控脚本,判断所述网站服务器的网 站服务是否停止运行;以及
    恢复单元,设置为若所述网站服务器的网站服务停止运行,则调用所述网站服务器的预设的自恢复脚本,以便所述网站服务重新开始运行。
  7. 根据权利要求6所述的系统,还包括通知单元,其中,所述通知单元设置为若所述网站服务器的网站服务停止运行,则调用所述网站服务器的预设的通知脚本,以便发出短信通知和邮件通知中的至少之一。
  8. 根据权利要求7所述的系统,还包括配置单元,其中,所述配置单元设置为:
    配置被监控的网站服务的进程名称、进程端口和日志输出路径,预设所述网站服务监控脚本和所述自恢复脚本;或,
    配置被监控的网站服务的进程名称、进程端口和日志输出路径,预设所述网站服务监控脚本、所述自恢复脚本和所述通知脚本。
  9. 根据权利要求6所述的系统,其中,所述网站服务监控脚本用于监控被监控的网站服务的进程名称和进程端口。
  10. 根据权利要求6所述系统,还包括日志单元,其中,所述日志单元设置为定时记录网站服务器运行状态,以及调用所述自恢复脚本的信息。
  11. 一种计算机可读存储介质,存储有计算机可执行指令,所述计算机可执行指令设置为执行权利要求1-5中任一项的方法。
PCT/CN2017/094396 2016-07-29 2017-07-25 网站服务器的自恢复方法和自恢复系统 WO2018019242A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201610614531.9A CN106155844B (zh) 2016-07-29 2016-07-29 一种web服务器的自恢复方法和自恢复系统
CN201610614531.9 2016-07-29

Publications (1)

Publication Number Publication Date
WO2018019242A1 true WO2018019242A1 (zh) 2018-02-01

Family

ID=57327894

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/094396 WO2018019242A1 (zh) 2016-07-29 2017-07-25 网站服务器的自恢复方法和自恢复系统

Country Status (2)

Country Link
CN (1) CN106155844B (zh)
WO (1) WO2018019242A1 (zh)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10884864B2 (en) 2018-11-29 2021-01-05 International Business Machines Corporation Autonomous self-healing stateless microservice nodes
CN114124665A (zh) * 2021-11-25 2022-03-01 秦皇岛泰和安科技有限公司 应用程序异常的处理方法、装置、计算机设备及存储介质

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106155844B (zh) * 2016-07-29 2019-02-12 深圳创维数字技术有限公司 一种web服务器的自恢复方法和自恢复系统
CN108304296A (zh) * 2018-01-30 2018-07-20 郑州云海信息技术有限公司 一种服务器监控方法、系统、设备及计算机可读存储介质
CN108245049B (zh) * 2018-01-30 2021-01-08 九阳股份有限公司 一种食品加工机的故障处理方法
CN108427627A (zh) * 2018-02-05 2018-08-21 阿里巴巴集团控股有限公司 统计系统稳定性的方法及装置和电子设备
CN110958321A (zh) * 2019-12-09 2020-04-03 杭州安恒信息技术股份有限公司 一种安全产品监控方法、装置、设备及介质
CN111030873A (zh) * 2019-12-24 2020-04-17 迈普通信技术股份有限公司 一种故障诊断方法及装置

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050120024A1 (en) * 2003-09-26 2005-06-02 Tharpe James B.Jr. Systems, methods, and computer program products for tracking and controlling Internet use and recovering costs associated therewith
CN102360323A (zh) * 2011-10-28 2012-02-22 东莞市正欣科技有限公司 一种网络服务器宕机自修复的方法及系统
CN102510343A (zh) * 2011-11-16 2012-06-20 广东新支点技术服务有限公司 基于远程检测和电源管理的高可用集群系统假死解决方法
CN106155844A (zh) * 2016-07-29 2016-11-23 深圳创维数字技术有限公司 一种web服务器的自恢复方法和自恢复系统

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050120024A1 (en) * 2003-09-26 2005-06-02 Tharpe James B.Jr. Systems, methods, and computer program products for tracking and controlling Internet use and recovering costs associated therewith
CN102360323A (zh) * 2011-10-28 2012-02-22 东莞市正欣科技有限公司 一种网络服务器宕机自修复的方法及系统
CN102510343A (zh) * 2011-11-16 2012-06-20 广东新支点技术服务有限公司 基于远程检测和电源管理的高可用集群系统假死解决方法
CN106155844A (zh) * 2016-07-29 2016-11-23 深圳创维数字技术有限公司 一种web服务器的自恢复方法和自恢复系统

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10884864B2 (en) 2018-11-29 2021-01-05 International Business Machines Corporation Autonomous self-healing stateless microservice nodes
CN114124665A (zh) * 2021-11-25 2022-03-01 秦皇岛泰和安科技有限公司 应用程序异常的处理方法、装置、计算机设备及存储介质

Also Published As

Publication number Publication date
CN106155844A (zh) 2016-11-23
CN106155844B (zh) 2019-02-12

Similar Documents

Publication Publication Date Title
WO2018019242A1 (zh) 网站服务器的自恢复方法和自恢复系统
JP5976221B2 (ja) 情報バックアップ方法および装置
WO2018095414A1 (zh) 虚拟机故障的检测和恢复方法及装置
CN109286529B (zh) 一种恢复RabbitMQ网络分区的方法及系统
US9870282B2 (en) Systems and methods for providing service and support to computing devices with boot failure
US9697013B2 (en) Systems and methods for providing technical support and exporting diagnostic data
WO2017107656A1 (zh) 虚拟化网元故障自愈方法及装置
US9798606B2 (en) Systems and methods for smart diagnosis using hosted resources with intelligent altering of boot order
CN113407383B (zh) 主备系统切换方法、装置、服务器及主备系统
EP3499373B1 (en) Method and apparatus for processing process
CN114363334B (zh) 云系统及云桌面虚拟机的网络配置方法、装置及设备
CN116132519A (zh) 设备管理方法、装置和可读存储介质
WO2016086635A1 (zh) 一种网元升级的管理方法及装置
CN112732412A (zh) 一种服务配置文件处理方法、装置、存储介质及电子设备
CN112153215A (zh) 通话处理方法、装置、相关设备及存储介质
WO2020078355A1 (zh) 设备状态监控方法及装置
CN110620695A (zh) 一种数据处理方法及相关设备
WO2016206501A1 (zh) 一种网管系统中进程的恢复方法、装置和计算机可读存储介质
CN112115003A (zh) 一种服务进程的掉线恢复方法、装置、设备及存储介质
CN112559155A (zh) 批量作业处理方法、系统、计算机设备及可读存储介质
CN111400094A (zh) 一种服务器系统恢复出厂设置的方法、装置、设备及介质
CN111614649B (zh) 关闭tcp短连接的方法及装置
CN110764940A (zh) 分布式系统服务异常的处理方法及装置
CN117555717B (zh) 一种应用异常处理方法、终端及计算机存储介质
CN114647454B (zh) 一种基于pxe服务的装机方法及系统

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 17833545

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 17833545

Country of ref document: EP

Kind code of ref document: A1