2014-11-17 60 views
0

我在为EJB异步定时器配置GlassFish 4.1群集时遇到了问题。每当我想发表我的应用我有以下错误:无法部署到基于glassfish 4.1的群集?

Error occurred during deployment: Exception while deploying the app [APP-EAR-1.0] : 
Failed to create automatic timers for AsyncTimer -- EJB Timer Service is not available. 
Please see server.log for more details 

最后我莫名其妙设法前有这样的做工精细一段时间了,但它真正的尝试和错误。我确信我知道我做了什么......现在,当我试图记录服务器安装过程时,在从单独的一组机器上从头开始安装群集之后,我再次触击墙: 当我发布相同的应用程序到新的glassfish 4.1集群我得到同样的错误:

Failed to create automatic timers for AsyncTimer 

我不知道是什么原因。我一步一步地复制了正在运行的glassfish集群的所有设置。我为该计时器分配了单独的连接池。我有额外的数据库表中

CREATE TABLE public."EJB__TIMER__TBL" (
    "CREATIONTIMERAW" BIGINT NOT NULL, 
    "BLOB" BYTEA, 
    "TIMERID" VARCHAR(255) NOT NULL, 
    "CONTAINERID" BIGINT NOT NULL, 
    "OWNERID" VARCHAR(255), 
    "STATE" INTEGER NOT NULL, 
    "PKHASHCODE" INTEGER NOT NULL, 
    "INTERVALDURATION" BIGINT NOT NULL, 
    "INITIALEXPIRATIONRAW" BIGINT NOT NULL, 
    "LASTEXPIRATIONRAW" BIGINT NOT NULL, 
    "SCHEDULE" VARCHAR(255), 
    "APPLICATIONID" BIGINT NOT NULL, 
    CONSTRAINT "PK_EJB__TIMER__TBL" PRIMARY KEY("TIMERID") 
) 
WITH (oids = false); 

我发现在日志文件中出现以下错误:

java.io.FileNotFoundException: /opt/glassfish4/glassfish/nodes/test-1-node/test-instance-1/config/noop=true (No such file or directory) 
at java.io.FileInputStream.open(Native Method) 
at java.io.FileInputStream.<init>(FileInputStream.java:138) 
at java.io.FileInputStream.<init>(FileInputStream.java:93) 
at sun.net.www.protocol.file.FileURLConnection.connect(FileURLConnection.java:90) 
at sun.net.www.protocol.file.FileURLConnection.getInputStream(FileURLConnection.java:188) 
at org.apache.felix.gogo.shell.Shell.readScript(Shell.java:218) 
at org.apache.felix.gogo.shell.Shell.gosh(Shell.java:161) 
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) 
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) 
at java.lang.reflect.Method.invoke(Method.java:483) 
at org.apache.felix.gogo.runtime.Reflective.method(Reflective.java:136) 
at org.apache.felix.gogo.runtime.CommandProxy.execute(CommandProxy.java:82) 
at org.apache.felix.gogo.runtime.Closure.executeCmd(Closure.java:469) 
at org.apache.felix.gogo.runtime.Closure.executeStatement(Closure.java:395) 
at org.apache.felix.gogo.runtime.Pipe.run(Pipe.java:108) 
at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:183) 
at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:120) 
at org.apache.felix.gogo.runtime.CommandSessionImpl.execute(CommandSessionImpl.java:89) 
at org.apache.felix.gogo.shell.Activator.run(Activator.java:75) 
at java.lang.Thread.run(Thread.java:745)]] 

是否有启动EJB计时器,而无需发布应用程序的方式,这样我就可以更容易诊断问题的原因? 或者,也许你可以建议如何让该群集启动EJB定时器,因为它应该如此。

希望你能帮助我,我会非常感谢你的帮助。

回答

0

看起来像this GlassFish 4.1的错误。您可以尝试GlassFish 4.0或4.0.1的相同设置,以查看它是否可以正常工作。

但是,您是否确定已更改DAS上的JDBC资源jdbc/_TimerPool以引用您的群集数据库并可用于特定群集?这是工作所必需的。

+0

感谢您的回答。由于某些不兼容问题,我无法使用老版本的glassfish。说到配置版本我有:我进入了JDBC Connction Pools并创建并配置了TimerPool,我可以ping通。我在JDBC Resources/__Timer Pool中使用了这个池。我在安装了DAS的节点上执行了此操作,但在控制台中看不到与DAS相关的任何特定配置。 – norbi771

+0

您是本地部署还是远程部署? 4.1中的远程部署有一个类似的错误。如果你有兴趣,有一个GlassFish的构建,它目前正在修复部署错误,并提到了一个修补灰熊的补丁,可以试试:https://github.com/payara/Payara/issues/56 – Mike