I have an environment where I wanted to add new unit but I'm getting 401 errors:
$ juju add-unit --debug myservice
11:19:12 INFO juju.cmd supercommand.go:63 running juju [2.2.6 gc go1.8]
11:19:12 DEBUG juju.cmd supercommand.go:64 args: []string{"juju", "add-unit", "--debug", "myservice"}
11:19:12 INFO juju.juju api.go:67 connecting to API addresses: [1.2.3.4:17070 192.168.16.4:17070]
11:19:13 DEBUG juju.api apiclient.go:863 successfully dialed "wss://1.2.3.4:17070/model/<uuid>/api"
11:19:13 INFO juju.api apiclient.go:617 connection established to "wss://1.2.3.4:17070/model/<uuid>/api"
11:19:14 DEBUG juju.api monitor.go:35 RPC connection died
ERROR cannot add unit 1/1 to application "myservice": cannot add unit to application "myservice": getting instance types: listing VM sizes: autorest#WithErrorUnlessStatusCode: POST https://login.windows.net/<uuid2>/oauth2/token?api-version=1.0 failed with 401 Unauthorized: StatusCode=401
11:19:14 DEBUG cmd supercommand.go:459 error stack:
cannot add unit 1/1 to application "myservice": cannot add unit to application "myservice": getting instance types: listing VM sizes: autorest#WithErrorUnlessStatusCode: POST https://login.windows.net/<uuid2>/oauth2/token?api-version=1.0 failed with 401 Unauthorized: StatusCode=401
github.com/juju/juju/rpc/client.go:149:
github.com/juju/juju/api/apiclient.go:944:
I rerun "juju add-credential azure" in controller and workload models but that did nto help.
I also wanted to upgrade juju since I'm not on the lasest version but that's also blocked bu the same problem:
$ juju upgrade-juju
no prepackaged tools available, using local agent binary 2.2.6.1
CRITICAL ********** SetModelAgentVersion: 2.2.6.1 false
ERROR cannot make API call to provider: autorest#WithErrorUnlessStatusCode: POST https://login.windows.net/<uuid>/oauth2/token?api-version=1.0 failed with 401 Unauthorized: StatusCode=401
My juju CLI version is 2.2.6-trusty-amd64 and the controller model is on 2.2.3
I have an environment where I wanted to add new unit but I'm getting 401 errors:
$ juju add-unit --debug myservice 1.2.3.4: 17070/model/ <uuid>/ api" 1.2.3.4: 17070/model/ <uuid>/ api" WithErrorUnless StatusCode: POST https:/ /login. windows. net/<uuid2> /oauth2/ token?api- version= 1.0 failed with 401 Unauthorized: StatusCode=401 WithErrorUnless StatusCode: POST https:/ /login. windows. net/<uuid2> /oauth2/ token?api- version= 1.0 failed with 401 Unauthorized: StatusCode=401 com/juju/ juju/rpc/ client. go:149: com/juju/ juju/api/ apiclient. go:944:
11:19:12 INFO juju.cmd supercommand.go:63 running juju [2.2.6 gc go1.8]
11:19:12 DEBUG juju.cmd supercommand.go:64 args: []string{"juju", "add-unit", "--debug", "myservice"}
11:19:12 INFO juju.juju api.go:67 connecting to API addresses: [1.2.3.4:17070 192.168.16.4:17070]
11:19:13 DEBUG juju.api apiclient.go:863 successfully dialed "wss://
11:19:13 INFO juju.api apiclient.go:617 connection established to "wss://
11:19:14 DEBUG juju.api monitor.go:35 RPC connection died
ERROR cannot add unit 1/1 to application "myservice": cannot add unit to application "myservice": getting instance types: listing VM sizes: autorest#
11:19:14 DEBUG cmd supercommand.go:459 error stack:
cannot add unit 1/1 to application "myservice": cannot add unit to application "myservice": getting instance types: listing VM sizes: autorest#
github.
github.
I rerun "juju add-credential azure" in controller and workload models but that did nto help.
I also wanted to upgrade juju since I'm not on the lasest version but that's also blocked bu the same problem:
$ juju upgrade-juju rsion: 2.2.6.1 false WithErrorUnless StatusCode: POST https:/ /login. windows. net/<uuid>/ oauth2/ token?api- version= 1.0 failed with 401 Unauthorized: StatusCode=401
no prepackaged tools available, using local agent binary 2.2.6.1
CRITICAL ********** SetModelAgentVe
ERROR cannot make API call to provider: autorest#
My juju CLI version is 2.2.6-trusty-amd64 and the controller model is on 2.2.3