简体   繁体   中英

Cannot deploy to glassfish 4.1 based cluster?

I had problems configuring GlassFish 4.1 cluster for EJB async timers. Whenever I tried to publish my application I had the following error:

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

Finally I somehow managed to have this working fine some time ago, but it was really try and error. I was sure I knew what I did ... and now when I am trying to document the server installation procedure, after I installed the cluster from scratch on separate set of machines I am hitting the wall again: When I publish the same app to the new glassfish 4.1 cluster I get the same error:

Failed to create automatic timers for AsyncTimer

I have no clue what is the reason. I copied step by step all the settings from working glassfish cluster. I have separate connection pool assigned for the timer. I have extra table in the database

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);

I am finding the following error in log files:

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)]]

Is there a way to start EJB timers without the need to publish the application, so I can easier diagnose the reason of the problem? Or maybe you can advice what to do to have this cluster start EJB timers as it should.

Hope you can help me, I will appreciate your help very much.

Looks like this GlassFish 4.1 bug. You may try the same setup with GlassFish 4.0 or 4.0.1 to see if it works in general.

However, did you make sure that you changed the JDBC resource jdbc/_TimerPool on your DAS to reference you cluster database and to be available for the specific cluster? This is required for this to work.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM