Deploy local charm on lxd give ERROR POST Forbidden


I’ve built a slurm charm locally without problem and now I’m trying to deploy it on my local LXD controller.

erik@rd0059260:~/juju/juju-slurm-buildrepo$ juju deploy ./layer-slurm-controller/build/builds/slurm-controller --debug
13:51:32 INFO  juju.cmd supercommand.go:56 running juju [2.4.7 gc go1.10.4]
13:51:32 DEBUG juju.cmd supercommand.go:57   args: []string{"/snap/juju/6012/bin/juju", "deploy", "./layer-slurm-controller/build/builds/slurm-controller", "--debug"}
13:51:32 INFO  juju.juju api.go:67 connecting to API addresses: []
13:51:32 DEBUG juju.api apiclient.go:883 successfully dialed "wss://"
13:51:32 INFO  juju.api apiclient.go:603 connection established to "wss://"
13:51:32 DEBUG juju.cmd.juju.application deploy.go:1071 cannot interpret as local bundle: read ./layer-slurm-controller/build/builds/slurm-controller: is a directory
13:51:32 INFO  juju.cmd.juju.application series_selector.go:72 with the configured model default series "bionic"
13:51:32 DEBUG juju.charm charmdir.go:348 charm is not in revision control directory
13:51:32 DEBUG httpbakery client.go:243 client do POST {
13:51:32 DEBUG httpbakery client.go:245 } -> error [{/build/juju/parts/juju/go/src/ } {Post Forbidden}]
13:51:32 DEBUG juju.api monitor.go:35 RPC connection died
ERROR POST Post Forbidden
13:51:32 DEBUG cmd supercommand.go:459 error stack: 
Post Forbidden POST 

Deploying charms from charmstore works good.

erik@rd0059260:~/juju/juju-slurm-buildrepo$ juju deploy ubuntu
Located charm "cs:ubuntu-12".
Deploying charm "cs:ubuntu-12".

As you can see below.

erik@rd0059260:~/juju/juju-slurm-buildrepo$ juju status
Model    Controller           Cloud/Region         Version  SLA          Timestamp
default  localhost-localhost  localhost/localhost  2.4.7    unsupported  13:58:16+01:00

App     Version  Status  Scale  Charm   Store       Rev  OS      Notes
ubuntu  18.04    active      1  ubuntu  jujucharms   12  ubuntu  

Unit       Workload  Agent  Machine  Public address  Ports  Message
ubuntu/0*  active    idle   0         ready

Machine  State    DNS             Inst id        Series  AZ  Message
0        started  juju-58e136-0  bionic      Running

I’m not sure where to look for a resolution for this really. Anyone with experience in what goes in here that can help?

This is the software running:

erik@rd0059260:~/juju/juju-slurm-buildrepo$ snap list
Name               Version               Rev   Tracking  Publisher     Notes
charm              2.4.5+git-1-gd62c072  298   stable    johnsca       classic
core               16-2.36.2             6034  stable    canonical✓    core
core18             18                    512   stable    canonical✓    base
gimp               2.10.8                94    stable    snapcrafters  -
gtk-common-themes  0.1-4-g88bc1b2        818   stable    canonical✓    -
juju               2.4.7                 6012  stable    canonical✓    classic
lxd                3.8                   9795  stable    canonical✓    -
sublime-text       3176                  38    stable    snapcrafters  classic



This error is due to our corporate PROXY that intercepts the traffic from my client to the local addresses of my lxd.

I resolved this by:

export NO_PROXY=<ip.of.controller.api.endpoint>

Everything kicks in as it should.

Worth mentioning that the bootstrap config.yaml looks like this for my proxy environment.

erik@rd0059260:~$ cat config.yaml 

Then bootstraped like this.

juju bootstrap localhost --config=config.yaml


Yay, glad you figured it out because I had nooooo clue looking at the original post lol.


I totally understand that. The proxy challenges within the JUJU domain are significant and the amount of proxy scenarios out there are equally large.

We’ve been fighting proxy since day 0 here.