473,385 Members | 1,863 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Cant find domain 'INCHARGE' in broker 'localhost:426'

Hi,
I am absolutely new to perl and for a specific reqmt I am running the following script:

Expand|Select|Wrap|Line Numbers
  1. #!/usr/bin/perl
  2. use warnings;
  3. use lib '/opt/InCharge65/IP/smarts/perl/5.6.1/lib';
  4. use InCharge::session;
  5. $session = InCharge::session->init();
  6. $session = InCharge::session->new( "INCHARGE" );
  7. $session = InCharge::session->new(
  8.     broker        => "10.213.31.209:426",
  9.     domain        => "IPVPN-APM2",
  10.     username    => "admin",
  11.     password    => "changeme",
  12.     traceServer    => 1,
  13. );
  14. $object = $session->create( "Router::crossroads" );
  15. $session->detach( );
  16.  
The errors that I am getting are:

Name "main::object" used only once: possible typo at ./routerpl.pl line 14.
[8] Cant find domain 'INCHARGE' in broker 'localhost:426', stopped at ./routerpl.pl line 5

PLEASE HELP SOON
Thanks
Gaurav
May 23 '07 #1
4 1862
prn
254 Expert 100+
Hi,
I am absolutely new to perl and for a specific reqmt I am running the following script:
Expand|Select|Wrap|Line Numbers
  1. #!/usr/bin/perl
  2. use warnings;
  3. use lib '/opt/InCharge65/IP/smarts/perl/5.6.1/lib';
  4. use InCharge::session;
  5. $session = InCharge::session->init();
  6. $session = InCharge::session->new( "INCHARGE" );
  7. $session = InCharge::session->new(
  8. broker=>"10.213.31.209:426",
  9. domain=>"IPVPN-APM2",
  10. username=>"admin",
  11. password=>"changeme",
  12. traceServer => 1
  13. );
  14. $object = $session->create( "Router::crossroads" );
  15. $session->detach( );
The errors that I am getting are:

Name "main::object" used only once: possible typo at ./routerpl.pl line 14.
[8] Cant find domain 'INCHARGE' in broker 'localhost:426', stopped at ./routerpl.pl line 5

PLEASE HELP SOON
Thanks
Gaurav
The first warning is about your line
Expand|Select|Wrap|Line Numbers
  1. $object = $session->create( "Router::crossroads" );
because this is the only place in your script where "$object" is used. When warnings are turned on, perl alerts you to situations like this because there is usually a mistake involved when you create a variable but don't use it again.

The second problem sent me to Google to find out about InCharge, which appears to have something to do with Cisco routers. Is the address 10.213.31.209 the computer that is running this script or is it the router? Do you know which it is supposed to be?

Lines 5, 6 and 7 look very suspicious to me. 6 and 7 BOTH appear to be creating new sessions (each called $session). I don't know anything about the Cisco InCharge module, but that seems wrong. I also suspect that if you need both "->new" and "->init" that line 5 would more likely follow 6 or 7 than precede. Line 14 looks suspicious too.

I just opened up the InCharge Perl Reference Guide and on page 27 (by the numbering at the bottom of the page) I see something resembling your code. It looks like you took ALL of the alternative ways of trying to open a session and plopped them all into a single script. Use only one of the forms.

I understand that you say you are new to perl, but I'm afraid I can't just hand you a working script because I don't have access to a Cisco InCharge router to experiment with. It also appears that the script as it is does not actually do anything with the router. It just opens a session and then closes it. I would guess that you might start with something more like this:

Expand|Select|Wrap|Line Numbers
  1. #!/usr/bin/perl
  2. use warnings;
  3. use strict;
  4. use lib '/opt/InCharge65/IP/smarts/perl/5.6.1/lib';
  5. use InCharge::session;
  6. my $session = InCharge::session->new(
  7.   broker=>"10.213.31.209:426",
  8.   domain=>"IPVPN-APM2",
  9.   username=>"admin",
  10.   password=>"changeme",
  11.   traceServer => 1
  12. );
  13. # do something with the router ???
  14. $session->detach( );
where the comment "# do something with the router" indicates where you would actually do whatever work your script is intended to do in the way of setting your router.

Good Luck,
Paul
May 23 '07 #2
Hi,
You are spot on man. Thanks for the elaborate and quick reply.
Using only "$session = InCharge::session->new(...", I was able to do it.
To clarify what I was doing, this script adds a router named crossroads into the repository of Incharge.
I am truly awed by the detailed response you have given. Many thanks. Inspires me to help others :-)
Gaurav
May 23 '07 #3
prn
254 Expert 100+
Many thanks. Inspires me to help others :-)
Gaurav
Great! I'm happy I could help. And I do hope your inspiration keeps you around here and contributing. The more we all help others, the better off the world is.

I hope to see you around.

Best Regards,
Paul
May 23 '07 #4
KevinADC
4,059 Expert 2GB
Hi,
I am truly awed by the detailed response you have given.
Gaurav
Me too. I doubt I would have taken the time to do all that foot work to try and answer his question.
May 23 '07 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Rick Slansky | last post by:
Hi: This should be a fairly simple page, which lines up the second row cell nicely in the lower right corner. It does in Netscape, but when I check the page in Explorer, that cell (the entire...
0
by: THDWWSIJQUOK | last post by:
Hi, I have an A97 database, which I have created for FTP purposes using the InetTransferLib.mda file by Dev Ashish and Terry Creft The application has worked great for me as long as I dialed-up...
4
by: Rachel McConnell | last post by:
Hello, I have a Java web application using Hibernate to connect to a PostgreSQL backend. I am seeing the below stack trace during processing of a set of data consisting of around 1000 objects;...
6
by: Joachim Worringen | last post by:
I need to process large lists (in my real application, this is to parse the content of a file). I noticed that the performance to access the individual list elements degrades over runtime. This...
67
by: PC Datasheet | last post by:
Transaction data is given with date ranges: Beginning End 4/1/06 4/4/06 4/7/06 4/11/06 4/14/06 4/17/06 4/18/06 4/21/06 426/06 ...
4
by: Jake Barnes | last post by:
<FAQENTRY> Weird. I go to Google and search for "javascript faq". These are the top results: http://www.javascripter.net/faq/index.htm http://www.irt.org/script/script.htm...
0
by: mp | last post by:
I am doing some volunteering for a local non-profit aid organization and not very experienced with access. I have a table which is a list of Federal Poverty Line cutoffs based on the number of...
8
by: Sam | last post by:
I'm using urllib2 and accepting gzip and deflate. It turns out that almost every site returns either normal text or gzip. But I finally found one that returns deflate. Here's how I un-gzip:...
4
by: MrDeej | last post by:
Hello! I have a complex .accdb database which i after yesterdays changes cannot enter the VBA anymore. Most of the forms and all tables/queries works fine. But one of the forms causes it to hang...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.