Thanks, Parnassus, for your responses.
We made a few changes to the TCL syntax using AI, and the script now works well on Juniper SRX320 models. However, there is a limitation with the Juniper SRX1500, where the configuration backup is only partial. This appears to be due to the way the configuration files are being pulled using the CLI method.
#**************************************************************************
# Identification: enter_exec
# Purpose: enter the "exec" mode on the device
#**************************************************************************
set IGNORE_DELAY true
if {$banner_skip_repeat != "0"} {
expect -re "$banner_skip"
expect "*"
}
set timeout 120
set loop true
set loop1 false
while {$loop == "true"} {
expect {
"Last login:" {
expect $exec_prompt
send "\r"
expect $exec_prompt
set loop false
}
-re $password_prompt {
if {$password == "\x24password" || $password == ""} {
set ERROR_MESSAGE "Missing password"
set ERROR_RESULT true
return
} else {
send "$password\r"
set sent_password "true"
}
}
-re $next_passcode_prompt {
if {$use_securid != "exec" && $use_securid != "enable"} {
set ERROR_MESSAGE "Device not configured for SecurID."
set ERROR_LOGIN true
return
}
send "$next_passcode\r"
}
$username_prompt {
if {$username == "\x24username" || $username == ""} {
set ERROR_MESSAGE "Missing username"
set ERROR_RESULT true
return
} else {
send "$username\r"
set sent_password "false"
}
}
"new tokencode:" {
send "$next_passcode\r"
}
"Enter a new PIN" {
set ERROR_MESSAGE "Could not login. A new pin needs to be created for this Secure ID user."
set ERROR_RESULT true
return
}
"error: Unable to authenticate" {
set ERROR_MESSAGE "Super-user account is required for device management."
set ERROR_RESULT true
return
}
"Press Y or ENTER to continue, N to exit" {
send "Y"
}
"Wrong password" {
set ERROR_RESULT true
set ERROR_MESSAGE "Wrong password."
set loop false
}
"Please press ENTER" {
send "\r"
set loop false
}
"Login failed" {
set ERROR_RESULT true
set ERROR_MESSAGE "Device rejected the username or password."
set loop false
}
"Passphrase for key" {
send "$passphrase\r"
}
-re "y/n" {
send "y\r"
}
-re "Store key in cache|Update cached key" {
send "y\r"
}
"Unable to use key file" {
set ERROR_RESULT true
set ERROR_MESSAGE "Unable to use key file."
set loop false
}
"Network error" {
set ERROR_RESULT true
set ERROR_MESSAGE "Network error."
set loop false
}
"Access denied" {
set ERROR_RESULT true
set ERROR_MESSAGE "Access denied."
set loop false
}
"Authentication refused" {
set ERROR_RESULT true
set ERROR_MESSAGE "Authentication refused."
set loop false
}
"FATAL ERROR:" {
set ERROR_RESULT true
set ERROR_MESSAGE "FATAL ERROR."
set loop false
}
"Fatal:" {
set ERROR_RESULT true
set ERROR_MESSAGE "FATAL."
set loop false
}
"Unable to load private key" {
set ERROR_RESULT true
set ERROR_MESSAGE "Unable to load private key."
set loop false
}
"Server refused" {
set ERROR_RESULT true
set ERROR_MESSAGE "Server refused."
set loop false
}
"Enter passphrase for key" {
send "$passphrase\r"
}
"Are you sure you want to continue connecting" {
send "yes\r"
}
"Permission denied" {
set ERROR_RESULT true
set ERROR_MESSAGE "Permission denied."
set loop false
}
"Received disconnect" {
set ERROR_RESULT true
set ERROR_MESSAGE "Received disconnect."
set loop false
}
"bad permissions" {
set ERROR_RESULT true
set ERROR_MESSAGE "bad permissions."
set loop false
}
"Identity file * not accessible:" {
set ERROR_RESULT true
set ERROR_MESSAGE "Identity file not accessible."
set loop false
}
"Connection refused" {
set ERROR_RESULT true
set ERROR_MESSAGE "Connection refused."
set loop false
}
"Connection timed out" {
set ERROR_RESULT true
set ERROR_MESSAGE "Connection timed out."
set loop false
}
"connection is closed" {
set ERROR_RESULT true
set ERROR_MESSAGE "connection is closed."
set loop false
}
"Connection closed" {
set ERROR_RESULT true
set ERROR_MESSAGE "Connection closed."
set loop false
}
"Write failed:" {
set ERROR_RESULT true
set ERROR_MESSAGE "Write failed: Broken pipe."
set loop false
}
"Missing argument" {
set ERROR_RESULT true
set ERROR_MESSAGE "Missing argument."
set loop false
}
"no authentication methods available" {
set ERROR_RESULT true
set ERROR_MESSAGE "no authentication methods available."
set loop false
}
"Authentication failed" {
set ERROR_RESULT true
set ERROR_MESSAGE "Authentication failed."
set loop false
}
"S/A/C" {
send "S\r"
}
"assphrase:" {
send "$passphrase\r"
}
"Too many authentication failures" {
set ERROR_RESULT true
set ERROR_MESSAGE "Too many authentication failures."
set loop false
}
"Connection aborted" {
set ERROR_RESULT true
set ERROR_MESSAGE "Connection aborted."
set loop false
}
"parameter failed" {
set ERROR_RESULT true
set ERROR_MESSAGE "parameter failed."
set loop false
}
"Connection failed" {
set ERROR_RESULT true
set ERROR_MESSAGE "Connection failed."
set loop false
}
"passphrase is invalid" {
set ERROR_RESULT true
set ERROR_MESSAGE "passphrase is invalid."
set loop false
}
"Server rejected" {
set ERROR_RESULT true
set ERROR_MESSAGE "Server rejected."
set loop false
}
$exec_prompt {
send "\r"
expect $exec_prompt
set loop false
}
"Authentication failed" {
set ERROR_MESSAGE "Authentication failed"
set ERROR_RESULT true
return
}
"Login incorrect" {
if {$loop1 == "false"} {
send "\r"
set loop1 true
} else {
set ERROR_MESSAGE "Login incorrect"
set ERROR_RESULT true
return
}
}
timeout {
set ERROR_MESSAGE "Device timeout."
set ERROR_RESULT true
return
}
}
}
if {$useTruePrompt != "false"} {
send "\r"
expect -re "(.*?$exec_prompt)"
set exec_prompt $expect_out(1,string)
}
if {$resetMorePrompting != "false"} {
send "set cli screen-length 0\r"
expect $exec_prompt
}
set IGNORE_DELAY false
-------------------------------------------
Original Message:
Sent: Aug 06, 2025 05:50 AM
From: parnassus
Subject: HPE IMC 7.3 (E0710P04) Config backup issue for Juniper SRX1500, Juniper SRX320, Extreme x440 switches
The fact that there are no differences between mine and your means that there weren't changes between the E0710P06 and the newer E0710H08...but the issue you're experiencing, as far as I understand it, persists...probably HPE Support should be involved to understand what is wrong or what should be eventually changed/adapted (I'm not an expert to help you more).
Original Message:
Sent: Aug 06, 2025 05:46 AM
From: Wajid Ali
Subject: HPE IMC 7.3 (E0710P04) Config backup issue for Juniper SRX1500, Juniper SRX320, Extreme x440 switches
Hi,
I just compared the enter_exec.tcl file from my IMC -> Juniper tcl script with your version, and the contents are exactly the same.

#**************************************************************************# Identification:enter_exec# Purpose: enter the "exec" mode on the device#**************************************************************************set IGNORE_DELAY trueif {$banner_skip_repeat != "0"} { expect -re "$banner_skip" expect "*"}set timeout 120set loop trueset loop1 falsewhile {$loop == "true"} { expect { "Last login:" { expect $exec_prompt send "\r" expect $exec_prompt set loop false } -re $password_prompt { if {$password == "\x24password" || $password == ""} { set ERROR_MESSAGE "Missing password" set ERROR_RESULT true return } else { send "$password\r" set sent_password "true" } } -re $next_passcode_prompt { if { $use_securid != "exec" && $use_securid != "enable" } { set ERROR_MESSAGE "Device not configured for SecurID." set ERROR_LOGIN true return } send "$next_passcode\r" } $username_prompt { if {$username == "\x24username" || $username == ""} { set ERROR_MESSAGE "Missing username" set ERROR_RESULT true return } else { send "$username\r" set sent_password "false" } } "new tokencode:" { send "$next_passcode\r" } "Enter a new PIN" { set ERROR_MESSAGE "Could not login. A new pin needs to be created for this Secure ID user." set ERROR_RESULT true return } "error: Unable to authenticate" { set ERROR_MESSAGE "Super-user account is required for device management." set ERROR_RESULT true return } "Press Y or ENTER to continue, N to exit" { send "Y" } "Wrong password" { set ERROR_RESULT true set ERROR_MESSAGE "Wrong password." #exit set loop false } "Please press ENTER" { send "\r" set loop false } "Login failed" { # Failure ... get out set ERROR_RESULT true set ERROR_MESSAGE "Device rejected the username or password." #exit set loop false } "Passphrase for key" { send "$passphrase\r" } -re "y/n" { send "y\r" } -re "Store key in cache|Update cached key" { send "y\r" } "Unable to use key file" { set ERROR_RESULT true set ERROR_MESSAGE "Unable to use key file." set loop false } "Network error" { set ERROR_RESULT true set ERROR_MESSAGE "Network error." set loop false } "Access denied" { set ERROR_RESULT true set ERROR_MESSAGE "Access denied." set loop false } "Authentication refused" { set ERROR_RESULT true set ERROR_MESSAGE "Authentication refused." set loop false } "FATAL ERROR:" { set ERROR_RESULT true set ERROR_MESSAGE "FATAL ERROR." set loop false } "Fatal:" { set ERROR_RESULT true set ERROR_MESSAGE "FATAL." set loop false } "Unable to load private key" { set ERROR_RESULT true set ERROR_MESSAGE "Unable to load private key." set loop false } "Server refused" { set ERROR_RESULT true set ERROR_MESSAGE "Server refused." set loop false } "Enter passphrase for key" { send "$passphrase\r" } "Are you sure you want to continue connecting" { send "yes\r" } "Permission denied" { set ERROR_RESULT true set ERROR_MESSAGE "Permission denied." set loop false } "Received disconnect" { set ERROR_RESULT true set ERROR_MESSAGE "Received disconnect." set loop false } "bad permissions" { set ERROR_RESULT true set ERROR_MESSAGE "bad permissions." set loop false } "Identity file * not accessible:" { set ERROR_RESULT true set ERROR_MESSAGE "Identity file not accessible." set loop false } "Connection refused" { set ERROR_RESULT true set ERROR_MESSAGE "Connection refused." set loop false } "Connection timed out" { set ERROR_RESULT true set ERROR_MESSAGE "Connection timed out." set loop false } "connection is closed" { set ERROR_RESULT true set ERROR_MESSAGE "connection is closed." set loop false } "Connection closed" { set ERROR_RESULT true set ERROR_MESSAGE "Connection closed." set loop false } "Write failed:" { set ERROR_RESULT true set ERROR_MESSAGE "Write failed: Broken pipe." set loop false } "Missing argument" { set ERROR_RESULT true set ERROR_MESSAGE "Missing argument." set loop false } "no authentication methods available" { #Bitvise set ERROR_RESULT true set ERROR_MESSAGE "no authentication methods available." set loop false } "Authentication failed" { set ERROR_RESULT true set ERROR_MESSAGE "Authentication failed." set loop false } "S/A/C" { send "S\r" } "assphrase:" { send "$passphrase\r" } "Too many authentication failures" { set ERROR_RESULT true set ERROR_MESSAGE "Too many authentication failures." set loop false } "Connection aborted" { set ERROR_RESULT true set ERROR_MESSAGE "Connection aborted." set loop false } "parameter failed" { set ERROR_RESULT true set ERROR_MESSAGE "parameter failed." set loop false } "Connection failed" { set ERROR_RESULT true set ERROR_MESSAGE "Connection failed." set loop false } "passphrase is invalid" { set ERROR_RESULT true set ERROR_MESSAGE "passphrase is invalid." set loop false } "Server rejected" { set ERROR_RESULT true set ERROR_MESSAGE "Server rejected." set loop false } $exec_prompt { send "\r" expect $exec_prompt set loop false } "Authentication failed" { set ERROR_MESSAGE "Authentication failed" set ERROR_RESULT true return } "Login incorrect" { if {$loop1 == "false"} { send "\r" set loop1 true } else { set ERROR_MESSAGE "Login incorrect" set ERROR_RESULT true return } }timeout { set ERROR_MESSAGE "Device timeout." set ERROR_RESULT true return } }}if {$useTruePrompt != "false" } { send "\r" expect -re "(.*?$exec_prompt)" set exec_prompt $expect_out(1,string)}if {$resetMorePrompting != "false"} { send "set cli screen-length 0\r" expect $exec_prompt}set IGNORE_DELAY false
Original Message:
Sent: Aug 06, 2025 04:59 AM
From: parnassus
Subject: HPE IMC 7.3 (E0710P04) Config backup issue for Juniper SRX1500, Juniper SRX320, Extreme x440 switches
Hi, apparently still there is an error on the enter_exec.tcl file (see here) for JuniperGeneric (see below path). Here an explanation of what that enter_exec.tcl script does (interesting).
On my HPE IMC 7.3 E0710P06 the file /opt/iMC/server/conf/adapters/ICC/Juniper networks/JuniperGeneric/enter_exec.tcl is:
#**************************************************************************# Identification:enter_exec# Purpose: enter the "exec" mode on the device#**************************************************************************set IGNORE_DELAY trueif {$banner_skip_repeat != "0"} { expect -re "$banner_skip" expect "*"}set timeout 120set loop trueset loop1 falsewhile {$loop == "true"} { expect { "Last login:" { expect $exec_prompt send "\r" expect $exec_prompt set loop false } -re $password_prompt { if {$password == "\x24password" || $password == ""} { set ERROR_MESSAGE "Missing password" set ERROR_RESULT true return } else { send "$password\r" set sent_password "true" } } -re $next_passcode_prompt { if { $use_securid != "exec" && $use_securid != "enable" } { set ERROR_MESSAGE "Device not configured for SecurID." set ERROR_LOGIN true return } send "$next_passcode\r" } $username_prompt { if {$username == "\x24username" || $username == ""} { set ERROR_MESSAGE "Missing username" set ERROR_RESULT true return } else { send "$username\r" set sent_password "false" } } "new tokencode:" { send "$next_passcode\r" } "Enter a new PIN" { set ERROR_MESSAGE "Could not login. A new pin needs to be created for this Secure ID user." set ERROR_RESULT true return } "error: Unable to authenticate" { set ERROR_MESSAGE "Super-user account is required for device management." set ERROR_RESULT true return } "Press Y or ENTER to continue, N to exit" { send "Y" } "Wrong password" { set ERROR_RESULT true set ERROR_MESSAGE "Wrong password." #exit set loop false } "Please press ENTER" { send "\r" set loop false } "Login failed" { # Failure ... get out set ERROR_RESULT true set ERROR_MESSAGE "Device rejected the username or password." #exit set loop false } "Passphrase for key" { send "$passphrase\r" } -re "y/n" { send "y\r" } -re "Store key in cache|Update cached key" { send "y\r" } "Unable to use key file" { set ERROR_RESULT true set ERROR_MESSAGE "Unable to use key file." set loop false } "Network error" { set ERROR_RESULT true set ERROR_MESSAGE "Network error." set loop false } "Access denied" { set ERROR_RESULT true set ERROR_MESSAGE "Access denied." set loop false } "Authentication refused" { set ERROR_RESULT true set ERROR_MESSAGE "Authentication refused." set loop false } "FATAL ERROR:" { set ERROR_RESULT true set ERROR_MESSAGE "FATAL ERROR." set loop false } "Fatal:" { set ERROR_RESULT true set ERROR_MESSAGE "FATAL." set loop false } "Unable to load private key" { set ERROR_RESULT true set ERROR_MESSAGE "Unable to load private key." set loop false } "Server refused" { set ERROR_RESULT true set ERROR_MESSAGE "Server refused." set loop false } "Enter passphrase for key" { send "$passphrase\r" } "Are you sure you want to continue connecting" { send "yes\r" } "Permission denied" { set ERROR_RESULT true set ERROR_MESSAGE "Permission denied." set loop false } "Received disconnect" { set ERROR_RESULT true set ERROR_MESSAGE "Received disconnect." set loop false } "bad permissions" { set ERROR_RESULT true set ERROR_MESSAGE "bad permissions." set loop false } "Identity file * not accessible:" { set ERROR_RESULT true set ERROR_MESSAGE "Identity file not accessible." set loop false } "Connection refused" { set ERROR_RESULT true set ERROR_MESSAGE "Connection refused." set loop false } "Connection timed out" { set ERROR_RESULT true set ERROR_MESSAGE "Connection timed out." set loop false } "connection is closed" { set ERROR_RESULT true set ERROR_MESSAGE "connection is closed." set loop false } "Connection closed" { set ERROR_RESULT true set ERROR_MESSAGE "Connection closed." set loop false } "Write failed:" { set ERROR_RESULT true set ERROR_MESSAGE "Write failed: Broken pipe." set loop false } "Missing argument" { set ERROR_RESULT true set ERROR_MESSAGE "Missing argument." set loop false } "no authentication methods available" { #Bitvise set ERROR_RESULT true set ERROR_MESSAGE "no authentication methods available." set loop false } "Authentication failed" { set ERROR_RESULT true set ERROR_MESSAGE "Authentication failed." set loop false } "S/A/C" { send "S\r" } "assphrase:" { send "$passphrase\r" } "Too many authentication failures" { set ERROR_RESULT true set ERROR_MESSAGE "Too many authentication failures." set loop false } "Connection aborted" { set ERROR_RESULT true set ERROR_MESSAGE "Connection aborted." set loop false } "parameter failed" { set ERROR_RESULT true set ERROR_MESSAGE "parameter failed." set loop false } "Connection failed" { set ERROR_RESULT true set ERROR_MESSAGE "Connection failed." set loop false } "passphrase is invalid" { set ERROR_RESULT true set ERROR_MESSAGE "passphrase is invalid." set loop false } "Server rejected" { set ERROR_RESULT true set ERROR_MESSAGE "Server rejected." set loop false } $exec_prompt { send "\r" expect $exec_prompt set loop false } "Authentication failed" { set ERROR_MESSAGE "Authentication failed" set ERROR_RESULT true return } "Login incorrect" { if {$loop1 == "false"} { send "\r" set loop1 true } else { set ERROR_MESSAGE "Login incorrect" set ERROR_RESULT true return } }timeout { set ERROR_MESSAGE "Device timeout." set ERROR_RESULT true return } }}if {$useTruePrompt != "false" } { send "\r" expect -re "(.*?$exec_prompt)" set exec_prompt $expect_out(1,string)}if {$resetMorePrompting != "false"} { send "set cli screen-length 0\r" expect $exec_prompt}set IGNORE_DELAY false
and, given the error you reported, the problem should be found at line 15, exactly where the while starts.
Original Message:
Sent: Aug 06, 2025 01:24 AM
From: Wajid Ali
Subject: HPE IMC 7.3 (E0710P04) Config backup issue for Juniper SRX1500, Juniper SRX320, Extreme x440 switches
Thank you for the suggestion @IvoVelikov
Yes, I've already tried adding the sysOID for the Juniper models to the adapter-index.xml file under iMC\server\conf\adapters\ICC\Juniper networks. I placed the sysOID under the section that most closely matches the model, as advised. However, the issue unfortunately remains unresolved.
Additionally, when I attempt to run either an automatic or manual backup, I encounter an error related to the enter_exec.tcl script. I'm unsure whether this is due to a syntax issue within the script itself or if it's a compatibility problem with the Juniper models I'm using.
It's possible that these particular models are not fully supported by IMC.
Thanks again for your help.
Original Message:
Sent: Aug 05, 2025 02:16 AM
From: IvoVelikov
Subject: HPE IMC 7.3 (E0710P04) Config backup issue for Juniper SRX1500, Juniper SRX320, Extreme x440 switches
Hello Ali,
Please try adding the sysOID of your Juniper devices to the adapter-index.xml file located under iMC\server\conf\adapters\ICC\Juniper networks. The file is divided into sections based on device models. If you don't see your specific model, add the sysOID to the section corresponding to the model that is closest to your sysOID. Do the same for the Extreme switches, here the adapter-index file is under iMC\server\conf\adapters\ICC\Extreme networks.
Then restart the iMC server and try backing up the device. Not all device models are tested and supported in iMC, most probably those devices are also not supported, but some users can bypass this limitation by implementing the above suggestion.
Thank you,
Best Regards,
Ivaylo Velikov
Original Message:
Sent: Aug 04, 2025 07:55 PM
From: Wajid Ali
Subject: HPE IMC 7.3 (E0710P04) Config backup issue for Juniper SRX1500, Juniper SRX320, Extreme x440 switches
Thanks for the response.
I have installed the hotfix E0710H08 but still I am getting the same error, do I need to create separate adapters for Juniper SRX and updated the MIBs?


Original Message:
Sent: Jul 24, 2025 03:10 AM
From: parnassus
Subject: HPE IMC 7.3 (E0710P04) Config backup issue for Juniper SRX1500, Juniper SRX320, Extreme x440 switches
Hi! does the issue pop up again if you update your HPE IMC 7.3 E0710P04 platform to latest Hotfix E0710H08 (and considering its various activated modules updated accordingly, as per Release Note advise)?
Original Message:
Sent: 7/23/2025 11:35:00 PM
From: Wajid Ali
Subject: HPE IMC 7.3 (E0710P04) Config backup issue for Juniper SRX1500, Juniper SRX320, Extreme x440 switches
Hi ,
I'm trying to configure the config backup feature in HPE IMC 7.3 (E0710P04), and while it works fine for HPE switches, it fails for Juniper SRX1500 and Extreme Networks devices.
Any help will be appreciated