0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Talend ESB Runtimeの起動でエラーメッセージが表示される件

Posted at

概要

Talend ESB Runtimeの起動においてエラーが出力される.

環境

  • CentOS 7.2
    • MacOS X 10.9/Vagrant/VirtualBox
  • Java
    • OpenJDK 1.8.0_65
    • yum install java でインストールしたもの
  • Talend ESB 6.1.0
    • TOS_ESB-20151029_1337-V6.1.0.zip

発生する事象

[vagrant@localhost Runtime_ESBSE]$ ./container/bin/trun
./container/bin/setmem: 70 行: [: -lt: 単項演算子が予期されます
        ______     __            __                 
       /_  __/__ _/ /__ ___  ___/ /                 
        / / / _ `/ / -_) _ \/ _  /                  
       /_/  \_,_/_/\__/_//_/\_,_/                   
        (version 6.1.0)                  

Hit '<tab>' for a list of available commands
and '[cmd] --help' for help on a specific command.
Hit '<ctrl-d>' or 'system:shutdown' to shutdown the TRUN.

karaf@trun()> Exception in thread "JMX Connector Thread [service:jmx:rmi://0.0.0.0:44444/jndi/rmi://:1099/karaf-trun]" java.lang.RuntimeException: Could not start JMX connector server
	at org.apache.karaf.management.ConnectorServerFactory$1.run(ConnectorServerFactory.java:272)
Caused by: java.io.IOException: The server has been stopped.
	at javax.management.remote.rmi.RMIConnectorServer.start(RMIConnectorServer.java:351)
	at org.apache.karaf.management.ConnectorServerFactory$1.run(ConnectorServerFactory.java:259)

karaf@trun()>

原因

  • ./container/bin/setmem の L.48 でJavaのマイナーバージョンが取得できず後続処理でエラーを吐いている.
JAVA_VERSION_MINOR=`$JAVA -version 2>&1 | grep "java version" | sed 's/^.*\".*\.\([^\.]\)\..*$/\1/'`

実際のjava -versionの出力は以下.

[vagrant@localhost Runtime_ESBSE]$ java -version
openjdk version "1.8.0_65"
OpenJDK Runtime Environment (build 1.8.0_65-b17)
OpenJDK 64-Bit Server VM (build 25.65-b01, mixed mode)

なるほど、grepで引っ掛ける文字列をjava versionではなくopenjdk versionとするべきということがわかる。

そこで以下のように修正.egrepを使いjava versionopenjdk versionの両方にマッチするようにしてみる.

JAVA_VERSION_MINOR=`$JAVA -version 2>&1 | egrep "(java|openjdk) version" | sed 's/^.*\".*\.\([^\.]\)\..*$/\1/'`

再度Runtimeの起動を試みる.

[vagrant@localhost Runtime_ESBSE]$ ./container/bin/trun
        ______     __            __                 
       /_  __/__ _/ /__ ___  ___/ /                 
        / / / _ `/ / -_) _ \/ _  /                  
       /_/  \_,_/_/\__/_//_/\_,_/                   
        (version 6.1.0)                  

Hit '<tab>' for a list of available commands
and '[cmd] --help' for help on a specific command.
Hit '<ctrl-d>' or 'system:shutdown' to shutdown the TRUN.

karaf@trun()> 

無事起動できた.

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?