Ignite 配置更新Oracle JDBC Drive


       如果使用Oracle 12C 作為Ignite 的Repository的話,在Repository Createion Wizard的配置過程中,會出現ORA-28040:No matching authentication protocol錯誤,出現這個錯誤是因為Ignite使用的JDBC版本過低原因造成。需要升級JDBC的版本

clipboard

步驟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

clipboard[1]

步驟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無法打開。

clipboard[2]

進入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/

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM