On Mon, Oct 23, 2017 at 4:20 AM Akshat Jiwan Sharma <[email protected]>
wrote:

> HI,
>
> I'm trying to manually expose a port on a juju machine. According to this
> answer
> <https://askubuntu.com/questions/808176/how-to-manually-open-a-port-in-juju>
> I should be able to do something like this:-
>
>  juju run  "open-port 443" --all
>
> However when I type this in my shell it throws an error
>
> open-port: command not found
>

The different between the command you're running, and the one on AskUbuntu,
is that you're not passing --unit. When you pass --unit, it runs the
command in the context of a unit on the machine. You must be running in the
context of a unit to use "hook tools", such as open-port.

I can verify that the application on this particular controller is already
> exposed and it thus satisfies the requirement for running this command.
>
> >"The port range will only be open while the application is exposed."
>
> Can you help me understand what I'm doing wrong?
>

Ports are managed on a per-unit basis, so you need to execute the "run"
command against a unit or application, using --unit or --application
respectively.

Once you've run open-port, you'll need to run "juju expose <application>"
for the ports to actually be opened up.

Thanks,
> Akshat
> --
> Juju mailing list
> [email protected]
> Modify settings or unsubscribe at:
> https://lists.ubuntu.com/mailman/listinfo/juju
>
-- 
Juju mailing list
[email protected]
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/juju

Reply via email to