天天看點

Ignite 配置更新Oracle JDBC Drive

       如果使用oracle 12c 作為ignite

的repository的話,在repository createion wizard的配置過程中,會出現ora-28040:no

matching authentication

protocol錯誤,出現這個錯誤是因為ignite使用的jdbc版本過低原因造成。需要更新jdbc的版本

Ignite 配置更新Oracle JDBC Drive

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

<a href="http://www.oracle.com/technetwork/database/features/jdbc/index-091264.html">http://www.oracle.com/technetwork/database/features/jdbc/index-091264.html</a>

Ignite 配置更新Oracle JDBC Drive

步驟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 &lt;java_home&gt;/bin to your path environment variable.

* 3) go to the &lt;ignite home&gt;/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.&lt;init&gt;(socket.java:425)

        at java.net.socket.&lt;init&gt;(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:進入&lt;ignitehome&gt;/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

* 4) run ./startup.sh

* 5) bring up the link (http://machine name:8123

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

found java 1.5 or higher

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

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://&lt;machine name&gt;:8123 or http://&lt;machine ip&gt;:8123

* if the link does not work, check &lt;iwc_dir&gt;/tomcat/logs

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

exiting script after webserver launched.

然後使用http://&lt;machine name&gt;:8123 or http://&lt;machine ip&gt;:8123 發現ignite無法打開。

Ignite 配置更新Oracle JDBC Drive

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

在官網搜尋了一下資料發現了問題和解決方案:

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

<a href="http://support.confio.com/kb/article/stack-size-error-using-ignite-with-java-17/1685/">http://support.confio.com/kb/article/stack-size-error-using-ignite-with-java-17/1685/</a>

step 1:找到&lt;ignite install dir&gt;/iwc/tomcat/bin/catalina.sh 

step 2:找到java_opts="$java_opts -xss128k" 将其改為 java_opts="$java_opts -xss256k"

    if [ $solaris64 ] &amp;&amp; [ $solaris64 = "y" ]

then

        java_opts="$java_opts -xss256k -d64"

else

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

                java_opts="$java_opts -xss128k"

        fi

fi

将其修改為如下

                java_opts="$java_opts -xss256k"

step 3: 重新開機啟動ignite服務。問題解決!