Prime Infrastructure 2.1 CLI Template to TFTP Copy File?
I'm trying to run the following command on a range of devices:
copy tftp://10.10.10.10/new-acl.txt running-config
The command is in enable mode and interactive, it prompts for confirmation of the filename.
Here's the CLI template I've cobbled together:
#MODE_ENABLE
#INTERACTIVE
copy tftp://10.10.10.10/new-acl.txt running-config<IQ>Destination filename [running-config]? <R>running-config
#ENDS_INTERACTIVE
#MODE_END_ENABLE
However, it fails with:
Error : Exception while sending interactive commands to device, java.util.regex.PatternSyntaxException:Illegal character range near index 31 'Destination filename [running-config]? ' ^
I've tried escaping the string with single quotes, double quotes and backslashes for the []? characters, but nothing seems to work. Any advice from the community on how to proceed?
Based on what I understood your suggestion to be, I changed the template from:
#MODE_ENABLE
#INTERACTIVE
copy tftp://10.10.10.10/new-acl.txt running-config<IQ>Destination filename [running-config]? <R>running-config
#ENDS_INTERACTIVE
#MODE_END_ENABLE
to:
#MODE_ENABLE
#INTERACTIVE
copy tftp://10.10.10.10/new-acl.txt running-config<R>
#ENDS_INTERACTIVE
#MODE_END_ENABLE
Deploying the new template resulted in the error:
Error : Exception while sending interactive commands to device, Expect timeout: Failed to match expected device output due to Expect timeout current timeout 60000. Current output : Destination filename [running-config ]? Current expects : (<switchname>|<switchname>)\([^\)]+\)#\s*\z <switchname>#
Similar Messages
-
Prime InfraStructure 2.2 Configuration Template error
Hi All,
I'm facing Configuration template error . I can add the CLI template then after i press on Deploy i get error message and this is happening with all the CLI templates . ( also Attached the error )
The error message : "
Template Deployment- Prepare and schedule : HA With Virtual IP
There was an error while parsing and rendering the content. (updateLeftTreeOnce is not defined )
The HA With Virtual IP Template Body as below :
logging 10.30.2.252
ip access-list standard VTY_ACCESS
no deny any log
permit 10.30.2.252
deny any logWe are facing the exact same issue. Here are the version :
Cisco Prime Infrastructure
Version : 2.2.0
Build : 2.2.0.0.158
We tried restarting the NCS services, but it doesn't help. We have the issue on differents PC and browsers. Users told me they got the issue before but it disappeared by itself. We will open a case about it. -
Prime 2.1 Logs CLI Template Jobs
Hi,
does anybody know by chance under which folder or in which file Prime writes executed CLI Template Jobs to troubleshoot failed jobs?
ThanksHi ,
You can find that information ( job failure ) in the below log files::
>>> jobManager.log
>> ifm_jobscheduler.log
Thanks-
Afroz
***Ratings Encourages Contributors *** -
Prime Infrastructure 2.0 is not accepting ubf patch file for upload
Hi,
After successfully installing Prime Infrastructure 2.0 on a single server via OVA file in ESX, i tried to install all the latest patches.
- pi_update_2.0-3.zip was installed successful
But for the patch "pi_dev_pack_update_2.0-10.ubf" i was not be able to do the file-upload via the Web-GUI.
Is there anyone who knows how to put this file on the Prime server and how to install this patch via CLI ?
Cisco Application Deployment Engine OS Release: 2.0
ADE-OS Build Version: 2.0.6.003-px-build
ADE-OS System Architecture: x86_64
Copyright (c) 2005-2010 by Cisco Systems, Inc.
All rights reserved.
Hostname: xxxxxxx
Version information of installed applications
Cisco Prime Infrastructure
Version : 2.0.0.0.294
Kind regards,
Danjan Mudde.Hi Danjan,
****These patches cannot be applied via cli and can only be applied from GUI of Prime*****
Go to the link below and download the "pi_dev_pack_update_2.0-10.ubf"
http://software.cisco.com/download/release.html?mdfid=284422771&flowid=45323&softwareid=28
4272933&release=2.0.10&relind=AVAILABLE&rellifecycle=&reltype=all
After downloading the file, go to "Administration > Software Update", click upload
update file, browse to the file location that you've downloaded.
Once the file has beenuploaded, you can select the update and click install.
After installing, it shouldindicate "Pending Restart" = Yes. You will likely need to
go to the cli and do an "ncs stop" and then "ncs start".
Hope it will help
Thanks-
Afroz
[Do rate the useful post] -
Cisco Prime 2.1 CLI-Template for Switch configuration Backup
Hello everybody,
I am trying to write a CLI Template in cisco Prime to save the running-configuration of our core switch to the FTP server,
I have already configured the FTP username and Password in the core Switch
ip ftp username cisco
ip ftp password cisco123
in Cisco Prime I have created a template as follow:
copy running-config ftp:
$FTP_IP_addrress >> the FTP Server
$name >> the name of file and the date
After deploying this template on the core switch,
I received Error Msg in Prime as follow:
Error : Command returned an error : copy running-config ftp: 172.16.30.30 Run_Config_Core_19_2_2015 ^ % Invalid input detected at '^' marker. QAF-DC-4507-CORE(config)#
I know that the backup files can be fetched directly from Cisco Prime in the Configuration Archives, But also I need to test if we can take a backup directly to the FTP server using Prime.
Thanks in advance.Thank you Bkennedy for replying,
I changed my template to be as follow:
#MODE_ENABLE
copy running-config ftp:
$Mgmt_IP_addrress
$name
#MODE_END_ENABLE
but still I am receiving Error like :
Error : Exception while sending interactive commands to device, Expect timeout: Failed to match expected device output due to Expect timeout current timeout 60000. Current output : Address or name of remote host []? Current expects : (DC-450.{0,30}|DC-4507-AGG)\([^\)]+\)#\s*\z DC-4507-AGG#
I believe that we have to tell the Prime how to send the variables to Switch, because the switch is waiting for the remote host IP address and the destination file name???
DC-4507-AGG#copy running-config ftp:
Address or name of remote host []? X.Y.Z.W
Destination filename [dc-4507-agg-confg]?
% VRF table-id 0 not active
% VRF table-id 0 not active
Writing dc-4507-agg-confg !
24425 bytes copied in 1.500 secs (16283 bytes/sec)
DC-4507-AGG# -
Prime Infrastructure 1.3 + WLC 2504 - Enable LAG?
Hi everybody,
I'm facing a little issue using Prime Infrastructure 1.3 configuration templates to manage a couple of 2504 WLCs.
I'm using a Configuration -> General template to enable LAG on a couple of controller and when I try to apply it I get the error: "LAG mode cannot be enabled for 2500 series of controllers."
Obviously I can enable LAG locally on controllers, but then each time I try to apply the configuration template from Prime Infrastructure LAG gets disabled again.
Is this a known issues? Does anybody known how it can be worked around?
Thanks,
LThere is a defect in PI 1.4 that you can't enable LAG for the 2504. It's possible that 1.3 also affected
https://tools.cisco.com/bugsearch/bug/CSCui37076
HTH,
Steve
Please remember to rate useful posts, and mark questions as answered -
Cisco Prime Infrastructure 2.0 import image via WAN link failed.
Cisco Prime Infrastructure 2.0 behind NAT that can copy image on device to Cisco Prime infra but can not deploy from Cisco Prime Infra import image from device. How to solve problem,please ?
Have you downloaded and applied the latest Device Pack updates?
PI enhanced ASA support after the initial 2.0 release and the Device Packs incorporate that change.
The README file for Device Packs explains how to install them. (A bug currently does not allow the direct download in PI so you need to follow the method for installation from local storage after you manually download. Here is a link to the download location. -
I tried to copy a new ios image to several 3850 switche via CLI template but it failed.
The template lokks like:
#INTERACTIVE
copy tftp://10.x.x.x/cat3k_caa-universalk9.SPA.03.06.02a.E.152-2a.E2.bin flash: <IQ>Destination filename [cat3k_caa-universalk9.SPA.03.06.02a.E.152-2a.E2.bin]? <R>
#ENDS_INTERACTIVE
The error message looks like:
Error : Command returned an error : copy tftp://10.x.x.x/cat3k_caa-universalk9.SPA.03.06.02a.E.152-2a.E2.bin flash: ^ % Invalid input detected at '^' marker. SLT-EGDV4-255-4(config)#
What is wrong here?
Regards
StephanWell, from my point of view I've set up all things regarding ssh/scp correctly, but an upgrade via software deployment and ssh fails. Here is the logfile:
ade # cat 10.142.255.5_scp_telnet.log
dir /all flash:
Directory of flash:/
54210 -rwx 2097152 Apr 28 2015 08:01:10 +02:00 nvram_config
69697 drwx 4096 Apr 16 2015 14:27:37 +02:00 dc_profile_dir
54215 -rw- 10435 Apr 23 2015 14:04:01 +02:00 wnweb.tgz
14 -rw- 1248 Apr 23 2015 15:02:23 +02:00 packages.conf.3-6
54216 -rw- 82615244 Apr 23 2015 15:02:18 +02:00 cat3k_caa-base.SPA.03.06.02aE.pkg
54222 -rw- 99253056 Apr 23 2015 15:02:19 +02:00 cat3k_caa-wcm.SPA.10.2.120.0.pkg
15 -rw- 1248 Apr 28 2015 07:52:55 +02:00 packages.conf.3-5
54218 -rwx 2296 Apr 17 2015 09:52:48 +02:00 vlan.dat
54217 -rw- 4922044 Apr 23 2015 15:02:18 +02:00 cat3k_caa-drivers.SPA.03.06.02aE.pkg
12 drwx 4096 Jan 6 2014 07:41:29 +01:00 mnt
85188 -rw- 79122052 Feb 10 2015 08:44:16 +01:00 cat3k_caa-base.SPA.03.03.05SE.pkg
85189 -rw- 6521532 Feb 10 2015 08:44:16 +01:00 cat3k_caa-drivers.SPA.03.03.05SE.pkg
85190 -rw- 34530288 Feb 10 2015 08:44:16 +01:00 cat3k_caa-infra.SPA.03.03.05SE.pkg
85191 -rw- 34846028 Feb 10 2015 08:44:17 +01:00 cat3k_caa-iosd-universalk9.SPA.150-1.EZ5.pkg
85192 -rw- 25170832 Feb 10 2015 08:44:17 +01:00 cat3k_caa-platform.SPA.03.03.05SE.pkg
85193 -rw- 77456192 Feb 10 2015 08:44:17 +01:00 cat3k_caa-wcm.SPA.10.1.150.0.pkg
54219 -rw- 33756144 Apr 23 2015 15:02:18 +02:00 cat3k_caa-infra.SPA.03.06.02aE.pkg
54220 -rw- 42882380 Apr 23 2015 15:02:18 +02:00 cat3k_caa-iosd-universalk9.SPA.152-2a.E2.pkg
54221 -rw- 27362192 Apr 23 2015 15:02:18 +02:00 cat3k_caa-platform.SPA.03.06.02aE.pkg
13 -rw- 1248 Feb 10 2015 08:44:22 +01:00 packages.conf
1621966848 bytes total (1021952000 bytes free)
SLT-EGDV4-255-5#software clean
Preparing clean operation ...
[1]: Cleaning up unnecessary package files
[1]: No path specified, will use booted path flash:packages.conf
[1]: Cleaning flash:
[1]: Preparing packages list to delete ...
In use files, will not delete:
cat3k_caa-base.SPA.03.03.05SE.pkg
cat3k_caa-drivers.SPA.03.03.05SE.pkg
cat3k_caa-infra.SPA.03.03.05SE.pkg
cat3k_caa-iosd-universalk9.SPA.150-1.EZ5.pkg
cat3k_caa-platform.SPA.03.03.05SE.pkg
cat3k_caa-wcm.SPA.10.1.150.0.pkg
packages.conf
[1]: Files that will be deleted:
cat3k_caa-base.SPA.03.06.02aE.pkg
cat3k_caa-drivers.SPA.03.06.02aE.pkg
cat3k_caa-infra.SPA.03.06.02aE.pkg
cat3k_caa-iosd-universalk9.SPA.152-2a.E2.pkg
cat3k_caa-platform.SPA.03.06.02aE.pkg
cat3k_caa-wcm.SPA.10.2.120.0.pkg
packages.conf.3-5
packages.conf.3-6
[1]: Do you want to proceed with the deletion? [yes/no]: yes
[1]: Clean up completed
Than it fails back to TFTP which is working but taking lots of time... Attached is a screenshot of image management in PI. -
Prime Infrastructure - CLI Template - SmartPort Macro
I'm hoping that someone can provide an example of a CLI Template for deploying a SmartPort Macro in Prime Infrastructure 2.0. I've tried multiple formats and can't seem to get it to work.
Macro to be configured:
macro auto execute TEST_MACRO {
blah
blah
blahdeeblah
Example 1 Template:
#INTERACTIVE
macro auto execute TEST_MACRO {
<IQ><R>
<IQ><R>blah
<IQ><R>blah
<IQ><R>blahdeeblah
<IQ><R>}
#ENDS_INTERACTIVE
The above example runs successfully, however it does not actually produce a result.
Example 2 Template:
<MLTCMD>macro auto execute TEST_MACRO {
blah
blah
blahdeeblah
}</MLTCMD>
The above example fails with the following result:
Error : Exception while sending interactive commands to device, Expect timeout: Failed to match expected device output due to Expect timeout current timeout 60000. Current output : > >blah >blah >blahdeeblah >} mc-t307-acc06(config)# Current expects : blah blah blahdeeblah \}
I'm sure that all my troubles stem from '>' result that is sent to the CLI after each line of the function is entered, however I can't seem to work around the problem.
I've tried many more combinations without success... Any help would be appreciated.Instead of
#INTERACTIVE
macro auto execute TEST_MACRO {
<IQ><R>
<IQ><R>blah
<IQ><R>blah
<IQ><R>blahdeeblah
<IQ><R>}
#ENDS_INTERACTIVE
Try
<MLTCMD>
macro auto execute TEST_MACRO {
blah
blah
blahdeeblah
</MLTCMD>
This works for me. -
CLI Template to run Archive Command to upgrade 3750 Switch in Prime
Does anyone have or know how to write a template to upgrade a mixed stack of 3750 switches in Prime Infrastructure 2.0? Prime does not support upgrading a mixed stack yet, but it can be done from command line.
the command line would be:
archive download-sw /allow /overwrite tftp://10.30.2.14/3750efilename tftp://10.30.2.14/3750filenameHi,
Please check:
1. You need to download the correct .tar image file;
2. Copy it to the root of your FTP or TFTP server;
3. Upload, extract and install the .tar file to the switches (I always use the /imageonly option, because I don’t need the html files for management);
4. Reload the switch stack;
Please use this command:
sw-stack#archive download-sw /imageonly /overwrite /allow-feature-upgrade ftp://user:password@/image-file.tar
The boot parameters are automatically changed to the new IOS firmware. You can check the boot parameters with the show boot command.
Regards
Dont forget to rate helpful posts. -
How to deploy prime infrastructure template on selected interfaces/ports
Hi,
So I manged to create an port grouping (all ports which start with the description ACP)
And I also managed to create a CLI-template with the a DB variable setup (see http://www.cisco.com/c/en/us/td/docs/net_mgmt/prime/infrastructure/2-0/user/guide/prime_infra_ug/create_temps.html#60783)
My template:
#foreach ($interfaceName in $InterfaceNameList)
interface $interfaceName
switchport trunk encapsulation dot1q
switchport trunk native vlan 3
switchport trunk allowed vlan 3-8
switchport mode trunk
#end
But when I deploy this template it will apply to all the ports on that switch, I can't apply only to the ports in the port group
Is it possible to fix this somehow?
I can think of 3 ways:
Use other menu than Deploy -> Configuration Tasks -> <select template> -> deploy..., Which is the correct one?
Make an new DB variable which only select ports which start with the description "ACP", but I am on the dark how to create such a DB variable, I know I need to edit /opt/CSCOlumos/conf/ifm/template/inventoryTagsInTemplate/CLITemplateDbVariablesQuery.properties but I can't find the syntax/field description
Use an "if construction" in the cli template, something like #if(${description} == "ACP" ...., but how precisely?
Who can give me any tips?
Thanks,
Emiel WittemanThanks for the reply. Im aware that there are still gaps between LMS and Prime, I didn't see the ability to push a config to a port group as being a compliance feature, but I see what you are saying.
What I don't get though is that your link (thanks again) bears no resemblance to the config/admin guide section in Prime. Which in fact was in the NCS docs too (I haven't gone back any further to check).
If its not supported then that's bad enough, but for Cisco to document what seems to be an NCS/Prime specific way to do this and leave it in when it doesn't work really is appalling.
Im still hoping Cisco finally make a management tool without major gaps in it... :-( -
Cisco Prime Infrastructure is a damned nightmare of browser bugs (some features work in IE8, some in IE9, and some only in Firefox). And I am not sure if what I am experiencing is a browser bug - or a real bug - or something that I was able to do before and can't any more? I would love for someone to either explain why this is happening to me, or reproduce the bug!
I'm running Prime 2.1.1. I am doing this ...
Configure > Controller Template Launchpad
System > Dynamic Interface
Select a command > Add interface (GO)
Enter all the properties - roll to the bottom of the page, and click Apply to Controllers
I have four controllers. And normally I would add an interface for each controller. But I can only create two out of the four. It doesn't matter which two I choose. When I click Add under Manage Interfaces for the third controller, I cannot click the Done button to apply it (see screenshot, attached). I have found that if I change the VLAN to something else, it will let me save it. But ... why? I went back and reviewed all of my existing interface templates and I am not doing anything different. Although, they were all created a long while ago using WCS 7.x.
Any help, guidance, or confirmation of insanity would be appreciated.
-Steve BallantyneI doubt I will get any hits on this here but I always try. I opened a TAC case. I will come back and comment on whatever they find.
-
Prime Infrastructure 2.1. Configuration template deploy problem.
Hello! I have a problem with the CLI template deployment on Cisco Prime. PI version is 2.1.
There is the following template, which contains:
logging on
logging 10.10.10.10
When I try to deploy it on the router 1800 IOS Version 12.3(14)T7 all is going well and the report I get the following:
Device
Status
Transcript
10.5.5.1
Success
configlet: logging on logging 10.10.10.10 response: terminal width 0 config t logging on logging 10.10.10.10
But, when I try to deploy the same template on the router 3825 IOS Version 15.1(4)M5, the system issues the following error:
Device
Status
Transcript
10.5.5.2
Failed
Error : Exception while sending interactive commands to device, Expect timeout: Failed to match expected device output due to Expect timeout current timeout 60000. Current output : Enter configuration commands, one per line. End with CNTL/Z. MAIN_VOICE_gate(config)# Current expects : (MAIN_VOICE_gate:579|MAIN_VOICE_gate:579)\([^\)]+\)#\s*\z MAIN_VOICE_gate:579#
In what may be the reason that Prime cannot deploy the configuration on IOS version 15.1?
Thank you!Good day! Yes, maybe we have the same BUG
https://tools.cisco.com/bugsearch/bug/CSCub57283
but in the status written that it is Fixed and applies to releases 1.2 and 2.0, but we used version 2.1. -
Prime Infrastructure 2.0 tftp service
Hi
I'm having problems with upgrading software images on swithces when using tftp for image transfer. (SCP is not availiable in current image)
The job reports as failed in "Jobs Dashboard"
Validating device distribution context
Distributing image c3560-ipservicesk9-mz.150-2.SE4.bin using protocol SCP
Distributing image c3560-ipservicesk9-mz.150-2.SE4.bin using protocol TFTP
SUCCESS
FAILURE
FAILURE
..and when looking into the logfile
/opt/CSCOlumos/conf/ifm/swim/jobs/X.X.X.X_tftp_telnet.log
it contains this output:
HOSTNAME#copy tftp://X.X.X.X/c3560-ipservicesk9-mz.150-2.SE4.bin flash:c3560-ipservicesk9-mz.150-2.SE4.bin
Destination filename [c3560-ipservicesk9-mz.150-2.SE4.bin]? c3560-ipservicesk9-mz.150-2.SE4.bin
Accessing tftp://X.X.X.X/c3560-ipservicesk9-mz.150-2.SE4.bin...
Loading c3560-ipservicesk9-mz.150-2.SE4.bin from X.X.X.X (via VlanY): !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!... [timed out]
%Error reading tftp://X.X.X.X/c3560-ipservicesk9-mz.150-2.SE4.bin (Timed out)
(I removed a bunch of "!" in the output )
I guess that the tftp server on the PI server shuts down or closes the connection after a period of time
Is there a way to configure the tftp server settings on the Prime Infrastructure server or keep the tftp service always running?
Running virtual appiance
prime/admin# sh ver
Cisco Application Deployment Engine OS Release: 2.0
ADE-OS Build Version: 2.0.6.003-px-build
ADE-OS System Architecture: x86_64
Copyright (c) 2005-2010 by Cisco Systems, Inc.
All rights reserved.
Hostname: prime
Version information of installed applications
Cisco Prime Infrastructure
Version : 2.0.0.0.294
Regards
Roger SaugestadWe have the same problems with upgrading IOSes via TFTP.
Other TFTP tasks, like gathering vlan.dat files in Configuration Archive Job, is also failed.
Netstat -an command in root shell shows that java process listening 69 udp.
udp 0 0 :::69 :::* 9183/java
/opt/CSCOlumos/jre32/bin/java -Djava.system.class.loader=com.cisco.xmp.classLoader.XMPSystemClassLoader -Dcom.cisco.xmp.XMPHome=/opt/CSCOlumos -Dinstall.dir=/opt/CSCOlumos -server -Xms32m -Xmx256m -XX:MaxPermSize=128m -Djava.awt.headless=true -Daes.dir=/opt/CSCOlumos -Dmibs.root=/opt/CSCOlumos/resources/wirless/mibs -cp /opt/CSCOlumos/classloader-conf:/opt/CSCOlumos/./lib/xmp/XMPClassLoader-8.0.24.jar com.cisco.remoting.packaging.RemotingServiceMain Tftp
Wireshark shows that Prime tried to do "copy flash:vlan.dat tftp:" but server says "%Error opening tftp://address/xxxx.cfg"
Strange thing that in directory /localdisk/tftp I see some collected vlan.dat files (about 10, regardless that we have >1000 switches). But I cannot copy them to device manually..
Summary, TFTP service is started but not works correctly. -
Prime Infrastructure importing templates
Hi all,
We have an existing WCS setup (7.0.240.0).
I have built up a Prime Infrastructure server running release 1.3.0.20.
Originally I was going to look at migrating our existing WCS configure but the two stage process (WCS -> NCS -> Prime) looked prone to errors. Dediced to skip it and concentrate and building up from blank slate.
The only exception was the floorplan maps for Wifi, I was able to export these straight from WCS to Prime without any hicups.
I then added our main WLC and assigned the APs to the correct maps.
Sweet!
Now I would like to get the templates going for our WLCs as i have a couple more to deploy. The issue is that I dont want to manually configure templates in Prime. WCS had the ability to import templates from an existing WLC, a goldern WLC config. I cant seem to find any doco indicating this ability. Anyone come across something similar or another way I might acheive?
Cheers
ChrisFrom the Classic Theme:::
Go to Configure> Controllers, Select the Controller(s), select Discover Templates from Controllers
http://www.cisco.com/en/US/docs/wireless/prime_infrastructure/1.3/configuration/guide/ctrlcfg.html#wp2147938
Maybe you are looking for
-
7210 will no longer print.
My 7210 All-in-one no longer prints (after 3 years of service). It will still scan and copy, but the printer is no longer recognized. I have an HP computer with Windows Vista, 64-bit. The default , printer is Microsoft XPS Document writer, but the 72
-
Account-based COPA and having Cost Center as Real Object in Sales Order
Hi, We have recently activated account-based COPA and in our SO, we realized the Profitability Segment being populated- that is not a problem in normal scenarios. However, in some cases, we would like to charge to a cost center instead of COPA. We ha
-
Hi, We have changed the fiscal year of FI-AA to 2009 in t-code AJRW, but some assets showing as error in Fiscal Year Change. and balances of those assets were not carry forwarded to FY 2009. i have also run the programme AUVA to complete the assets
-
Hi, I have a model node and a table. I want to do the next: Depending of some attribute, I want to hide or show the element on the table and if the the element is hidden, dont count it(for the table's footer). Neither show the blank space on the tabl
-
How to Fix the 1st row in Table
How to Fix the 1st row in Table In EP, one of the page we are getting out put in the table format. It's working fine, but as per the new requirement we have to fix (freeze) the first row of the table. (.i.e. whenever I click the page dow