View UI interface generated by Apache Airflow webserver running on virtual machine
Asked Answered
T

2

11

I know that when you run airflow webserver via your home terminal, you can view the UI interface by going to http://localhost:8080. I am able to do this.

However, I have a virtual Amazon Lightsail instance which I ssh into. I then jump into a virtual environment from there to run the airflow webserver command. This executes successfully, however I cannot thereafter access the UI interface. I've tried entering the following addresses into my browser:

  1. [ip address]:8080
  2. [ip address]
  3. [ip address]:80

And a multitude of others. Any idea how I go about accessing the UI interface?

Tersina answered 12/5, 2017 at 19:53 Comment(0)
D
8

On an instance in AWS by default all external ports are closed and only port 22 is open (used for ssh), also there may be option to easily click Allow Http and Https which would open port 80 and 443 but since airflow webserver runs on port 8080 by default you would have to go in network setting of your instance and open port on which your airflow webserver is running.

This is actually really easy:

Go to the "Network & Security" -> Security Group settings in the left hand navigation

  • Find the Security Group that your instance is apart of
  • Click on Inbound Rules
  • You have to choose "Custom TCP rule" in the dropdown.
  • Type the port (8080) in "port range"
  • Click Apply(add rule) and enjoy

enter image description here

you can specify the port you opened while running the airflow command.

airflow webserver -p 8080
Diaphaneity answered 13/5, 2017 at 9:7 Comment(3)
YES! It worked, thanks dude! (found the port settings in the "Networking" tab under Firewall)Tersina
Hi, Can You elaborate a little more? Is the Process different for Azure Ubuntu Instance? How Do You Access the UI on the local machine once the airflow command runs on the instance?Formant
@PadegalSaigiriraj using the public ip of the instance and port of your airflow webserver eg . if ip is 192.168.1.1 and port is 8080 visit 192.168.1.1:8080 in browser , also make sure to enable above firewall rules for that to workDiaphaneity
C
1

IF someone is interested, it is really similar on Azure:

-in the portal go to your azure-VM
-under "Settings" select "Networking"
-go to "inbound port rules"
-click "add inbound rule"
-give a name to the rule (e.g.like in picture -> "airflow")
-select TCP as protocol-type
-type 8080 for "Destination port ranges"
enter image description here After saving, go to your browser, type the ip-address-of-your-vm:8080 and authenticate with your predefined user/pw or with the default "airflow"/"airflow" if you did not change those.

You will find the public ip-address of your vm in the "Overview"-section of your azure-VM or type

curl ifconfig.me 

if you are currently working on the azure-VM

Counterchange answered 17/7, 2023 at 9:31 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.