Juju boostrap conection refused


trying to boostrap a manual cloud I’m getting this error:

Creating Juju controller “idtolu-controller” on idtolu-cloud/default
Looking for packaged Juju agent version 2.8.8 for amd64
Installing Juju agent on bootstrap instance
Fetching Juju Dashboard 0.3.0
Running machine configuration script…
Bootstrap agent now started
Contacting Juju controller at to verify accessibility…
ERROR unable to contact api server after 61 attempts: unable to connect to API: dial tcp connect: connection refused

It seems is a proxy issue but I don’t know how to solve it, when I create the cloud using username@localhost is working ok. but i can’t add a new machine.

any help is very appreciated.

Hello @juanoterocas. Thank you for the question!

Without knowing the details of the networking environment, it’s a little hard to troubleshoot this. What is happening is the following:

  1. The Juju client, which is running on either a jumpbox you’ve setup or your personal computer, is attempting to connect to the juju controller running on the manual machine at, on port 17070

  2. It gets a connection refused, which means …

Either a) your computer/jumpbox is being firewalled off from talking to port 17070 on the manual machine, or b) the controller isn’t actually listening on that port.

If a), you need to troubleshoot your network. If b), you’d need to take a look at the logs on the machine at to see if there are specific error messages about what is breaking.

Hi thanks Pete.

this is my netplan:

version: 2
renderer: NetworkManager
dhcp4: no
dhcp4: no
dhcp4: no
dhcp4: no
interfaces: [eno5, eno6, eno7, eno8]
addresses: [ ]

When you refer to logs for troubleshooting, you mean system logs, or is there any log archive to check?

I have installed OSM charmed and they are able to expose 17070 at firewall is disabled at the moment.

I have installed juju and setup the same cloud and controller from scratch in a new ubuntu So in virtual machine without no issues, perhaps I need to reinstall ubuntu at


Hmmm … nothing jumps out as wrong to me in your netplan.

I’d take a look at the system logs on the manual machine. There are also possibly logs in /var/log/juju, but I have a feeling that the error will show up in the syslog.

It seemed 17070 port was closed, I made some modifications in IPTABLES since ufw was disabled.

So its working now, but I’m having some issues with addding new machines, previous machine were added and now I have created whole cloud from scratch and I can’t re-add those machines.
So /sbin/remove-juju-services command is destroying every thing even the current controller. how I can re add machines already exist?. keep in mind that juju mahchines command is showing empty list.


never mind , I realized that /sbin/remove-juju-services must be executed at every machine previously added not on the controller machine.

@juanoterocas that is correct. I’m glad that you figured things out! (I spent the long weekend in the States being very much away from my keyboard, so I didn’t see your follow-up question until now.)

Thanks Pete, now I’m struggling on installing OpenStack base charm on manual cloud, wish me luck hahaha.

1 Like