天天看點

ehcache monitor啟動錯誤UnknownHostException

@echo on

if not defined JAVA_HOME (

  echo JAVA_HOME environment variable must be set

  exit /b 1

)

setlocal enabledelayedexpansion

set JAVA_HOME="%JAVA_HOME:"=%"

set PRGDIR=%~d0%~p0..

set PRGDIR="%PRGDIR:"=%"

set classpath=

for %%F in (%PRGDIR%\lib\*.jar) do (

  set classpath=!classpath!;%%F%

Windows下用原始的startup.bat啟動monitor會報一個java.net.UnknownHostException, 比較莫名其妙,根據啟動log來看基本上應該這個腳本找的Jetty.xml有問題,直接去掉那個-j選項後,可以啟動成功

以下是monitor的啟動腳本:

java ^

   %JAVA_OPTS% ^

   -server ^

   -Dehcachedx.sampling.seconds=10 ^

   -Dehcachedx.sampling.history=8640 ^

   -cp %classpath% ^

   org.terracotta.ehcachedx.monitor.Monitor start ^

   -j %PRGDIR%\etc\jetty.xml ^ 去掉

   -f ..\etc\ehcache-monitor.conf %*

endlocal

啟動成功後顯示以下界面:

May 24, 2013 4:55:35 PM org.terracotta.ehcachedx.license.LicenseResolver resolve

License

WARNING: No  license key found. This monitoring probe software is not licensed f

or production usage, and is only licensed for development usage. See LICENSE.txt

for details. A temporary key will be generated for development usage. When the

temporary key expires, the ing probe capability will be suspended but your abili

ty to continue to use Ehcache will not be affected. Please contact sales@terraco

ttatech.com to request a license.

May 24, 2013 4:55:36 PM org.terracotta.ehcachedx.license.LicenseResolver logLice

nse

INFO:

---------------  license key ---------------

Capabilities: ehcache monitor

Date of Issue: 2013-05-24

Edition: DX

Expiration Date: 2013-05-27

License Number: 0000

License Type: DevOnly

Licensee: DevOnly

Product: Ehcache

-----------------------------------------------

May 24, 2013 4:55:36 PM org.terracotta.ehcachedx.monitor.monitor.MonitorDxServic

e startHTTPListener

INFO: Started monitor at http://10.158.171.102:9889/monitor