Information modification method and device based on WebLogic

By obtaining and judging the operation information of the Weblogic domain, and automatically setting and resetting the Weblogic password, the problem of cumbersome modification of Weblogic passwords in the prior art is solved, and the operation efficiency and password consistency are improved.

CN113986365BActive Publication Date: 2025-03-14CHINA CONSTRUCTION BANK
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111347120.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-11-15
Publication Date
2025-03-14
Estimated Expiration
2041-11-15

AI Technical Summary

Technical Problem

In the prior art, Weblogic password modification mainly relies on manual operations, which are cumbersome and cannot be automated and batched, resulting in low implementation efficiency.

Method used

By obtaining parameter information and operation information of the Weblogic domain, determine whether the change object belongs to the Weblogic domain, and set it to the off state on the server and node manager belonging to the domain. Then, reset the Weblogic password according to the parameter information, modify the boot file and delete the LDAP file, and finally start the node manager and server to complete the information modification.

Benefits of technology

It realizes the automation and batch modification of Weblogic passwords, improves operation efficiency, simplifies operation processes, and ensures the password consistency of each server in the Weblogic domain.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113986365B_ABST
    Figure CN113986365B_ABST
Patent Text Reader

Abstract

The present invention provides a method and device for modifying information based on WebLogic. The method comprises: obtaining parameter information and operation information of a weblogic domain to be changed, determining a change object corresponding to the parameter information; when the change object belongs to the weblogic domain, setting each server in the domain and its corresponding node manager to be in a closed state; when it is determined that the change object is an administrative server with adminserver, obtaining a weblogic password in the parameter information, controlling the change object to reset the weblogic password using a preset weblogic tool; modifying a boot file under a service directory corresponding to the change object, and deleting an LDAP file under the service directory; starting each node manager and each server, and completing the information modification process. The method can automatically modify the weblogic password, simplify the operation, and improve the efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of information processing, and in particular to a WebLogic-based information modification method and device. Background Art

[0002] WebLogic fully supports J2EE standards and is currently one of the mainstream J2EE servers in the commercial market. As a major middleware product, it is widely used in major commercial banks. Since many application instances are often running on WebLogic, and the number of running instances in some large enterprises even reaches tens of thousands, WebLogic has become an important operation and maintenance object. In order to ensure the security of WebLogic data, WebLogic passwords need to be frequently modified during daily operation and maintenance.

[0003] In the prior art, WebLogic password modification is mainly implemented manually, involving console interface operations, and requires a series of operations such as key file modification, NodeManager key file modification, LDAP data cleaning, and WebLogic Server NodeManager start and stop for all servers involved in the WebLogic domain. The operation steps are not standardized and relatively cumbersome, and it is impossible to realize automated and batch WebLogic password modification, and the implementation efficiency is low. Summary of the invention

[0004] In view of this, the present invention provides a WebLogic information modification method, which can realize automatic and batch modification of WebLogic passwords and improve implementation efficiency.

[0005] The present invention also provides a weblogic information modification device to ensure the implementation and application of the above method in practice.

[0006] A weblogic-based information modification method, comprising:

[0007] Obtain parameter information and running information of the weblogic domain to be changed, and determine the change object corresponding to the parameter information, where the change object is a server;

[0008] Based on the parameter information and the operation information, determining whether the changed object belongs to the weblogic domain;

[0009] When the change object belongs to the weblogic domain, each server belonging to the weblogic domain and the node manager in each of the servers are set to a closed state;

[0010] Based on the parameter information, determine whether the change object is a management server with adminserver set, and if the change object is a management server with adminserver set, obtain the weblogic password in the parameter information, and control the change object to reset the weblogic password using a preset weblogic tool;

[0011] Modify the boot file under the service directory corresponding to the changed object, and delete the LDAP file under the service directory;

[0012] Start each node manager and each server to complete the information modification process.

[0013] In the above method, optionally, judging whether the changed object belongs to the weblogic domain based on the parameter information and the operation information includes:

[0014] Acquire the first IP address and first port information of the change object contained in the parameter information, and the second IP address and second port information contained in the operation information;

[0015] Determine whether the first IP address and the first port information are consistent with the second IP address and the second port information;

[0016] If the first IP address and the first port information are consistent with the second IP address and the second port information, it is determined that the changed object belongs to the weblogic domain;

[0017] If the first IP address and the first port information are inconsistent with the second IP address and the second port information, it is determined that the change object does not belong to the weblogic domain.

[0018] In the above method, optionally, setting each server belonging to the weblogic domain and the node manager in each server to a closed state includes:

[0019] Detect each of the servers in turn to determine a server for setting the management service and a server for setting a managed server, wherein the server for setting the management service is the management server and the server for setting the managed service is the managed server;

[0020] Setting the managed service in the startup state in each of the managed servers to a shutdown state, and when all the managed services are set to a shutdown state, setting the management service in the management server to a shutdown state;

[0021] Stop the node manager in the management server and each of the managed servers, and set each stopped node manager to a closed state.

[0022] In the above method, optionally, determining whether the change object is a management server provided with adminserver based on the parameter information includes:

[0023] Determine whether a second IP address consistent with the first IP address is a service IP address of the adminserver;

[0024] If the second IP address that is consistent with the first IP address is the service IP address of the adminserver, then determining that the change object is the management server on which the adminserver is set;

[0025] If the second IP address that is consistent with the first IP address is not the service IP address of the adminserver, it is determined that the change object is the managed server.

[0026] The above method, optionally, after deleting the LDAP file under the service directory, further includes:

[0027] Determine the node manager in the management server as the target node manager;

[0028] The boot file under the node management directory corresponding to the target node manager is modified according to the parameter information.

[0029] The above method may optionally further include:

[0030] When the change object is a managed server, the boot file under the managed service directory corresponding to the managed server is modified according to the parameter information, and the LDAP file under the managed service directory is deleted.

[0031] In the above method, optionally, starting each node manager and each server includes:

[0032] Calling a preset first startup script to trigger the startup of the node manager in the management server of the weblogic domain;

[0033] When the node manager in the management server is successfully started, calling a preset second startup script to trigger the startup of the management service in the management server;

[0034] When the management service is successfully started, the first startup script is called to sequentially trigger the startup of the node manager in each managed server of the weblogic domain;

[0035] When the node manager in each of the managed servers is successfully started, the preset connection script is called to connect each of the managed servers with the management server, and the management server is controlled to send a startup command to each of the managed servers, so that each of the managed servers starts the managed services in each of the managed servers when receiving the startup command.

[0036] An information modification device based on weblogic, comprising:

[0037] A first determining unit is used to obtain parameter information and operation information of a specified changed weblogic domain, and determine a change object corresponding to the parameter information, wherein the change object is a server;

[0038] A judging unit, configured to judge whether the changed object belongs to the weblogic domain based on the parameter information and the operation information;

[0039] A setting unit, configured to set each server belonging to the weblogic domain and a node manager in each of the servers to a closed state when the change object belongs to the weblogic domain;

[0040] a second determining unit, configured to determine, based on the parameter information, whether the change object is a management server provided with adminserver, and, when the change object is a management server provided with adminserver, obtain a weblogic password in the parameter information, and control the change object to reset the weblogic password using a preset weblogic tool;

[0041] A modification unit, used to modify the boot file under the service directory corresponding to the changed object, and delete the LDAP file under the service directory;

[0042] The startup unit is used to start each node manager and each of the servers to complete the information modification process.

[0043] In the above device, optionally, the judging unit includes:

[0044] A first acquisition subunit is used to acquire the first IP address and the first port information of the change object contained in the parameter information, and the second IP address and the second port information contained in the operation information;

[0045] A determination subunit, used to determine whether the first IP address and the first port information are consistent with the second IP address and the second port information;

[0046] a first determining subunit, configured to determine that the changed object belongs to the weblogic domain if the first IP address and the first port information are consistent with the second IP address and the second port information;

[0047] The second determining subunit is configured to determine that the change object does not belong to the weblogic domain if the first IP address and the first port information are inconsistent with the second IP address and the second port information.

[0048] In the above device, optionally, the setting unit includes:

[0049] A third determining subunit is used to detect each of the servers in turn, determine the server for setting the management service and the server for setting the managed server, the server for setting the management service is the management server, and the server for setting the managed service is the managed server;

[0050] A first setting subunit is used to set the managed service in the startup state in each of the managed servers to the shutdown state, and when all the managed services are set to the shutdown state, set the management service in the management server to the shutdown state;

[0051] The second setting subunit is used to stop the node manager in the management server and each of the managed servers, and set each stopped node manager to a closed state.

[0052] A storage medium includes stored instructions, wherein when the instructions are executed, the device where the storage medium is located is controlled to execute the above-mentioned information modification method based on WebLogic.

[0053] An electronic device comprises a memory and one or more instructions, wherein the one or more instructions are stored in the memory and are configured to be executed by one or more processors to perform the above-mentioned WebLogic-based information modification method.

[0054] Compared with the prior art, the present invention has the following advantages:

[0055] Based on the embodiment provided by the present invention, in the process of modifying information based on weblogic, parameter information and operation information of the weblogic domain of the specified change are obtained, and the change object corresponding to the parameter information is determined, and the change object is a server; based on the parameter information and the operation information, it is judged whether the change object belongs to the weblogic domain; when the change object belongs to the weblogic domain, each server belonging to the weblogic domain and the node manager in each server are set to a closed state; based on the parameter information, it is determined whether the change object is a management server set with adminserver, and when the change object is a management server set with adminserver, the weblogic password in the parameter information is obtained, and the change object is controlled to reset the weblogic password using a preset weblogic tool; the boot file under the service directory corresponding to the change object is modified, and the LDAP file under the service directory is deleted; each node manager and each server are started to complete the information modification process.

[0056] By applying the embodiment provided by the present invention, when the changed object belongs to the domain of the specified change, based on the input parameter information, the management server provided with adminserver is controlled to use the preset weblogic tool to reset the weblogic password, modify the boot file under the service directory corresponding to the changed object, and delete the LDAP file under the service directory. Through adaptive processing, the difference in password modification operations between the management service and the managed service is shielded, and the operation is completely consistent, thereby simplifying the operation process, so as to realize the preset script to automatically modify the weblogic password according to the input parameter information, thereby improving the implementation efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0057] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.

[0058] Figure 1 A method flow chart of a method for modifying information based on WebLogic provided by an embodiment of the present invention;

[0059] Figure 2 Another method flow chart of a method for modifying information based on WebLogic provided by an embodiment of the present invention;

[0060] Figure 3 A flowchart of another method of a weblogic-based information modification method provided by an embodiment of the present invention;

[0061] Figure 4 A schematic diagram of batch execution of domain creation operations on multiple servers based on weblogic information modification provided by an embodiment of the present invention;

[0062] Figure 5 A flowchart of another specific method for modifying information based on WebLogic provided by an embodiment of the present invention;

[0063] Figure 6 A device structure diagram of a weblogic-based information modification device provided by an embodiment of the present invention;

[0064] Figure 7 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0065] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0066] In this application, relational terms such as first and second, etc. are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. The terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of more restrictions, the elements defined by the sentence "comprise one..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.

[0067] The present invention can be used in many general or special computing device environments or configurations, such as personal computers, server computers, handheld or portable devices, tablet devices, multi-processor devices, distributed computing environments including any of the above devices or equipment, etc.

[0068] It should be noted that the professional names involved in this application are as follows:

[0069] WebLogic: is an enterprise-level Java EE application server platform (middleware). WebLogic Server implements the J2EE / Java EE specifications proposed by Sun and fully supports J2EE standards, including EJB, JSP, Servlet, JMS, JDBC, XML and WML. It can be quickly installed, supports console for component, management and configuration, and supports hot deployment. It supports cluster technology, has high performance, scalability and high availability, and comes with rich diagnostic tools and high-performance JVM.

[0070] WebLogic Domain: Domain is a logical concept. It is the largest concept in WebLogic application server. It is a management unit or boundary. It is a logical management unit composed of a group of WebLogic Server instances and other service resources. A WebLogic domain has one management server and multiple managed servers.

[0071] AdminServer: The management service is a server instance that performs management duties in a WebLogic domain, namely Administration Server, referred to as AS. It is the central control point of the domain, stores the configuration information and logs of the domain, and runs the WebLogic management console.

[0072] The embodiment of the present invention provides a method for modifying information based on WebLogic. The method can be applied to various system platforms. The execution subject can be a processor of a computer terminal or various mobile devices. The method flow chart of the method is as follows: Figure 1 As shown, specifically including:

[0073] S101: Acquire parameter information and operation information of a weblogic domain to be changed, and determine a change object corresponding to the parameter information.

[0074] The change object is a server.

[0075] In the embodiment of the present invention, input parameter information is obtained, the parameter information includes necessary information required to identify the changed object, and the operation information of the weblogic domain specified to be changed includes necessary information for identifying each server in the weblogic domain, such as IP address and port.

[0076] S102: Based on the parameter information and the operation information, determine whether the change object belongs to the weblogic domain.

[0077] In the embodiment provided by the present invention, by comparing the necessary information required for identifying the change object in the parameter information with the necessary information of each server in the operation information, it is possible to determine whether the change object belongs to the weblogic domain of the specified change.

[0078] S103: When the change object belongs to the weblogic domain, each server belonging to the weblogic domain and the node manager in each server are set to a closed state.

[0079] It should be noted that after modifying the information, in order to make the new information effective, it is necessary to stop all started processes in the weblogic domain and restart them after the modification is completed to load the modified data and make the new information effective. When it is detected that the weblogic server corresponding to the current change object, including the management service or the managed service, belongs to the weblogic domain, the management service or all the managed services are set to the shutdown state, and the node manager on the server corresponding to the management service or all the managed services is set to the shutdown state.

[0080] S104: Based on the parameter information, determine whether the change object is a management server with adminserver set, and if the change object is a management server with adminserver set, obtain the weblogic password in the parameter information, and control the change object to reset the weblogic password using a preset weblogic tool.

[0081] According to the IP address and port information in the parameter information, determine whether the change object is an administration server with adminserver set. When the change object belongs to the weblogic domain and is the host where AdminServer is located, obtain the weblogic password in the parameter information and control the change object to reset the Weblogic password through the weblogic.security.utils.AdminAccount command.

[0082] S105: modifying the boot file under the service directory corresponding to the changed object, and deleting the LDAP file under the service directory.

[0083] According to the information to be modified contained in the parameter information, the boot file under the service directory corresponding to the changed object is modified, and the LDAP (Lightweight Directory Access Protocol) file under the service directory is cleared, so that the modified information takes effect after the changed object is restarted.

[0084] Specifically, if the change object is the host where the adminserver is located, modify the boot file under the service directory corresponding to the adminserver and delete the LDAP file under the service directory; if the change object is the host where the managed service is located, modify the boot file under the service directory corresponding to the managed service and delete the LDAP file under the service directory.

[0085] S106: Start each node manager and each server to complete the information modification process.

[0086] After completing the information modification, restart each node manager and each of the servers to make the modified information effective.

[0087] Based on the embodiment provided by the present invention, in the process of modifying information based on weblogic, parameter information and operation information of the weblogic domain of the specified change are obtained, and the change object corresponding to the parameter information is determined, and the change object is a server; based on the parameter information and the operation information, it is judged whether the change object belongs to the weblogic domain; when the change object belongs to the weblogic domain, each server belonging to the weblogic domain and the node manager in each server are set to a closed state; based on the parameter information, it is determined whether the change object is a management server set with adminserver, and when the change object is a management server set with adminserver, the weblogic password in the parameter information is obtained, and the change object is controlled to reset the weblogic password using a preset weblogic tool; the boot file under the service directory corresponding to the change object is modified, and the LDAP file under the service directory is deleted; each node manager and each server are started to complete the information modification process.

[0088] By applying the embodiment provided by the present invention, when the changed object belongs to the domain of the specified change, based on the input parameter information, the management server provided with adminserver is controlled to use the preset weblogic tool to reset the weblogic password, modify the boot file under the service directory corresponding to the changed object, and delete the LDAP file under the service directory. Through adaptive processing, the difference in password modification operations between the management service and the managed service is shielded, and the operation is completely consistent, thereby simplifying the operation process, so as to realize the preset script to automatically modify the weblogic password according to the input parameter information, thereby improving the implementation efficiency.

[0089] In the embodiments provided by the present invention, Figure 2 As shown, optionally, judging whether the changed object belongs to the weblogic domain based on the parameter information and the operation information includes:

[0090] S201: Acquire the first IP address and first port information of the change object contained in the parameter information, and the second IP address and second port information contained in the operation information.

[0091] S202: Determine whether the first IP address and the first port information are consistent with the second IP address and the second port information.

[0092] If the first IP address and the first port information are consistent with the second IP address and the second port information, execute S203; if the first IP address and the first port information are inconsistent with the second IP address and the second port information, execute S204.

[0093] S203: Determine whether the changed object belongs to the weblogic domain.

[0094] In the embodiment provided by the present invention, if the first IP address and the first port information of the changed object are consistent with the second IP address and the second port information of the server corresponding to the running information of the weblogic domain, the changed object belongs to the weblogic domain.

[0095] It should also be noted that multiple servers can be set up in a weblogic domain. The first IP address and first port information of the changed object are compared with the second IP address and second port information corresponding to each server in the weblogic domain. If there is a server whose second IP address and second port information are consistent with the first IP address and first port information of the changed object, then the changed object belongs to the weblogic domain.

[0096] S204: Determine that the changed object does not belong to the weblogic domain.

[0097] If the object to be changed does not belong to the weblogic domain, it means that the object to be changed does not meet the weblgoic password modification conditions. Whether to execute it next time requires manual judgment to determine the reason and make the modification after the modification conditions are met. If it needs to be re-executed, the parameter information needs to be manually modified and re-called.

[0098] By comparing the parameter information and the corresponding IP address and port in the running information, it is determined whether the changed object belongs to the weblogic domain corresponding to the running information, so as to check the input parameters, thereby ensuring that the changed operation object belongs to the same Weblogic domain, and then ensuring the consistency of the relevant files used to set the Weblogic domain corresponding to each server in the same domain after executing subsequent steps.

[0099] In the embodiment provided by the present invention, optionally, setting each server belonging to the weblogic domain and the node manager in each of the servers to a closed state includes:

[0100] The servers are detected in sequence to determine the server for setting the management service and the server for setting the managed server. The server for setting the management service is the management server, and the server for setting the managed service is the managed server.

[0101] Check each server in the weblogic domain and distinguish the servers that have management services and managed services. It should be noted that management services and managed services can be set up on the same server at the same time.

[0102] The managed services in the start-up state in each of the managed servers are set to the shutdown state, and when all the managed services are set to the shutdown state, the management service in the management server is set to the shutdown state.

[0103] First stop and close the managed services on all managed servers, and then stop and close the management service on the management server. It should be noted that if a server has both managed services and management services set up, you only need to set the managed services on the server to the closed state to shut down the server, and there is no need to set the management service on the server to the closed state.

[0104] Stop the node manager in the management server and each of the managed servers, and set each stopped node manager to a closed state.

[0105] After shutting down all management servers and managed servers, shut down the node managers on all management servers and managed servers.

[0106] By shutting down the management service on the management server and the managed services on all managed servers in turn, and then shutting down the node managers on all management servers and managed servers, you can ensure that after setting a new password, all processes in the weblogic domain are in a closed state, thereby ensuring that the subsequently modified password takes effect on all servers in the weblogic domain.

[0107] In the embodiments provided by the present invention, Figure 3 As shown, optionally, determining whether the change object is a management server provided with adminserver based on the parameter information includes:

[0108] S301: Determine whether the second IP address consistent with the first IP address is the service IP address of the adminserver.

[0109] Specifically, obtain the current execution host, that is, the IP address of the change object, which is the second IP address consistent with the first IP address, and determine whether the change object is the server on which the management service runs. And according to the judgment result, differential processing is performed on the server where the management service is located.

[0110] If the second IP address consistent with the first IP address is the service IP address of the adminserver, then execute S302 to S303; if the second IP address consistent with the first IP address is not the service IP address of the adminserver, then execute S304 to S305.

[0111] S302: Determine that the change object is the management server provided with the adminserver; obtain the weblogic password in the parameter information, and control the change object to use a preset weblogic tool to reset the weblogic password.

[0112] In the embodiment of the present invention, the input parameter information to be obtained includes <AdminServer IP:Port> and <new password>, and the specific format is as follows:

[0113] –password=<new password>-adminip=<AdminServe production IP>

[0114] [-adminport=<AdminServer port>][-domain=<Domain path>]

[0115] According to <AdminServer IP:Port><new password> in the parameter information, a new password can be set.

[0116] Among them, -password=<new password> is a required parameter for setting the new password of the Weblogic console user and cannot be empty; -adminip=<AdminServer production IP> is a required parameter for setting the production IP address of the AdminServer and cannot be empty. Through this parameter, the AdminServer is distinguished from the managed Server to achieve differential processing.

[0117] [-adminport = <AdminServer port>] is an optional parameter for the user to set the AdminServer listening port. If it is empty, the default value is 7001. [-domain = <Domain path>] is an optional parameter used to set the Domain to be processed. In the case of multiple Domains, this parameter is required to distinguish the Domain to be processed. If it is empty, the Domain path will be obtained according to the Weblogic process by default.

[0118] After determining that the change object is the Administration Server, the change object uses the preset Weblogic tool to modify the Weblogic password. The specific format is as follows:

[0119] cd <domain> / security

[0120] java weblogic.security.utils.AdminAccount weblogic <new password>

[0121] By executing this command, the weblogic password in the change object can be reset.

[0122] S303: Modify the boot file in the management service directory corresponding to the management server according to the parameter information, and delete the LDAP file in the management service directory.

[0123] In the embodiment provided by the present invention, execute the pre-set weblogic password to modify the boot file (boot.properties) in the management service directory corresponding to the management server and delete the ldap file. Specifically:

[0124] The command to modify the boot.properties in the AdminServer security directory is as follows:

[0125] cd <Domain path> / servers / AdminServer / securiy

[0126] vi boot.properties

[0127] Among them, modify the user name and password lines as follows:

[0128] password = new password

[0129] username = weblogic

[0130] The weblogic command to delete the ldap directory under AdminServer is as follows:

[0131] cd <Domain path> / servers / AdminServer / data

[0132] mv ldap ldap.bak.$(date +%Y%m%d)

[0133] S304: Determine that the change object is a managed server.

[0134] S305: Modify the boot file in the managed service directory corresponding to the managed server according to the parameter information, and delete the LDAP file in the managed service directory.

[0135] In the embodiments provided by the present invention, after determining that the change object is the managed server, the boot file (boot.properties) in the management service directory corresponding to the management server is modified by writing a corresponding script and the ldap file is deleted. Specifically:

[0136] The weblogic command to modify the boot.properties in the security directory of each managed service is as follows:

[0137] cd <Domain path> / servers / <Managed Server> / securiy

[0138] vi boot.properties

[0139] Among them, modify the user name and password lines as follows:

[0140] password = new password

[0141] username = weblogic

[0142] The weblogic command to delete the ldap directory of each managed service is as follows:

[0143] cd <Domain path> / servers / <Managed Server> / data

[0144] mv ldap ldap.bak.$(date +%Y%m%d)

[0145] It should be noted that if the managed service and the management service are not on the same server, the above process can be executed in parallel with the processing process of the management service. Otherwise, first execute the process of modifying the boot file of the management service and deleting the LDAP file, and then execute the process of modifying the boot file of the managed service and deleting the LDAP file.

[0146] Applying the embodiments provided by the present invention, according to the pre-set weblogic password, the key files of all services involved in the Weblogic domain, including the management service and the managed service, are modified, the NodeManager key file is modified, and the LDAP data is cleaned to reset the relevant files in each server to ensure the consistency of the corresponding parameters after changing the weblogic password.

[0147] In the embodiments provided by the present invention, optionally, after deleting the LDAP file in the service directory, it further includes:

[0148] Determine the node manager in the management server as the target node manager;

[0149] Modify the boot file in the node management directory corresponding to the target node manager according to the parameter information.

[0150] In the embodiments provided by the present invention, while changing the boot file in the change management service directory and deleting the corresponding LDAP file, it is also necessary to change the boot file in the directory corresponding to the node manager in the change management server. Specifically, the WebLogic command to modify the boot.properties in the nodemanager directory of AdminServer is as follows:

[0151] cd <Domain path> / servers / AdminServer / data / nodemanager /

[0152] vi boot.properties

[0153] Among them, modify the user name and password lines as follows:

[0154] password = new password

[0155] username = weblogic

[0156] Similarly, while changing the boot file in the managed service directory and deleting the corresponding LDAP file, it is also necessary to change the boot file in the directory corresponding to the node manager in the managed server. Specifically, the WebLogic command to modify the boot.properties in the nodemanager directory of each managed service is as follows:

[0157] cd <Domain path> / servers / <Managed Server> / data / nodemanager /

[0158] vi boot.properties

[0159] Among them, modify the user name and password lines as follows:

[0160] password = new password

[0161] username = weblogic

[0162] In the embodiments provided by the present invention, optionally, starting each node manager and each of the servers to complete the information modification process includes:

[0163] Call a preset first startup script to trigger the startup of the node manager in the management server of the WebLogic domain;

[0164] When the node manager in the management server is successfully started, a preset second startup script is called to trigger the startup of the management service in the management server.

[0165] The first startup script is used to start the node manager, and the second startup script is used to start the management service. The first startup script is used to start the node manager in the management server. After the node manager is started, the second script is used to start the management service in the management server.

[0166] By telnetting the AdminServer IP address and port, check whether the AdminServer has been restarted normally. If not, continue to wait and detect regularly until the AdminServer has been started normally, that is, the port is accessible. To avoid long waiting times under abnormal circumstances, this step sets the timeout to 10 minutes. If the AdminServer still does not start normally after 10 minutes, an exception is returned and subsequent execution is exited.

[0167] When the management service is successfully started, the first startup script is called to sequentially trigger the startup of the node manager in each managed server of the weblogic domain;

[0168] When the node manager in each of the managed servers is successfully started, the preset connection script is called to connect each of the managed servers with the management server, and the management server is controlled to send a startup command to each of the managed servers, so that each of the managed servers starts the managed services in each of the managed servers when receiving the startup command.

[0169] When the management service is started, each managed service is started. Otherwise, the managed service is in a waiting state until the management service is started. First, the first script is called to start each node manager in the server where the managed service is located, and then each managed service is connected to the management service through a preset connection script to realize communication between the management service and each managed service. A startup command is sent to the managed service through the management service, so that each managed server starts the managed service in each managed server one by one when receiving the startup command.

[0170] It should be noted that if both a managed service and a management service are set on a server, you only need to start the management service on the server to start the server, and there is no need to start the managed service on the server.

[0171] The embodiment provided by the present invention starts the management service and the managed service in sequence through a preset startup script, checks whether the management service is started through service port detection, and automatically performs subsequent steps, thereby realizing automatic collaborative control between steps.

[0172] like Figure 4 As shown, a schematic diagram of executing WebLogic password modification operations in parallel on servers involved in the WebLogic domain through an operation and maintenance tool (cloud management platform). The embodiment provided by the present invention provides a universal method for supporting batch modification of WebLogic passwords. Through adaptive processing, it is not necessary to distinguish between AdminServer and managed servers, and supports the execution of completely unified operations on each server. It supports batch execution on servers involved in the WebLogic domain through an operation and maintenance tool, realizes parallelization of WebLogic password modification operations, and greatly improves the implementation efficiency and automation level of WebLogic password modification.

[0173] like Figure 5 As shown, according to the weblogic-based information modification method provided by the embodiment of the present invention, first, check whether all servers that need to modify information, including AdminServer and managed AdminServer, belong to the weblogic domain of the specified change. If they do not belong to the weblogic domain of the specified change, the subsequent steps will not be executed. If they belong to the weblogic domain of the specified change, stop the AdminServer and managed AdminServer running on all machines in turn, and then stop the NodeManager node manager running on all machines, and check whether the host of the current change object is the host where the AdminServer is located.

[0174] If the host currently being changed is the host where AdminServer is located, the processing for AdminServer is executed, including: first resetting the password through the weblogic command, then modifying the boot.properties boot file of AdminServer, deleting the ldap file, then starting the NodeManager node manager of the host where AdminServer is located, and finally starting AdminServer to make the reset password take effect on AdminServer.

[0175] If the host to be changed is not the host where the AdminServer is located, the processing for the managed Server is executed, including: first modifying the boot.properties boot file of the managed Server and deleting the ldap file, then checking whether the AdminServer has been restarted. If not, wait for the AdminServer to restart, start the NodeManager node manager of the host where the managed Server is located, and finally start the managed Server to make the reset password take effect on the managed Server.

[0176] By executing the command (weblogic.security.utils.AdminAccount), WebLogic password reset is realized, WebLogic console page operation is avoided, and all password reset operations are scripted. And through adaptive processing, the differences in password modification operations between AdminServer and managed servers are shielded, and the operations are completely consistent, and batch scheduling and execution are carried out through operation and maintenance tools.

[0177] The specific implementation processes and derivative methods of the above-mentioned embodiments are all within the protection scope of the present invention.

[0178] and Figure 1 Corresponding to the method described above, the embodiment of the present invention further provides an information modification device based on weblogic, for modifying Figure 1 The specific implementation of the method in the embodiment of the present invention is that the information modification device based on weblogic can be applied to a computer terminal or various mobile devices, and its structural diagram is as follows Figure 6 As shown, specifically including:

[0179] The first determining unit 601 is used to obtain parameter information and operation information of a weblogic domain to be changed, and determine a change object corresponding to the parameter information, wherein the change object is a server;

[0180] A judging unit 602, configured to judge whether the changed object belongs to the weblogic domain based on the parameter information and the operation information;

[0181] A setting unit 603, configured to set each server belonging to the weblogic domain and a node manager in each of the servers to a closed state when the change object belongs to the weblogic domain;

[0182] The second determining unit 604 is used to determine whether the change object is a management server with adminserver set based on the parameter information, and when the change object is a management server with adminserver set, obtain the weblogic password in the parameter information, and control the change object to reset the weblogic password using a preset weblogic tool;

[0183] A modification unit 605 is used to modify the boot file under the service directory corresponding to the changed object and delete the LDAP file under the service directory;

[0184] The starting unit 606 is used to start each node manager and each server to complete the information modification process.

[0185] Based on the weblogic-based information modification device provided by the present invention, during the weblogic-based information modification process, the first determination unit obtains parameter information and operation information of the weblogic domain specified for change, and determines the change object corresponding to the parameter information, and the change object is a server; then the judgment unit determines whether the change object belongs to the weblogic domain based on the parameter information and the operation information; when the change object belongs to the weblogic domain, the setting unit sets each server belonging to the weblogic domain and the node manager in each server to a closed state; the second determination unit determines whether the change object is a management server set with adminserver based on the parameter information, and when the change object is a management server set with adminserver, obtains the weblogic password in the parameter information, and controls the change object to reset the weblogic password using a preset weblogic tool; the modification unit modifies the boot file under the service directory corresponding to the change object, and deletes the LDAP file under the service directory; finally, the startup unit starts each node manager and each server to complete the information modification process.

[0186] By using the device provided by the present invention, when the changed object belongs to the domain of the specified change, based on the input parameter information, the management server provided with adminserver is controlled to use the preset weblogic tool to reset the weblogic password, modify the boot file under the service directory corresponding to the changed object, and delete the LDAP file under the service directory. Through adaptive processing, the difference in password modification operation between the management service and the managed service is shielded, and the operation is completely consistent, thereby simplifying the operation process, so as to realize the preset script to automatically modify the weblogic password according to the input parameter information, thereby improving the implementation efficiency.

[0187] In the embodiment provided by the present invention, optionally, the judging unit includes:

[0188] A first acquisition subunit is used to acquire the first IP address and the first port information of the change object contained in the parameter information, and the second IP address and the second port information contained in the operation information;

[0189] A determination subunit, used to determine whether the first IP address and the first port information are consistent with the second IP address and the second port information;

[0190] a first determining subunit, configured to determine that the changed object belongs to the weblogic domain if the first IP address and the first port information are consistent with the second IP address and the second port information;

[0191] The second determining subunit is configured to determine that the change object does not belong to the weblogic domain if the first IP address and the first port information are inconsistent with the second IP address and the second port information.

[0192] In the embodiment provided by the present invention, optionally, the setting unit includes:

[0193] A third determining subunit is used to detect each of the servers in turn, determine the server for setting the management service and the server for setting the managed server, the server for setting the management service is the management server, and the server for setting the managed service is the managed server;

[0194] A first setting subunit is used to set the managed service in the startup state in each of the managed servers to the shutdown state, and when all the managed services are set to the shutdown state, set the management service in the management server to the shutdown state;

[0195] The second setting subunit is used to stop the node manager in the management server and each of the managed servers, and set each stopped node manager to a closed state.

[0196] For the specific working process of each unit and sub-unit in the information modification device based on WebLogic disclosed in the above embodiment of the present invention, reference may be made to the corresponding content in the information modification method based on WebLogic disclosed in the above embodiment of the present invention, which will not be described in detail here.

[0197] An embodiment of the present invention further provides a storage medium, which includes stored instructions, wherein when the instructions are executed, the device where the storage medium is located is controlled to execute the above-mentioned weblogic-based information modification method.

[0198] The embodiment of the present invention further provides an electronic device, the structural diagram of which is shown in FIG. Figure 7 As shown, it specifically includes a memory 701 and one or more instructions 702, wherein the one or more instructions 702 are stored in the memory 701 and are configured to be executed by one or more processors 703 to perform the following operations:

[0199] Obtain parameter information and running information of the weblogic domain to be changed, and determine the change object corresponding to the parameter information, where the change object is a server;

[0200] Based on the parameter information and the operation information, determining whether the changed object belongs to the weblogic domain;

[0201] When the change object belongs to the weblogic domain, each server belonging to the weblogic domain and the node manager in each of the servers are set to a closed state;

[0202] Based on the parameter information, determine whether the change object is a management server with adminserver set, and if the change object is a management server with adminserver set, obtain the weblogic password in the parameter information, and control the change object to reset the weblogic password using a preset weblogic tool;

[0203] Modify the boot file under the service directory corresponding to the changed object, and delete the LDAP file under the service directory;

[0204] Start each node manager and each server to complete the information modification process.

[0205] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can refer to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system or system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can refer to the partial description of the method embodiment. The system and system embodiments described above are merely schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without creative work.

[0206] Those skilled in the art may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein may be implemented by electronic hardware, computer software, or a combination of both.

[0207] In order to clearly illustrate the interchangeability of hardware and software, the above description has generally described the components and steps of each example according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the present invention.

[0208] The above description of the disclosed embodiments enables one skilled in the art to implement or use the present invention. Various modifications to these embodiments will be apparent to one skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.< / domain>

Claims

1. A method for modifying information based on WebLogic, characterized in that: Applied to cloud management platforms, including: Obtain parameter information and running information of the weblogic domain to be changed, and determine the change object corresponding to the parameter information, where the change object is a server; Based on the parameter information and the operation information, determining whether the change object belongs to the weblogic domain includes: obtaining the first IP address and the first port information of the change object contained in the parameter information, and the second IP address and the second port information contained in the operation information; determining whether the first IP address and the first port information are consistent with the second IP address and the second port information; if the first IP address and the first port information are consistent with the second IP address and the second port information, determining that the change object belongs to the weblogic domain; if the first IP address and the first port information are inconsistent with the second IP address and the second port information, determining that the change object does not belong to the weblogic domain; When the change object belongs to the weblogic domain, each server belonging to the weblogic domain and the node manager in each of the servers are set to a closed state; Determine whether a second IP address consistent with the first IP address is a service IP address of the adminserver; If the second IP address consistent with the first IP address is the service IP address of adminserver, determine that the change object is the management server equipped with the adminserver; obtain the weblogic password in the parameter information, and control the change object to reset the weblogic password using a preset weblogic tool; modify the boot file under the management service directory corresponding to the management server according to the parameter information, and delete the LDAP file under the management service directory; If the second IP address consistent with the first IP address is not the service IP address of the adminserver, determining that the change object is the managed server; modifying the boot file under the managed service directory corresponding to the managed server according to the parameter information, and deleting the LDAP file under the managed service directory; Start each node manager and each server to complete the information modification process.

2. The method according to claim 1, characterized in that The step of setting each server belonging to the weblogic domain and the node manager in each server to a shutdown state includes: Detecting each of the servers in turn to determine a server for setting the management service and a server for setting the managed service, the server for setting the management service being the management server, and the server for setting the managed service being the managed server; Setting the managed service in the startup state in each of the managed servers to a shutdown state, and when all the managed services are set to a shutdown state, setting the management service in the management server to a shutdown state; Stop the node manager in the management server and each of the managed servers, and set each stopped node manager to a closed state.

3. The method according to claim 1, characterized in that: After deleting the LDAP file under the service directory, it also includes: Determine the node manager in the management server as the target node manager; The boot file under the node management directory corresponding to the target node manager is modified according to the parameter information.

4. The method according to claim 1 or 3, characterized in that: The starting of each node manager and each server includes: Calling a preset first startup script to trigger the startup of the node manager in the management server of the weblogic domain; When the node manager in the management server is successfully started, calling a preset second startup script to trigger the startup of the management service in the management server; When the management service is successfully started, the first startup script is called to sequentially trigger the startup of the node manager in each managed server of the weblogic domain; When the node manager in each of the managed servers is successfully started, the preset connection script is called to connect each of the managed servers with the management server, and the management server is controlled to send a startup command to each of the managed servers, so that each of the managed servers starts the managed services in each of the managed servers when receiving the startup command.

5. A weblogic-based information modification device, characterized in that: Applied to cloud management platforms, including: A first determining unit is used to obtain parameter information and operation information of a specified changed weblogic domain, and determine a change object corresponding to the parameter information, wherein the change object is a server; A judging unit, configured to judge whether the changed object belongs to the weblogic domain based on the parameter information and the operation information; The judging unit comprises: a first obtaining subunit, a judging subunit, a first determining subunit and a second determining subunit; The first acquisition subunit is used to acquire the first IP address and the first port information of the change object contained in the parameter information, and the second IP address and the second port information contained in the operation information; The judging subunit is used to judge whether the first IP address and the first port information are consistent with the second IP address and the second port information; The first determining subunit is configured to determine that the changed object belongs to the weblogic domain if the first IP address and the first port information are consistent with the second IP address and the second port information; The second determining subunit is configured to determine that the change object does not belong to the weblogic domain if the first IP address and the first port information are inconsistent with the second IP address and the second port information; A setting unit, configured to set each server belonging to the weblogic domain and a node manager in each of the servers to a closed state when the change object belongs to the weblogic domain; A second determining unit is used to determine whether the second IP address consistent with the first IP address is the service IP address of the adminserver; if the second IP address consistent with the first IP address is the service IP address of the adminserver, then the change object is determined to be the management server provided with the adminserver; if the second IP address consistent with the first IP address is not the service IP address of the adminserver, then the change object is determined to be the managed server; A modification unit, configured to, if the change object is a management server provided with the adminserver, obtain the weblogic password in the parameter information, and control the change object to reset the weblogic password using a preset weblogic tool; modify the boot file under the management service directory corresponding to the management server according to the parameter information, and delete the LDAP file under the management service directory; if the change object is a managed server, modify the boot file under the managed service directory corresponding to the managed server according to the parameter information, and delete the LDAP file under the managed service directory; The startup unit is used to start each node manager and each of the servers to complete the information modification process.

6. The device according to claim 5, characterized in that The setting unit comprises: A third determining subunit is used to detect each of the servers in turn, determine the server that sets the management service and the server that sets the managed service, the server that sets the management service is the management server, and the server that sets the managed service is the managed server; A first setting subunit is used to set the managed service in the startup state in each of the managed servers to the shutdown state, and when all the managed services are set to the shutdown state, set the management service in the management server to the shutdown state; The second setting subunit is used to stop the node manager in the management server and each of the managed servers, and set each stopped node manager to a closed state.

Citation Information

Patent Citations

  • Weblogic cluster one-key automatic deployment method

    CN106325953A

  • Service maintenance method and device

    CN111147291A