473,809 Members | 2,506 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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

6 New Member
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::obje ct" 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 1883
prn
254 Recognized Expert Contributor
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::obje ct" 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
gawasthi
6 New Member
Hi,
You are spot on man. Thanks for the elaborate and quick reply.
Using only "$session = InCharge::sessi on->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 Recognized Expert Contributor
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 Recognized Expert Specialist
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
1687
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 cell, not just the contents) is shifted down by 6 to 8 pixels. I would appreciate any help in identifying why the alignment difference is happening with Explorer.
0
1428
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 directly from my PC. When I used the Internet connection sharing over the family LAN hosted on the other PC, I would always get some kind of error. (I can't reproduce it right now.) Recently, the situation has reversed. When I'm dialing up...
4
6885
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; for a 200 object set I don't see the exception. I believe the salient point is the Out Of Memory bit - marked below by *****'s The fact that this exception occurs during a call to
6
1478
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 can be reproduced easily using this code: import time N=100000 p=10000
67
7723
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/30/06 I am looking for suggestions on how to find the date ranges where there were no transactions.
4
1363
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 http://www.jibbering.com/faq/ I've got what I assume is an FAQ question:
0
1423
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 people in a household. fpl_id NumPeople 75% FPL 100% FPL 125% FPL 150% FPL 1 1 $638.00 $851.00 $1,064.00 $1,276.00 2 2 $856.00 $1,141.00 $1,426.00 $1,711.00 3 3 $1,073.00 $1,431.00 $1,789.00 $2,146.00
8
5372
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: compressedstream = StringIO.StringIO(data) gzipper = gzip.GzipFile(fileobj=compressedstream) data = gzipper.read()
4
2826
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 and everytime i try to enter VBA it hangs so i cant find a way to fix it. I belive that it corrupts in some of the code i wrote yesterday. This is an extraordinary fault, i have never seen access behave like this in my 2-3 years of experience. I...
0
9722
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10643
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10391
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10121
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9200
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7664
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5690
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3862
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3015
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.