今天项目经理说我发错版了,我内心当然是不太服气的。当时我恨恨地想,一定要把weblogic搞清楚,锅我可以背,但是一定要明白为了什么。
问题及设想方案:要想知道是谁发的版,就要在weblogic发布服务时候,能够记录到发版计算机的MAC地址或者ip。
只是设想,不一定能实现。
冷静下来了,决定从头整理下weblogic的使用。
1、下载
官网下载
下载下来解压是个jar包。
2、安装
1、管理员权限打开cmd窗口,java -jar fmw_12.2.1.4.0_wls.jar
运行jar包。
2、弹出次对话框,下一步
3)下一步
4)
5)
6)
7)安装
8)等
9)
10)安装界面自动关闭,同时cmd窗口出现如下:
3、使用
有的教程说,在上一步安装安装完成后会弹出界面让我们配置。
我这里没有,可以手动启动,如下目录。
1)
之后弹出
2)默认下一步
3)设置密码,下一步
4)
5)
6)
7)启动管理服务器,完成,之后弹出cmd窗口,显示正在启动。
8)浏览器访问控制台,地址:IP:7001/console
,密码为刚配置的密码。
以后启动,在此找自己安装的目录\user_projects\domains\base_domain\bin
目录,如果是默认安装,目录为:C:\Oracle\Middleware\Oracle_Home\user_projects\domains\base_domain\bin
,双击startWeblogic.cmd
3、部署项目
1)启动weblogic,双击startWeblogic.cmd
,控制台登录同上。
2)单击 部署,单击 安装
发个牢骚,但是绝对肺腑之言:
3)
4)下一步
5)
6)
7)
8)看到如下提示,部署成功,可以访问了
**
请注意:以下集群环境搭建有重大问题,尚未完善前,切勿借鉴!!!
**
4、weblogic12c集群环境搭建
4.1 创建管理服务器
AdminServer作为weblogic集群的总控制端. 一般我们单机默认搭建的weblogic domain服务就是AdminServer。如下图:
4.2 创建集群的服务节点
启动weblogic之后,登录weblogic控制台
1、环境-服务器-新建
2、输入服务名:xxx(随意),主机IP地址如:127.0.0.1,和端口号如:7002,之后点击完成。
同理再搭建2个。
4.3 创建集群cluster
1、环境-集群-新建集群
2、默认即可
4.4 创建计算机
创建计算机是为了配置节点管理器,可以远程启动受托管的服务器(上边的节点服务器)。
1、点击环境–>计算机–>新建,输入计算名称,和操作系统类型,因为是windows系统,所以选择其他.
2、点击下一步
3、
4.5 配置受托管服务(笼统说就是节点)归属的集群和计算机
1、环境-服务器,选中上边配置的某一个节点服务器(单击不是勾选),之后保存,做如下配置:
其他节点服务器配置相同。
4.6 启动集群服务节点
到C:\Oracle\Middleware\Oracle_Home\user_projects\domains\base_domain\bin
目录下,打开cmd窗口:
startManagedWebLogic.cmd server1 127.0.0.1:7001
例如:
注意需要输入用户名、密码(同登录weblogic控制台)
这里会报错:
<2020-5-25 下午04时51分32,004秒 CST> <Critical> <WebLogicServer> <BEA-000386> <Server subsystem failed. Reason: A MultiException has 6 exceptions. They are:
1. weblogic.security.SecurityInitializationException: Authentication for user weblogic denied.
2. java.lang.IllegalStateException: Unable to perform operation: post construct on weblogic.security.SecurityService
3. java.lang.IllegalArgumentException: While attempting to resolve the dependencies of weblogic.jndi.internal.RemoteNamingService errors were found
4. java.lang.IllegalStateException: Unable to perform operation: resolve on weblogic.jndi.internal.RemoteNamingService
5. java.lang.IllegalArgumentException: While attempting to resolve the dependencies of weblogic.deployment.DeploymentRegistrationService errors were found
6. java.lang.IllegalStateException: Unable to perform operation: resolve on weblogic.deployment.DeploymentRegistrationService
A MultiException has 6 exceptions. They are:
1. weblogic.security.SecurityInitializationException: Authentication for user weblogic denied.
2. java.lang.IllegalStateException: Unable to perform operation: post construct on weblogic.security.SecurityService
3. java.lang.IllegalArgumentException: While attempting to resolve the dependencies of weblogic.jndi.internal.RemoteNamingService errors were found
4. java.lang.IllegalStateException: Unable to perform operation: resolve on weblogic.jndi.internal.RemoteNamingService
5. java.lang.IllegalArgumentException: While attempting to resolve the dependencies of weblogic.deployment.DeploymentRegistrationService errors were found
6. java.lang.IllegalStateException: Unable to perform operation: resolve on weblogic.deployment.DeploymentRegistrationService
at org.jvnet.hk2.internal.Collector.throwIfErrors(Collector.java:89)
at org.jvnet.hk2.internal.ClazzCreator.resolveAllDependencies(ClazzCreator.java:250)
at org.jvnet.hk2.internal.ClazzCreator.create(ClazzCreator.java:358)
at org.jvnet.hk2.internal.SystemDescriptor.create(SystemDescriptor.java:487)
at org.glassfish.hk2.runlevel.internal.AsyncRunLevelContext.findOrCreate(AsyncRunLevelContext.java:305)
Truncated. see log file for complete stacktrace
Caused By: weblogic.security.SecurityInitializationException: Authentication for user weblogic denied.
at weblogic.security.service.CommonSecurityServiceManagerDelegateImpl.doBootAuthorization(CommonSecurityServiceManagerDelegateImpl.java:1158)
at weblogic.security.service.CommonSecurityServiceManagerDelegateImpl.postInitialize(CommonSecurityServiceManagerDelegateImpl.java:1272)
at weblogic.security.service.SecurityServiceManager.postInitialize(SecurityServiceManager.java:586)
at weblogic.security.SecurityService.start(SecurityService.java:130)
at weblogic.server.AbstractServerService.postConstruct(AbstractServerService.java:76)
Truncated. see log file for complete stacktrace
Caused By: javax.security.auth.login.FailedLoginException: [Security:090938]Authentication failure: The specified user failed to log in. weblogic.security.providers.authentication.LDAPAtnDelegateException: [Security:090295]caught unexpected exception, No such object
at com.bea.common.security.utils.ExceptionHandler.throwFailedLoginException(ExceptionHandler.java:62)
at weblogic.security.providers.authentication.LDAPAtnLoginModuleImpl.login(LDAPAtnLoginModuleImpl.java:369)
at com.bea.common.security.internal.service.LoginModuleWrapper$1.run(LoginModuleWrapper.java:117)
at java.security.AccessController.doPrivileged(Native Method)
at com.bea.common.security.internal.service.LoginModuleWrapper.login(LoginModuleWrapper.java:114)
Truncated. see log file for complete stacktrace
说来惭愧 ,上边这个bug,我捣鼓了一天也没解决。问了公司的大佬,跟我说让重启。马勒个靶子,我就不知道,这些人是凭啥拿我三倍薪水的。无奈,卸载重装。
5、BUG:
1、503
Error 503--Service Unavailable
From RFC 2068 Hypertext Transfer Protocol -- HTTP/1.1:
10.5.4 503 Service Unavailable
The server is currently unable to handle the request due to a temporary overloading or maintenance of the server. The implication is that this is a temporary condition which will be alleviated after some delay. If known, the length of the delay may be indicated in a Retry-After header. If no Retry-After is given, the client SHOULD handle the response as it would for a 500 response.
Note: The existence of the 503 status code does not imply that a server must use it when becoming overloaded. Some servers may wish to simply refuse the connection.
这个是因为weblogic对于部署应用没有有效启动,请选择对于的部署服务名称,点击启动,就可以正常访问了,如下图所示: