adequate
adequate
adequate
adequate
 

JPPF
 Home   About   Download   Documentation   Forums 
May 22, 2013, 06:52:55 AM *
Welcome,
Please login or register.

Login with username, password and session length
Advanced search  
News: Registered users, your contribution is requested! Please participate in our JDK support poll
New users, please read this message. Thank you!
  Home Help Search Login Register  
Pages: [1]   Go Down

Author Topic: [JPPF v3.1] BroadcastJob doesn't work  (Read 500 times)

kilik

  • JPPF Knight
  • **
  • Posts: 16
[JPPF v3.1] BroadcastJob doesn't work
« on: July 03, 2012, 08:26:27 AM »

I insert the code "job.getSLA().setBroadcastJob(true);" into JPPF application template to try broadcast mode. But nothing happened. JPPF server does not accept the job at all. What else I need to do to enable broadcast mode?
The log on the client side shows:
Code: [Select]
[ERROR][org.jppf.client.JPPFMulticastReceiverThread.run(111)]:
java.util.concurrent.RejectedExecutionException
at java.util.concurrent.ThreadPoolExecutor$AbortPolicy.rejectedExecution(ThreadPoolExecutor.java:1956)
at java.util.concurrent.ThreadPoolExecutor.reject(ThreadPoolExecutor.java:816)
at java.util.concurrent.ThreadPoolExecutor.execute(ThreadPoolExecutor.java:1337)
at java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:106)
at org.jppf.client.AbstractGenericClient.newConnection(AbstractGenericClient.java:255)
at org.jppf.client.AbstractGenericClient.newConnection(AbstractGenericClient.java:222)
at org.jppf.client.AbstractGenericClient$2.onNewConnection(AbstractGenericClient.java:155)
at org.jppf.client.JPPFMulticastReceiverThread.onNewConnection(JPPFMulticastReceiverThread.java:126)
at org.jppf.client.JPPFMulticastReceiverThread.run(JPPFMulticastReceiverThread.java:104)
at java.lang.Thread.run(Thread.java:679)
« Last Edit: July 03, 2012, 08:28:12 AM by kilik »
Logged

lolo

  • Administrator
  • JPPF Council Member
  • *****
  • Posts: 1433
    • JPPF Web site
Re: [JPPF v3.1] BroadcastJob doesn't work
« Reply #1 on: July 04, 2012, 08:25:55 PM »

Hello,

From the stack trace, it seems the problem is that the client cannot create a new connection ot the driver for some reason.  This probably explains that your job is stuck in the client's queue, because it cannot be sent to a driver.

Can you see any other error message or exception in the log, on in your application's console output?
Also, the stack trace indicates that you are using auto discovery, could you try disabling it and configuring the connection tothe driver manually, and let us know if this works any better?

Thanks,
-Laurent

Logged

kilik

  • JPPF Knight
  • **
  • Posts: 16
Re: [JPPF v3.1] BroadcastJob doesn't work
« Reply #2 on: July 05, 2012, 04:59:16 AM »

I tried several settings and get the following results.

1. Disable broadcast mode and disable auto discovery
Application works well.

2. Disable broadcast mode and enable auto discovery
Application also works well.

3. Enable broadcast mode and enable auto discovery
Application doesn't work and no console output. The log is as I gave earlier on.

4. Enable broadcast mode and disable auto discovery
Application doesn't work.
Console output shows:
Code: [Select]
[client: driver1 - ClassServer] Attempting connection to the class server at localhost:11111
[driver1 - ClassServer - delegate] SocketInitializer.initializeSocket(): Could not reconnect to the remote server
The log shows:
Code: [Select]
2012-07-05 11:07:51,111 [INFO ][org.jppf.client.AbstractGenericClient.<init>(101)]: JPPF client starting with sslEnabled = false
2012-07-05 11:07:51,157 [INFO ][org.jppf.client.AbstractGenericClient.newConnection(244)]: connection [driver1] created
2012-07-05 11:07:51,196 [INFO ][org.jppf.client.ClassServerDelegateImpl.init(82)]: [client: driver1 - ClassServer] Attempting connection to the class server at localhost:11111
2012-07-05 11:07:51,198 [INFO ][org.jppf.client.AbstractGenericClient.connectionFailed(267)]: Connection [driver1] failed
2012-07-05 11:07:51,199 [ERROR][org.jppf.client.JPPFClientConnectionImpl.init(117)]: [driver1 - ClassServer] Could not reconnect to the class server
org.jppf.JPPFException: [driver1 - ClassServer] Could not reconnect to the class server
at org.jppf.client.ClassServerDelegateImpl.init(ClassServerDelegateImpl.java:86)
at org.jppf.client.JPPFClientConnectionImpl.connect(JPPFClientConnectionImpl.java:133)
at org.jppf.client.JPPFClientConnectionImpl.init(JPPFClientConnectionImpl.java:109)
at org.jppf.client.ConnectionInitializer.run(ConnectionInitializer.java:58)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
at java.util.concurrent.FutureTask.run(FutureTask.java:166)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:679)

 ::) From the above results, it seems that enabling broadcast mode can have effect on connection creation.
« Last Edit: July 05, 2012, 05:14:18 AM by kilik »
Logged

lolo

  • Administrator
  • JPPF Council Member
  • *****
  • Posts: 1433
    • JPPF Web site
Re: [JPPF v3.1] BroadcastJob doesn't work
« Reply #3 on: July 05, 2012, 06:49:47 AM »

Hi,

Thank you very much for the information. I can reproduce the exact same problem.
This seems due to be a timing issue in the initialization of the JPPF client. I will register a bug for this and get back to you.
In the mean time, a workaround is to wait until the client has established at least one connection to the driver, for instance:
Code: [Select]
JPPFClient jppfClient = new JPPFClient();
while (!jppfClient.hasAvailableConnection()) Thread.sleep(10L);

Sincerely,
-Laurent
Logged

lolo

  • Administrator
  • JPPF Council Member
  • *****
  • Posts: 1433
    • JPPF Web site
Re: [JPPF v3.1] BroadcastJob doesn't work
« Reply #4 on: July 06, 2012, 07:52:08 AM »

Hello,

I have registered a bug for this issue: 3540721 - Broadcast job not executed if submitted too soon
We are working on fixing it, and we will deliver the fix as part of a maintenance release early next week.

Sincerely,
-Laurent
Logged
Pages: [1]   Go Up
 
Support This Project Powered by SMF 2.0 RC5 | SMF © 2006–2011, Simple Machines LLC Powered by Parallel Matters Get JPPF at SourceForge.net. Fast, secure and Free Open Source software downloads