Forum Discussion
PermissionDenied without even trying
I've come across a strange situation with the powershell icontrol setup I have. I've written a script which (when working) will loop through our LTM estate gathering info and storing it in a DB. This process works fine against the first couple of LTM's I've pointed it at, but when I added another one yesterday I constantly get errors. I've taken my script out of the loop and am trying to connect interactively with still no success:
Initialize-F5-iControl : Could not initialize connection with supplied information
Line:1 char:23
Initialize-F5.iControl <<<< -HostName XX.XX.XX.XX -Username admin -Password XXXXX
CategoryInfo : PermissionDenied: (XX.XX.XX.XX:String) [Initialize-F5.iControl], Exception
FullyQualifiedErrorId: 2, icontrolSnapIn.CmdLet.Global.InitializeiiControl
I know the answer looks obvious, but apart from me knowing that I do actually have the correct credentials so it can't be a permissions problem, running a tcpdump on the LTM itself shows there is absolutely no traffic hitting it at all, so the snapin is failing without even trying to connect.
Does anybody know what this might be? I know that address that I've masked out would go via a set of proxies if I was to browse via IE(because of pac file), but my understanding of the icontrol thing is that you have to specifically ask it to proxy so I wouldn't expect it to be messing around with IE settings or anything.
Thanks in advance for any help
- Bevan_Thomson_9NimbostratusUpdate: Powershell/iControl is certainly using the browser proxy settings as I can see the traffic going to the proxies (the connection should really be direct). Now I just need to figure out how to stop it - as our browser is locked down and can't be changed.
- Bevan_Thomson_9NimbostratusLast Update:
I encountered the same thing.
Tried running as an administrator
Sample output:
Any help would be most appreciated.
Kind regards,
- ejhayes_26587Nimbostratus
Same issue--I logged into the server to run the same command and it keeps saying permission denied. I've hardcoded the whole command and it still fails.
Initialize-F5.iControl : Could not initialize connection with supplied informat ion At C:\projects\helpers\bigip.ps1:226 char:36 + $success = Initialize-F5.iControl <<<< -HostName $g_bigip -Username $g_uid -Password $g_pwd; + CategoryInfo : PermissionDenied: (x.x.x.x:String) [Initialize -F5.iControl], Exception + FullyQualifiedErrorId : 2,iControlSnapIn.CmdLet.Global.InitializeiContro l C:\projects\helpers\bigip.ps1 : ERROR: iControl subsystem not initialized At line:3 char:2 + . <<<< c:\projects\helpers\bigip.ps1 "x.x.x.x" "username" " password" "poolname" "x.x.x.x:z"} + CategoryInfo : NotSpecified: (:) [Write-Error], WriteErrorExcep tion + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorExceptio n,bigip.ps1
The Initialize-F5.iControl cmdlet requires three parameters. -Hostname, -Username, and -Password. If you are getting a permisssion denied error, then odds are you are not supplying valid credentials to login to the BIG-IP.
Are you able to authenticate to the web admin interface at https://${g_bigip} with the ${g_uid} and ${g_pwd} values as credentials? I would wager that if you did, you would get an autentication error as well as the two methods use the same login framework.
-Joe
- Hi there!
- Funny thing. I decided to add debug rows logging the progress of the script and now it's suddenly working.
- tinymontgomery_Nimbostratus
I disassembled the icontrolplugin and added some debugging code to figure this out. Unfortunately what I learned was that if any exception happens during this call it will always return a hard coded PermissionDenied error. I changed the code to return the actual exception encountered and in my case I actually had a root web.config issue related to my company's app that was preventing icontrol to load one of the core webrequest objects in .net. Once I could actually see the exception I was running into it took me less then 5 mins to fix. Lesson to the kids...never hard code an exception.
- Patrick_02_1416Nimbostratus
seems like there was no lessons learned for3 years. I'm facing currently the same issue. Web Login works without any problem. icontrol login does not work after some time with the same saved credentials, also renewing them does not work.
br, Patrick
F5 has stopped supporting community plugins now. I'm rewriting all my scripts to use REST api. Recommending you to do the same.
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