Juju unable to contact api server after 1 attempts: unable to connect to API: Forbidden

my server is behind a proxy.

i am trying to set up juju with openstack. it is using bionic image

this is the command i use to run

juju bootstrap --bootstrap-series=$OS_SERIES \

--metadata-source=~/simplestreams \

--model-default network=test \

--model-default external-network=external \

--model-default use-floating-ip=true \

--config use-default-secgroup=true \

--config apt-http-proxy=http://proxy.co.uk:3128 \

--config apt-ftp-proxy=ftp://proxy.co.uk:3128 \

--config apt-https-proxy=http://proxy.co.uk:3128 \

--config apt-no-proxy=localhost,127.0.0.0,127.0.1.1,127.0.1.1,local.home,10.255.52.101,10.255.52.102,10.255.35.156,10.20.20.0/24,192.168.122.0/24 \

--config juju-http-proxy=http://proxy.co.uk:3128 \

--config juju-ftp-proxy=ftp://proxy.co.uk:3128 \

--config juju-https-proxy=http://proxy.co.uk:3128 \

--config juju-no-proxy=localhost,127.0.0.0,127.0.1.1,127.0.1.1,local.home,10.255.52.101,10.255.52.102,10.255.35.156,10.20.20.0/24,192.168.122.0/24 \

--debug \

microstack microstack

error i get is

16:01:41 ERROR juju.cmd.juju.commands bootstrap.go:884 unable to contact api server after 1 attempts: unable to connect to API: Forbidden
16:01:41 DEBUG juju.cmd.juju.commands bootstrap.go:885 (error details: [{/build/snapcraft-juju-a284566302ade03f36071a6fe755224b/parts/juju/src/cmd/juju/common/controller.go:153: unable to contact api server after 1 attempts} {/build/snapcraft-juju-a284566302ade03f36071a6fe755224b/parts/juju/src/cmd/juju/common/controller.go:50: } {/build/snapcraft-juju-a284566302ade03f36071a6fe755224b/parts/juju/src/cmd/modelcmd/modelcommand.go:421: } {/build/snapcraft-juju-a284566302ade03f36071a6fe755224b/parts/juju/src/cmd/modelcmd/modelcommand.go:440: } {/build/snapcraft-juju-a284566302ade03f36071a6fe755224b/parts/juju/src/cmd/modelcmd/base.go:275: } {/build/snapcraft-juju-a284566302ade03f36071a6fe755224b/parts/juju/src/juju/api.go:83: } {/build/snapcraft-juju-a284566302ade03f36071a6fe755224b/parts/juju/src/api/apiclient.go:218: } {/build/snapcraft-juju-a284566302ade03f36071a6fe755224b/parts/juju/src/api/apiclient.go:686: } {/build/snapcraft-juju-a284566302ade03f36071a6fe755224b/parts/juju/src/api/apiclient.go:1028: } {/build/snapcraft-juju-a284566302ade03f36071a6fe755224b/parts/juju/src/api/apiclient.go:1132: unable to connect to API} {/build/snapcraft-juju-a284566302ade03f36071a6fe755224b/parts/juju/src/api/apiclient.go:1157: } {/build/snapcraft-juju-a284566302ade03f36071a6fe755224b/parts/juju/src/api/apiclient.go:737: } {Forbidden}])

Are you able to simply access the OpenStack using your novarc via the proxy?

I have resolved it. Local proxy issue