JPPF, java, parallel computing, distributed computing, grid computing, parallel, distributed, cluster, grid, cloud, open source, android, .net
JPPF

The open source
grid computing
solution

 Home   About   Features   Download   Documentation   On Github   Forums 
June 03, 2023, 05:24:35 PM *
Welcome,
Please login or register.

Login with username, password and session length
Advanced search  
News: New users, please read this message. Thank you!
  Home Help Search Login Register  
Pages: [1]   Go Down

Author Topic: Issues upgrading from 2.4.1 to version 3.0  (Read 3784 times)

codemonkey

  • JPPF Council Member
  • *****
  • Posts: 138
Issues upgrading from 2.4.1 to version 3.0
« on: March 27, 2012, 10:28:02 PM »

Hi there everyone, I'm having a tough time trying to upgrade from 2.4 to 3.0. We've had 2.4.1 running well before the attempted upgrade.

I've left our config files as is, as reading the updated documentation states it will make the necessary adjustments to 'class.server.port' entry to 'jppf.server.port' where needed, which is really a non factor because ours are commented thereby using the framework's internal defaults.

We launch our grid (driver/nodes) from processes that we create which accept a batch file to launch the driver/nodes respectively. Never had an issue here.

On initial run, jppf starts up the driver and nodes(s) perfectly, but I'm getting a null pointer exception on creating the JPPFClient:

Code: [Select]
java.lang.NullPointerException
at org.jppf.client.JPPFClientConnectionImpl.<init>(JPPFClientConnectionImpl.java:81)
at org.jppf.client.JPPFClient.createConnection(JPPFClient.java:111)
at org.jppf.client.AbstractGenericClient.newConnection(AbstractGenericClient.java:210)
at org.jppf.client.AbstractGenericClient$1.onNewConnection(AbstractGenericClient.java:146)
at org.jppf.client.JPPFMulticastReceiverThread.onNewConnection(JPPFMulticastReceiverThread.java:120)
at org.jppf.client.JPPFMulticastReceiverThread.run(JPPFMulticastReceiverThread.java:98)
at java.lang.Thread.run(Thread.java:619)
-
java.lang.NullPointerException
at org.jppf.client.JPPFClientConnectionImpl.<init>(JPPFClientConnectionImpl.java:81)
at org.jppf.client.JPPFClient.createConnection(JPPFClient.java:111)
at org.jppf.client.AbstractGenericClient.newConnection(AbstractGenericClient.java:210)
at org.jppf.client.AbstractGenericClient$1.onNewConnection(AbstractGenericClient.java:146)
at org.jppf.client.JPPFMulticastReceiverThread.onNewConnection(JPPFMulticastReceiverThread.java:120)
at org.jppf.client.JPPFMulticastReceiverThread.run(JPPFMulticastReceiverThread.java:98)
at java.lang.Thread.run(Thread.java:619)

I then figured out that the jmxremote_optional.jar was not on the class path and added it. Then I restart my app.
I have the following method that checks if the driver is running. On first pass through there is no driver running and returns the expected result. However, once the driver is up and running, this method just hangs on the line driverCon.connectAndWait(5000); and never returns. Whereas prior to adding it, it executes without issue

Code: [Select]
private boolean checkDriverStarted(boolean dolog) {
        boolean ret = false;
        JMXDriverConnectionWrapper driverCon = new JMXDriverConnectionWrapper("localhost", 11198);
        driverCon.connectAndWait(5000);
        if (driverCon.isConnected()) {
            if (dolog) {
                _log.info("Driver is started.");
            }
            ret = true;
        } else {
            if (dolog) {
                _log.info("Driver is not started.");
            }
        }
        try {
            driverCon.close();
        } catch (Exception ex) {
            _log.error("Fail to close driver connection", ex);
        }
        return ret;
    }

Is there something I'm missing here? Any ideas as to what I might have overlooked or missed?

Thank you so much in advance

CM
Logged

codemonkey

  • JPPF Council Member
  • *****
  • Posts: 138
Re: Issues upgrading from 2.4.1 to version 3.0
« Reply #1 on: March 28, 2012, 08:09:46 PM »

Hello everyone, got by the hanging JMX call, seems that I had some node start up code that was causing a problem as this code is included on the driver's classpath, I don't have any other answer at the moment. I'll save this for a later investigation as I just have to get by this upgrade exercise.

So I then was receiving the same error as posted in http://www.jppf.org/forums/index.php?topic=1657.0

I've always had all jppf jars in the same directory prior to 3.0 and their were put on the driver,node and client's classpath, never had an issue. Anyways I've ensured that the jars on each class path as such:

Driver:
jmxremote_optional.jar
jppf-common.jar
jppf-common-node.jar
jppf-server.jar

Node:
jmxremote_optional.jar
jppf-common-node.jar

Client app:
jmxremote_optional.jar
jppf-common.jar
jppf-common-node.jar
jppf-client.jar

All the above include slf4j-*.jars on the class paths as well.

Here is the log info once I've restarted my application. The entry point of the app starts a driver, 2 nodes and then attempts to create a JPPFClient instance:

Code: [Select]
- JPPF:Driver:StdOut:   driver process id: 5896
- JPPF:Driver:StdOut:   JPPF Driver management initialized and listening on port 11198
- JPPF:Driver:StdOut:   ClassServer initialized
- JPPF:Driver:StdOut:   ClientServer initialized
- JPPF:Driver:StdOut:   TasksServer initialized
- JPPF:Driver:StdOut:   Acceptor initialized - accepting connections on port 11111
- JPPF:Driver:StdOut:   JPPF Driver initialization complete
- Driver localhost:11198 has no nodes started.

- Instaniating 2 JPPF Nodes...

- JPPF:Node:StdOut:   node process id: 5132
- JPPF:Node:StdOut:   Attempting connection to the class server at localhost:11111
- JPPF:Node:StdOut:   Reconnected to the class server
- JPPF:Node:StdOut:   JPPF Node management initialized
- JPPF:Node:StdOut:   Attempting connection to the node server at localhost:11111
- JPPF:Node:StdOut:   Reconnected to the node server
- JPPF:Node:StdOut:   Node successfully initialized

- JPPF:Node:StdOut:   node process id: 3228
- JPPF:Node:StdOut:   Attempting connection to the class server at localhost:11111
- JPPF:Node:StdOut:   Reconnected to the class server
- JPPF:Node:StdOut:   JPPF Node management initialized
- JPPF:Node:StdOut:   Attempting connection to the node server at localhost:11111
- JPPF:Node:StdOut:   Reconnected to the node server
- JPPF:Node:StdOut:   Node successfully initialized
- JPPF is initialized.

- Create JPPFClient Instance:

java.lang.NullPointerException
at org.jppf.client.JPPFClientConnectionImpl.<init>(JPPFClientConnectionImpl.java:81)
at org.jppf.client.JPPFClient.createConnection(JPPFClient.java:111)
at org.jppf.client.AbstractGenericClient.newConnection(AbstractGenericClient.java:210)
at org.jppf.client.AbstractGenericClient$1.onNewConnection(AbstractGenericClient.java:146)
at org.jppf.client.JPPFMulticastReceiverThread.onNewConnection(JPPFMulticastReceiverThread.java:120)
at org.jppf.client.JPPFMulticastReceiverThread.run(JPPFMulticastReceiverThread.java:98)
at java.lang.Thread.run(Thread.java:619)
-
java.lang.NullPointerException
at org.jppf.client.JPPFClientConnectionImpl.<init>(JPPFClientConnectionImpl.java:81)
at org.jppf.client.JPPFClient.createConnection(JPPFClient.java:111)
at org.jppf.client.AbstractGenericClient.newConnection(AbstractGenericClient.java:210)
at org.jppf.client.AbstractGenericClient$1.onNewConnection(AbstractGenericClient.java:146)
at org.jppf.client.JPPFMulticastReceiverThread.onNewConnection(JPPFMulticastReceiverThread.java:120)
at org.jppf.client.JPPFMulticastReceiverThread.run(JPPFMulticastReceiverThread.java:98)
at java.lang.Thread.run(Thread.java:619)

I'm still getting an exception on creating a jppf client instance. Any Clues?

I've also notice with the version 3.0 of the admin client I don't see the above grid, infact the "Server Connection" drop down list is empty.
The jppf-gui.log file has the same exception in it:

Code: [Select]
2012-03-28 13:52:45,486 [DEBUG][org.jppf.ui.options.xml.OptionDescriptorParser.createScriptDescriptor(273)]: no protocol: org/jppf/ui/options/xml/imports.groovy
2012-03-28 13:52:45,496 [DEBUG][org.jppf.ui.options.xml.OptionDescriptorParser.createScriptDescriptor(273)]: no protocol: org/jppf/ui/options/xml/jppfAdminTool.groovy
2012-03-28 13:52:45,596 [INFO ][org.jppf.ui.options.xml.OptionDescriptorParser.parse(74)]: loading doc from path = org/jppf/ui/options/xml/NodeDataPage.xml
2012-03-28 13:52:45,916 [ERROR][org.jppf.client.JPPFMulticastReceiverThread.run(105)]:
java.lang.NullPointerException
at org.jppf.client.JPPFClientConnectionImpl.<init>(JPPFClientConnectionImpl.java:81)
at org.jppf.client.JPPFClient.createConnection(JPPFClient.java:111)
at org.jppf.client.AbstractGenericClient.newConnection(AbstractGenericClient.java:210)
at org.jppf.client.AbstractGenericClient$1.onNewConnection(AbstractGenericClient.java:146)
at org.jppf.client.JPPFMulticastReceiverThread.onNewConnection(JPPFMulticastReceiverThread.java:120)
at org.jppf.client.JPPFMulticastReceiverThread.run(JPPFMulticastReceiverThread.java:98)
at java.lang.Thread.run(Unknown Source)
2012-03-28 13:52:45,956 [ERROR][org.jppf.client.JPPFMulticastReceiverThread.run(105)]:
java.lang.NullPointerException
at org.jppf.client.JPPFClientConnectionImpl.<init>(JPPFClientConnectionImpl.java:81)
at org.jppf.client.JPPFClient.createConnection(JPPFClient.java:111)
at org.jppf.client.AbstractGenericClient.newConnection(AbstractGenericClient.java:210)
at org.jppf.client.AbstractGenericClient$1.onNewConnection(AbstractGenericClient.java:146)
at org.jppf.client.JPPFMulticastReceiverThread.onNewConnection(JPPFMulticastReceiverThread.java:120)
at org.jppf.client.JPPFMulticastReceiverThread.run(JPPFMulticastReceiverThread.java:98)
at java.lang.Thread.run(Unknown Source)
2012-03-28 13:52:46,026 [DEBUG][org.jppf.ui.options.xml.OptionDescriptorParser.createScriptDescriptor(273)]: no protocol: org/jppf/ui/options/xml/imports.groovy
2012-03-28 13:52:46,026 [DEBUG][org.jppf.ui.options.xml.OptionDescriptorParser.createScriptDescriptor(273)]: no protocol: org/jppf/ui/options/xml/chartsConfig.groovy
2012-03-28 13:52:46,076 [DEBUG][org.jppf.ui.options.xml.OptionDescriptorParser.createScriptDescriptor(273)]: no protocol: org/jppf/ui/options/xml/imports.groovy
2012-03-28 13:52:46,076 [DEBUG][org.jppf.ui.options.xml.OptionDescriptorParser.createScriptDescriptor(273)]: no protocol: org/jppf/ui/options/xml/bundleSize.groovy

Further, my code that has worked in 2.4.1 for shutting down the get throws all kinds of exceptions when shutting down the driver and nodes

Code: [Select]
INFO  [2012-03-28 13:48:51,542] Node 192.168.0.12:12001 is running, try to stop it.
28-Mar-2012 1:48:51 PM GenericConenctor RequestHandler-connectionException
WARNING: java.net.SocketException: Connection reset
java.net.SocketException: Connection reset
at java.net.SocketInputStream.read(SocketInputStream.java:168)
at java.io.BufferedInputStream.fill(BufferedInputStream.java:218)
at java.io.BufferedInputStream.read(BufferedInputStream.java:237)
at java.io.ObjectInputStream$PeekInputStream.peek(ObjectInputStream.java:2249)
at java.io.ObjectInputStream$BlockDataInputStream.peek(ObjectInputStream.java:2542)
at java.io.ObjectInputStream$BlockDataInputStream.peekByte(ObjectInputStream.java:2552)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1297)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:351)
at com.sun.jmx.remote.socket.SocketConnection.readMessage(SocketConnection.java:211)
at com.sun.jmx.remote.generic.ClientSynchroMessageConnectionImpl$MessageReader.run(ClientSynchroMessageConnectionImpl.java:401)
at com.sun.jmx.remote.opt.util.ThreadService$ThreadServiceJob.run(ThreadService.java:208)
at com.sun.jmx.remote.opt.util.JobExecutor.run(JobExecutor.java:59)
28-Mar-2012 1:48:52 PM ClientCommunicatorAdmin restart
WARNING: Failed to restart: java.net.ConnectException: Connection refused: connect
INFO  [2012-03-28 13:48:53,942] Node 192.168.0.12:12001 is stopped.
28-Mar-2012 1:48:53 PM ClientIntermediary close
INFO: java.io.IOException: The connection is not currently established.
java.io.IOException: The connection is not currently established.
at com.sun.jmx.remote.generic.ClientSynchroMessageConnectionImpl.checkState(ClientSynchroMessageConnectionImpl.java:577)
at com.sun.jmx.remote.generic.ClientSynchroMessageConnectionImpl.sendOneWay(ClientSynchroMessageConnectionImpl.java:162)
at javax.management.remote.generic.GenericConnector.close(GenericConnector.java:260)
at javax.management.remote.generic.GenericConnector.close(GenericConnector.java:231)
at javax.management.remote.generic.ClientIntermediary$GenericClientCommunicatorAdmin.doStop(ClientIntermediary.java:839)
at com.sun.jmx.remote.opt.internal.ClientCommunicatorAdmin.restart(ClientCommunicatorAdmin.java:133)
at com.sun.jmx.remote.opt.internal.ClientCommunicatorAdmin.gotIOException(ClientCommunicatorAdmin.java:34)
at javax.management.remote.generic.GenericConnector$RequestHandler.connectionException(GenericConnector.java:667)
INFO  [2012-03-28 13:48:53,952] Driver 192.168.0.12:11198 is started, try to stop it.
at com.sun.jmx.remote.generic.ClientSynchroMessageConnectionImpl$MessageReader.run(ClientSynchroMessageConnectionImpl.java:408)
at com.sun.jmx.remote.opt.util.ThreadService$ThreadServiceJob.run(ThreadService.java:208)
at com.sun.jmx.remote.opt.util.JobExecutor.run(JobExecutor.java:59)
INFO  [2012-03-28 13:48:55,962] Driver 192.168.0.12:11198 is stopped

Really stuck here, any insight would be extremely helpful!
Logged

lolo

  • Administrator
  • JPPF Council Member
  • *****
  • Posts: 2272
    • JPPF Web site
Re: Issues upgrading from 2.4.1 to version 3.0
« Reply #2 on: March 29, 2012, 05:46:37 AM »

Hello CM,

From the stack trace of the NPE, I was able to reproduce the same issue. I registered a bug report for it: 3512624 - Bad handling of incorrect server port configuration
Looking at your output, I think you're not exactly in the same scenario, however I think it's worth checking it. Could you take a look at your driver configuration, and let us know what exact value, if any, you set for "jppf.server.port" (v3.0 property) or "class.server.port" (legacy v2.x property) ? The problem would occur if the property is an invalid value for a port number or if it is defined as an empty value.
To workaround the problem, you can either comment the property out, or give it a valid value (e.g. 11111).

The other set of exceptions are thrown by the JMXMP remote connector. They are just warnings and can be safely ignored. If you want to remove them, you need to provide a JDK logging configuration to your application or the admin console, so as to either write them to a file instead of the console, or filter them out altogether.

I hope this helps.

Sincerely,
-Laurent
Logged

codemonkey

  • JPPF Council Member
  • *****
  • Posts: 138
Re: Issues upgrading from 2.4.1 to version 3.0
« Reply #3 on: March 29, 2012, 06:53:15 PM »

Hi Laurent and thank you for the response.

I was using the default value for the class.server.port and It was commented out, as I have in 2.4.1 and has never changed. I've abandoned trying to use the legacy 2.x configuration settings backward compatibility and have updated to the 3.0 structures. I've attached client,driver and node configurations.

Still to no avail can I get version 3.0 to work. I get the same results with the updated configurations.

In fact  I can't seem to get anything to work in version 3.0, even the samples pack.

Using the batch files to start the Driver and nodes (startDriver.bat, startNode.bat)  I launch the driver and node. Looks to be running, admin console still shows same result:nothing and exceptions in the log.

Run a sample, like fractals, click the compute, and the message "calculating, please wait" just stays there.

This tells me there is something definitely wrong here.

Have you any ideas?

Thanks very much

CM







« Last Edit: March 29, 2012, 08:16:39 PM by codemonkey »
Logged

codemonkey

  • JPPF Council Member
  • *****
  • Posts: 138
Re: Issues upgrading from 2.4.1 to version 3.0
« Reply #4 on: March 30, 2012, 07:11:19 PM »

Hello Laurent, made some good head way today. It's all boiling down to (currently) configurations files and jars on the class path requirement.

The NPE on creating JPPF Client instance is due to no client configuration available. For some reason the JPPFClient does not see the jppf.config environment var when I've set it directly before creating the instance. Should it not use internal default settings if this is the case? Here's how my 2.4.1 code:
Code: [Select]
System.setProperty("jppf.config", "path.to.my.client.config");
jppfClient = new JPPFClient(UUID.randomUUID().toString());
:o can't make any sense if this other than there is a timing issue upon when the that env var becomes available. By initializing this env var in the earlier stages of the code's entry point seems to have alleviated the problem.

In regards to examples not working I think a lot of the problems are around the client.properties not available and somethings wrong with the internal defaults. I will test this later on.

Driver/Node/Client required jars:

Upon getting past the Client Connection issue, I ran into some issues with missing jars and collisions.
In my configuration I've found that the following class path settings are working:

Driver:
jmxremote_optional.jar
jppf-common.jar
jppf-common-node.jar
jppf-server.jar

Node:
jmxremote_optional.jar
jppf-client.jar
jppf-common.jar
jppf-common-node.jar

Client app:
jppf-client.jar
jmxremote_optional.jar
jppf-common.jar
jppf-common-node.jar

Our code does not require any remote class loading as it's a prerequisite to have the application's required libs to be installed where nodes will reside.

The last issue I've ran into is that the client connection pool setting for the connection is not being used. I have a client connection pool set to 20 and it's only creating 5. If you have a look at my attached configuration, you'll see it's picking up the pool setting for the auto discovery, which I have disabled.

Code: [Select]
#------------------------------------------------------------------------------#
# jppf.pool.size property settting is only used when auto discovery is enabled
#------------------------------------------------------------------------------#
jppf.pool.size = 5

Instead the driver-1 settings:
Code: [Select]
driver-1.jppf.pool.size = 20

Do you see something wrong in the configuration or is this a bug? If so what is a work around?

Thanks again in advance

CM
Logged

lolo

  • Administrator
  • JPPF Council Member
  • *****
  • Posts: 2272
    • JPPF Web site
Re: Issues upgrading from 2.4.1 to version 3.0
« Reply #5 on: April 01, 2012, 10:51:47 PM »

Hello CM,

This is indeed a bug, which I registered as: 3513973 - Client does not pick the right connection pool size.

It is now fixed, and part of the new maintenance release, JPPF v3.0.1, which we just released. I invite you to download it to benefit from the latest bug fixes.

Sincerely,
-Laurent
Logged

codemonkey

  • JPPF Council Member
  • *****
  • Posts: 138
Re: Issues upgrading from 2.4.1 to version 3.0
« Reply #6 on: April 02, 2012, 10:41:12 PM »

Hi Laurent,

Thank you for the fix, working great!

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