Forum Discussion
creating SSL VS
My iApp is giving the following error when i try to create a SSL websiite VS and pool. It works if i create a normal http Vs and pool and also works if i create the http VS and pool then re-configure it to include SSL.
script did not successfully complete: (can't read "::basic__port": no such variable
while executing
"set destination $::basic__addr:$::basic__port"
(procedure "configure_http_deployment" line 146)
invoked from within
"configure_http_deployment" line:260)
The Vs section of code i have is:
create VS(s)
set destination $::basic__addr:$::basic__port
if { $::ssl_encryption_questions__offload_ssl == $::YES_ANSWER } {
set https_destination $::basic__addr:443
set temp $http_optimization_profile_names
set http_optimization_profile_names \{
append http_optimization_profile_names $temp
append http_optimization_profile_names \}
set vs_name [tmsh::run_proc f5.app_utils:create_http_vs \
$tmsh::app_name $destination $snat $::EMPTY_STRING \
$http_optimization_profile_names $persist_profile \
$tcp_server_profile_name $tcp_client_profile_name]
if { $ssl_irule_name != $::EMPTY_STRING } {
tmsh_modify "/ ltm virtual" "$vs_name rules \{ $ssl_irule_name \}"
}
set vs_name [tmsh::run_proc f5.app_utils:create_https_vs \
$tmsh::app_name $https_destination $snat $pool_name \
$profile_names $persist_profile $tcp_server_profile_name \
$tcp_client_profile_name]
if { $irule_names != $::EMPTY_STRING } {
tmsh_modify "/ ltm virtual" "$vs_name rules \{ $irule_names \}"
}
}
else {
set vs_name [tmsh::run_proc f5.app_utils:create_http_vs \
$tmsh::app_name $destination $snat $pool_name $profile_names \
$persist_profile $tcp_server_profile_name $tcp_client_profile_name]
if { $irule_names != $::EMPTY_STRING } {
tmsh_modify "/ ltm virtual" "$vs_name rules \{ $irule_names \}"
}
}
}
Please help
1 Reply
- Brent_Blood_768Historic F5 AccountThe error is indicating that the $::basic__port variable isn't defined and this corresponds to the "port" question in the "basic" section of the presentation. In the first few lines of the code you pasted, I see a variable named "destination" being created using that variable and then if SSL is in use it's being reassigned to use 443 as the port. If the presentation section is written such that the "port" question in the "basic" section isn't visible when SSL offload is enabled (and this is common in the iApps that ship with TMOS - two questions are used for the port, one for SSL and one without - and only one of them is shown at a time), then that variable won't be present when the implementation script runs, and that first line would cause the error that you are seeing.
There are a few ways that you can move past this, but the easiest would be to replace the first line with:
if { $::ssl_encryption_questions__offload_ssl ne $::YES_ANSWER } {
set destination $::basic__addr:$::basic__port
}
If you don't want the port to be configurable at all and just to use 80 or 443 depending upon whether SSL is in use or not, you could also just use:
set destination $::basic__addr:80
for the first line, and that should get past this as well - and you could also remove the question (if it's still there) corresponding to the port from the presentation section.
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com