Ignite 配置更新Oracle JDBC Drive

       如果使用Oracle 12C 作为Ignite 的Repository的话,在Repository Createion Wizard的配置过程中,会出现ORA-28040:No matching authentication protocol错误,出现这个错误是因为Ignite使用的JDBC版本过低原因造成。需要升级JDBC的版本

步骤1:先查看本地Java版本并去官方网站下载Oracle JDBC Drive

[root@getlnx05 ignite_8_3_407]# java -version

java version "1.7.0_25"

Java(TM) SE Runtime Environment (build 1.7.0_25-b15)

Java HotSpot(TM) 64-Bit Server VM (build 23.25-b01, mixed mode)

[root@getlnx05 ignite_8_3_407]#

http://www.oracle.com/technetwork/database/features/jdbc/index-091264.html

步骤2: 关闭Ignite服务,进入 /usr/local/ignite8/ignite_8_3_407目录后,执行shutdown.sh脚本

[root@getlnx05 ignite_8_3_407]# ./shutdown.sh

**************************************************************************

*

* If this script fails you can manually stop the program by

* doing the following steps:

*

* 1) Set the JAVA_HOME environment variable to your Java installation.

* 2) Add <JAVA_HOME>/bin to your PATH environment variable.

* 3) Go to the <Ignite Home>/tomcat/bin directory.

* 4) Run ./shutdown.sh

*

*

***************************************************************************

Catalog exists...

Found java 1.4 or higher

JAVA HOME IS SET TO /usr

PATH IS SET TO /usr/bin:/usr/java/jdk1.7.0_25/bin:/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin

IBM Jvm Is Set To NO

Setting the -server option for JVM

JAVA_OPTS is -server -Xms128m -Xmx512m -XX:MaxPermSize=128m -Dcom.sun.management.jmxremote -Djava.net.preferIPv4Stack=true

Using CATALINA_BASE: /usr/local/ignite8/ignite_8_3_407/iwc/tomcat

Using CATALINA_HOME: /usr/local/ignite8/ignite_8_3_407/iwc/tomcat

Using CATALINA_TMPDIR: /usr/local/ignite8/ignite_8_3_407/iwc/tomcat/temp

Using JRE_HOME: /usr

Using CLASSPATH: /usr/local/ignite8/ignite_8_3_407/iwc/tomcat/bin/bootstrap.jar:/usr/local/ignite8/ignite_8_3_407/iwc/tomcat/ignite_config

Feb 25, 2014 9:06:52 AM org.apache.catalina.startup.Catalina stopServer

SEVERE: Catalina.stop:

java.net.ConnectException: Connection refused

        at java.net.PlainSocketImpl.socketConnect(Native Method)

        at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:339)

        at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:200)

        at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:182)

        at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)

        at java.net.Socket.connect(Socket.java:579)

        at java.net.Socket.connect(Socket.java:528)

        at java.net.Socket.<init>(Socket.java:425)

        at java.net.Socket.<init>(Socket.java:208)

        at org.apache.catalina.startup.Catalina.stopServer(Catalina.java:422)

        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

        at java.lang.reflect.Method.invoke(Method.java:606)

        at org.apache.catalina.startup.Bootstrap.stopServer(Bootstrap.java:338)

        at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:416)

**************************************************************************

*

* IWC is shutting down.

*

***************************************************************************

Exiting script after webserver stopped.

步骤3:进入<IgniteHome>/iwc/tomcat/webapps/iwc/WEB_INF/lib 目录,将 ojdbc14.jar改名为ojdbc14.jar_10g,然后将下载的ojdbc7.jar

上传到该目录

[root@getlnx05 lib]# cd  /usr/local/ignite8/ignite_8_3_407/iwc/tomcat/webapps/iwc/WEB-INF/lib

[root@getlnx05 lib]# pwd

/usr/local/ignite8/ignite_8_3_407/iwc/tomcat/webapps/iwc/WEB-INF/lib

[root@getlnx05 lib]# mv ojdbc14.jar ojdbc14.jar_10g

步骤4:重启Ignite服务

[root@getlnx05 ignite_8_3_407]# ./startup.sh

**************************************************************************

*

* If this script fails you can manually start the program by

* doing the following steps:

*

* 1) Set the JAVA_HOME environment variable to your Java installation.

* 2) Add <JAVA_HOME>/bin to your PATH environment variable.

* 3) Go to the <Ignite Home>/tomcat/bin directory.

* 4) Run ./startup.sh

* 5) Bring up the link (http://machine Name:8123

* or http://machine IP:8123) in your browser.

*

*

***************************************************************************

Catalog exists...

Found java 1.5 or higher

JAVA HOME IS SET TO /usr

PATH IS SET TO /usr/bin:/usr/java/jdk1.7.0_25/bin:/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin

The server port is 8127

The port is 8123

IWC is not running.

The port 8123 is open

The port 8127 is open

Starting Ignite

IBM Jvm Is Set To NO

Setting the -server option for JVM

JAVA_OPTS is -server -Xms128m -Xmx512m -Xss256k -XX:MaxPermSize=128m -Dcom.sun.management.jmxremote -Djava.net.preferIPv4Stack=true

Waiting on initialization...please be patient

**************************************************************************

*

* Ignite has been launched, wait one minute then bring up

* this link in your browser:

*

* http://<Machine Name>:8123 or http://<Machine IP>:8123

*

* If the link does not work, check <iwc_dir>/tomcat/logs

* and make sure a firewall is not running on this machine.

*

***************************************************************************

Exiting script after webserver launched.

然后使用http://<Machine Name>:8123 or http://<Machine IP>:8123 发现Ignite无法打开。

进入tomcat的日志目录,发现catalina.out下有如下错误信息。

[root@getlnx05 logs]# cd /usr/local/ignite8/ignite_8_3_407/iwc/tomcat/logs

[root@getlnx05 logs]# more catalina.out

The stack size specified is too small, Specify at least 160k

Error: Could not create the Java Virtual Machine.

Error: A fatal exception has occurred. Program will exit.

The stack size specified is too small, Specify at least 160k

Error: Could not create the Java Virtual Machine.

Error: A fatal exception has occurred. Program will exit.

The stack size specified is too small, Specify at least 160k

Error: Could not create the Java Virtual Machine.

Error: A fatal exception has occurred. Program will exit.

在官网搜索了一下资料发现了问题和解决方案:

Some Operations Systems, the 64-bit JRE requires a larger stack size than the default of 128K.  If this is the case, Ignite will not start and will report an error like the following

http://support.confio.com/kb/article/stack-size-error-using-ignite-with-java-17/1685/

Step 1:找到<ignite install dir>/iwc/tomcat/bin/catalina.sh 

Step 2:找到JAVA_OPTS="$JAVA_OPTS -Xss128k" 将其改为 JAVA_OPTS="$JAVA_OPTS -Xss256k"

    if [ $SOLARIS64 ] && [ $SOLARIS64 = "Y" ]

then

        JAVA_OPTS="$JAVA_OPTS -Xss256k -d64"

else

        if [ "$1" != "stop" ] ; then

                JAVA_OPTS="$JAVA_OPTS -Xss128k"

        fi

fi

将其修改为如下

    if [ $SOLARIS64 ] && [ $SOLARIS64 = "Y" ]

then

        JAVA_OPTS="$JAVA_OPTS -Xss256k -d64"

else

        if [ "$1" != "stop" ] ; then

                JAVA_OPTS="$JAVA_OPTS -Xss256k"

        fi

fi

Step 3: 重启启动Ignite服务。问题解决!

参考资料:

     http://support.confio.com/kb/article/monitoring-an-oracle-12c-database/1678/

    http://support.confio.com/kb/article/upgrade-oracle-jdbc-driver/1677/

 

郑重声明:本站内容如果来自互联网及其他传播媒体,其版权均属原媒体及文章作者所有。转载目的在于传递更多信息及用于网络分享,并不代表本站赞同其观点和对其真实性负责,也不构成任何其他建议。