SoftTree Technologies SoftTree Technologies
Technical Support Forums
RegisterSearchFAQMemberlistUsergroupsLog in
Connect to scheduler via Java Interface Contro

 
Reply to topic    SoftTree Technologies Forum Index » 24x7 Scheduler, Event Server, Automation Suite View previous topic
View next topic
Connect to scheduler via Java Interface Contro
Author Message
Gerardo Macari



Joined: 14 Mar 2001
Posts: 2

Post Connect to scheduler via Java Interface Controller Reply with quote

Hi,

I am trying to connect to the 24x7 scheduler using the java interface remote
controller classes. I tried to follow the examples but still can't connect.
Steps:

1: Start Scheduler.
Setting in tools\options\network
* Port/Service :10099
* Location: 127.0.0.1
Setting in tools\options\service
* Service Mode: Normal
* (I always have it running as an NT service)

The java code I use to try and connect is (from example)

JDPB_Connection myConnection = null;
jdpb_24x7 myRemoteControl = null;

Integer portNo = new Integer(10099);
String hostName = new String("127.0.0.1");
String userID = new String("gmacari");
String userPass = new String("cardbase8");
String serial = new String("00000-00000");
String connectString = new String("");
myConnection = new JDPB_Connection();

try {
myConnection.connect(hostName,portNo.intValue(), userID,serial, connectString);
}catch(java.lang.Throwable e)
{
//FAIL WITH MESSAGE "Connection refused"
System.out.println( "Exception: " + e.getMessage() );
} // end catch

Questions:
1 Is the userId and password my network userId and password ?
2 Why do I pass an empty connectionString, what about the password?

thanks,

Gerardo


Wed Mar 14, 2001 7:14 am View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7948

Post Re: Connect to scheduler via Java Interface Contro Reply with quote

1. Make sure the Scheduler is running in the Master mode, in other words is listenning for connections (see Tools/Options menu)

2. Change
String serial = new String("00000-00000")
to
String serial = new String("")

It looks like you are playing with an old sample. Please check out latest updated samples.

: Hi,

: I am trying to connect to the 24x7 scheduler using the java interface remote
: controller classes. I tried to follow the examples but still can't connect.
: Steps: 1: Start Scheduler.
: Setting in tools\options\network
: * Port/Service :10099
: * Location: 127.0.0.1
: Setting in tools\options\service
: * Service Mode: Normal
: * (I always have it running as an NT service)

: The java code I use to try and connect is (from example)

: JDPB_Connection myConnection = null;
: jdpb_24x7 myRemoteControl = null;

: Integer portNo = new Integer(10099);
: String hostName = new String("127.0.0.1");
: String userID = new String("gmacari");
: String userPass = new String("cardbase8");
: String serial = new String("00000-00000");
: String connectString = new String("");
: myConnection = new JDPB_Connection();

: try {
: myConnection.connect(hostName,portNo.intValue(), userID,serial,
: connectString);
: }catch(java.lang.Throwable e)
: {
: //FAIL WITH MESSAGE "Connection refused"
: System.out.println( "Exception: " + e.getMessage() );
: } // end catch

: Questions: 1 Is the userId and password my network userId and password ?
: 2 Why do I pass an empty connectionString, what about the password?

: thanks,

: Gerardo

Wed Mar 14, 2001 9:37 am View user's profile Send private message
Gerardo Macari



Joined: 14 Mar 2001
Posts: 2

Post Re: Connect to scheduler via Java Interface Contro Reply with quote

I did what you said but still no luck. When you say master mode do you mean that
you just set the scheduler to listen on a specific port ?
Under the Network tab I have:

Driver : Winsoc
Port/Service: 1096
Location: LocalHost
Options:

Is this all I need to do ?

I am still confused on the userId to pass in to create my JDPB_Connection object. All the examples use scott but what do I use and where do I set it
in the scheduler ?

Is this all I need to do in Java?

myConnection.connect("LocalHost",1096,"scott",new String(""),new String());

thanks and sorry for the stupid questions!!

cheers,

Gerardo

: 1. Make sure the Scheduler is running in the Master mode, in other words is
: listenning for connections (see Tools/Options menu)

: 2. Change
: String serial = new String("00000-00000")
: to
: String serial = new String("")

: It looks like you are playing with an old sample. Please check out latest
: updated samples.

Thu Mar 15, 2001 7:41 am View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7948

Post Re: Connect to scheduler via Java Interface Contro Reply with quote

Check "Multi-instance synchronization enabled" check box.
Also, you should change the port number on the 24x7 server from 1096 to 10099 or change your Java code to use 1096 instead of 1096.

Location is not important in this case. This field is used by StandBy scheduler (if any). Leave Options field blank for now.

: I did what you said but still no luck. When you say master mode do you mean
: that
: you just set the scheduler to listen on a specific port ?
: Under the Network tab I have: Driver : Winsoc
: Port/Service: 1096
: Location: LocalHost
: Options: Is this all I need to do ?

: I am still confused on the userId to pass in to create my JDPB_Connection
: object. All the examples use scott but what do I use and where do I set it
: in the scheduler ?

: Is this all I need to do in Java?

: myConnection.connect("LocalHost",1096,"scott",new
: String(""),new String());

: thanks and sorry for the stupid questions!!

: cheers,

: Gerardo

Thu Mar 15, 2001 9:32 am View user's profile Send private message
Display posts from previous:    
Reply to topic    SoftTree Technologies Forum Index » 24x7 Scheduler, Event Server, Automation Suite All times are GMT - 4 Hours
Page 1 of 1

 
Jump to: 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


 

 

Powered by phpBB © 2001, 2005 phpBB Group
Design by Freestyle XL / Flowers Online.