首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Weblogic插件部署无法连接到服务器t3://localhost:7001

Weblogic插件部署无法连接到服务器t3://localhost:7001
EN

Stack Overflow用户
提问于 2014-11-08 07:02:42
回答 3查看 5.3K关注 0票数 1

提前谢谢你的帮助。

我正在尝试让插件在我的机器上正常运行,但是我最终在连接到管理服务器时遇到了困难,插件错误消息在跟踪问题时并不是很有用。

概述:我基本上遵循了以下两页:(a)在本地存储库上安装插件:deployer.htm#DEPGD383 (b)配置maven插件http://www.oracle.com/technetwork/articles/soa/eisele-weblogic-netbeans-2193786.html

因此,我的配置如下:

代码语言:javascript
复制
<profiles>
        <profile>
            <id>weblogicDeploy</id>
            <properties>
                <weblogic.server.version>12.1.2.0</weblogic.server.version>
                <weblogic.server.adminurl>t3://127.0.0.1:7001</weblogic.server.adminurl>
                <weblogic.server.middlewareHome>D:/appservers/weblogic</weblogic.server.middlewareHome>    
                <weblogic.server.serverName>AdminServer</weblogic.server.serverName>                                
                <weblogic.server.userName>weblogic</weblogic.server.userName>                                
                <weblogic.server.password>welcome1</weblogic.server.password>                                
            </properties>
            <dependencies>
                <!--dependency>
                    <groupId>com.oracle.weblogic</groupId>
                    <artifactId>weblogic-server-pom</artifactId>
                    <version>${weblogic.server.version}</version>
                    <type>pom</type>
                    <scope>provided</scope>
                </dependency-->
            </dependencies>

            <build>
                <plugins>
                    <!--
                        To have access to this plugin one must follow this guide:
                        http://docs.oracle.com/cd/E24329_01/web.1211/e24443/maven_deployer.htm#DEPGD383
                        The plugin is bundled with the web logic server - we cannot get it from the web unless we install it
                        into our nexus ...                        
                        (1) D:\weblogic\wlserver\server\lib>java -jar wljarbuilder.jar -profile weblogic-maven-plugin
                        (2) jar xvf c:\tmp\weblogic-maven-plugin.jar META-INF/maven/com.oracle.weblogic/weblogic-maven-plugin/pom.xml
                        (3) mvn install:install-file -Dfile=weblogic-maven-plugin.jar -DpomFile=META-INF/maven/com.oracle.weblogic/weblogic-maven-plugin/pom.xml
                    -->
                    <plugin>
                        <!-- This is the configuration for the weblogic-maven-plugin -->
                        <groupId>com.oracle.weblogic</groupId>
                        <artifactId>weblogic-maven-plugin</artifactId>
                        <version>${weblogic.server.version}</version>
                        <configuration>
                            <middlewareHome>${weblogic.server.middlewareHome}</middlewareHome>
                        </configuration>
                        <executions>
                            <!-- Deploy the application to the WebLogic Server in the pre-integration-test phase -->
                            <execution>
                                <id>wls-deploy</id>
                                <!-- Summary Of phase: 
                                    process and deploy the package if necessary into an environment where integration tests can be run
                                -->
                                <phase>pre-integration-test</phase>
                                <goals>
                                    <goal>deploy</goal>
                                </goals>
                                <configuration>
                                    <!--The admin URL where the app is deployed. 
                                    Here use the plugin's default value t3://localhost:7001-->
                                    <adminurl>${weblogic.server.adminurl}</adminurl>
                                    <user>${weblogic.server.userName}</user>
                                    <password>${weblogic.server.password}</password>
                                    <!--The location of the file or directory to be deployed-->
                                    <source>${project.build.directory}/${project.build.finalName}.${project.packaging}</source>
                                    <!--The target servers where the application is deployed. -->
                                    <!--targets>${weblogic.server.serverName}</targets-->
                                    <verbose>true</verbose>
                                    <name>${project.build.finalName}</name>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

以上配置中似乎没有任何错误:(a)我可以很容易地验证这些密码是否有效( t3Url x userName x密码)。

代码语言:javascript
复制
$ netstat -an | grep "LISTEN" | grep "7001"
  TCP    0.0.0.0:7001           0.0.0.0:0              LISTENING
  TCP    0.0.0.0:7001           0.0.0.0:0              LISTENING
  TCP    0.0.0.0:7001           0.0.0.0:0              LISTENING
  TCP    0.0.0.0:7001           0.0.0.0:0              LISTENING
  TCP    0.0.0.0:7001           0.0.0.0:0              LISTENING
  TCP    0.0.0.0:7001           0.0.0.0:0              LISTENING
  TCP    0.0.0.0:7001           0.0.0.0:0              LISTENING
  TCP    0.0.0.0:7001           0.0.0.0:0              LISTENING
  TCP    127.0.0.1:7001         0.0.0.0:0              LISTENING
....

我还可以使用WLST连接到服务器:初始化WebLogic脚本工具(WLST) .

代码语言:javascript
复制
Welcome to WebLogic Server Administration Scripting Shell

Type help() for help on available commands

wls:/offline> connect('weblogic','welcome1','t3://127.0.0.1:7001')
Connecting to t3://127.0.0.1:7001 with userid weblogic ...
Successfully connected to Admin Server "AdminServer" that belongs to domain "whateverdomain".

Warning: An insecure protocol was used to connect to the
server. To ensure on-the-wire security, the SSL port or
Admin port should be used instead.

(c)前一点显示(a) url,(b)用户名,(c)密码,(d)目标管理服务器.本质上是一切。

但是在运行mvn插件的mvn中,我最终会遇到以下异常。

代码语言:javascript
复制
Failed to execute goal com.oracle.weblogic:weblogic-maven-plugin:12.1.2.0:deploy (wls-deploy) on project whatevermy-war: weblogic.deploy.api.tools.deployer.DeployerException: Unable to connect to 't3://127.0.0.1:7001': weblogic.security.utils.KeyStoreConfiguration. Ensure the url represents a running admin server and that the credentials are correct. If using http protocol, tunneling must be enabled on the admin server. -> [Help 1]

上面的异常消息非常笨拙:(a)插件知道它所提供的url,它知道它没有被告知使用http -这是t3原型(b)如果播放url端口并设置无效端口,我确实会得到一个套接字异常,来自插件的异常消息是完全相同的.

应该有一个配置方面我有错,管理服务器名称,隐藏的安全策略.一些东西,但我在这一点上没有看到它可能是什么。

顺便说一下,我已经对服务器pom上的依赖进行了注释,因为您无法从远程存储库中获取这些依赖项,而且我不知道web逻辑服务器中的哪个jar正在隐藏pom。否则,我也会安装在我的本地存储库中。不过,我怀疑这是否相关,因为插件似乎满足于尝试连接到weblogic。

非常感谢。

EN

回答 3

Stack Overflow用户

回答已采纳

发布于 2014-11-08 10:39:46

通过遵循关于如何安装maven插件的不同的oracle指南解决了这个问题。

本指南似乎在安装web逻辑插件方面做得更好。http://docs.oracle.com/middleware/1213/wls/WLPRG/maven.htm

引用甲骨文安装指南的相关部分。

代码语言:javascript
复制
Install the Oracle Maven sync plug-in and run the push goal:

Change directory to ORACLE_HOME\oracle_common\plugins\maven\com\oracle\maven\oracle-maven-sync\12.1.3.

mvn install:install-file -DpomFile=oracle-maven-sync-12.1.3.pom -Dfile=oracle-maven-sync-12.1.3.jar.

mvn com.oracle.maven:oracle-maven-sync:push -Doracle-maven-sync.oracleHome=c:\oracle\middleware\oracle_home\.

使指南适应您自己的产品安装路径,并等待maven push命令成功构建。希望您从这个体验中获得的weblogic插件会比第一个向导安装的插件更好。

在此之后,我唯一需要更改的配置是插件版本。

代码语言:javascript
复制
   <weblogic.server.version>12.1.2-0-0</weblogic.server.version>

瞧,这一次我得到了一个有用的插件,而不是一个假玩具。

票数 2
EN

Stack Overflow用户

发布于 2014-12-04 03:22:10

您可以在文件夹/weblogic/weblogic 12/wlserver/ com.oracle.weblogic.security.encryption_1.0.0.0.jar中找到'KeyStoreConfiguration‘。只要把KeyStoreConfiguration.class输入weblogic插件,一切都进行得很好!

票数 2
EN

Stack Overflow用户

发布于 2016-04-09 01:11:39

这是@crimsonwisp给出的同样的答案。感谢@DanielHernández的评论。下面是我要摆脱的步骤

代码语言:javascript
复制
 Failed to execute goal com.oracle.weblogic:weblogic-maven-plugin:12.1.2.0:deploy (wls-deploy) on project whatevermy-war: weblogic.deploy.api.tools.deployer.DeployerException: Unable to connect to 't3://127.0.0.1:7001': weblogic.security.utils.KeyStoreConfiguration. Ensure the url represents a running admin server and that the credentials are correct. If using http protocol, tunneling must be enabled on the admin server. -> [Help 1]

从您的wlserver中,找到weblogic.security.encryption jar

代码语言:javascript
复制
$ find . -name com.oracle.weblogic.security.encryption*
./modules/com.oracle.weblogic.security.encryption_2.0.0.0.jar

将此jar的内容复制到weblogic-maven-plugin.jar中。假设您在INSTALL_HOME/wlserver/server/lib目录中。

代码语言:javascript
复制
$ mkdir -p /tmp/wlsmaven
$ cp ../../modules/com.oracle.weblogic.security.encryption_2.0.0.0.jar /tmp/wlsmaven/
$ cp weblogic-maven-plugin.jar /tmp/wlsmaven/
$ cd /tmp/wlsmaven
$ jar xvf com.oracle.weblogic.security.encryption_2.0.0.0.jar 
# Update jar with classes from weblogic.security.encryption jar
$ jar uvf weblogic-maven-plugin.jar weblogic
$ cd -
$ cp /tmp/wlsmaven/weblogic-maven-plugin.jar .

运行以再次安装maven命令,以便安装在您的本地repo或任何您想要安装的地方。

代码语言:javascript
复制
$ mvn install:install-file -Dfile=weblogic-maven-plugin.jar -DpomFile=pom.xml
票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/26814720

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档