Using port 80 for airflow in AWS ECS - airflow

I am trying to deploy airflow webserver in ECS. I am using the default airflow docker container. I have tried to run the airflow webserver in port 80 by setting
AIRFLOW__WEBSERVER__WEB_SERVER_PORT = 80
However it provides an error gunicorn can't connect to port 80.
It works perfectly however if I use port 8080. Does airflow webserver use port 80 for something already?

Related

How to run Airflow Web Console on different port?

Today, I was trying to run the web console of airflow port other than 8080 like 80, 8090 but every time I was mentioning a different port in airflow.cfg and re-initialize the airflow and run airflow webserver -D
But every time the web console was running at port 8080 can anyone help or encountered this issue?
You need to change the port on airflow.cfg after you save the file, you shall run airflow db init and start airflow webserver again airflow webserver -D
If you are using docker image that will be different. You need change you docker-compose.yaml file

why nginx can not redirect request to port 80 on VPS?

I run 3 servers on VPS But nginx can not connect to server that run in port 80.
nginx can connect another port.
Does anyone know?
Nginx cannot connect to the 80 port if this port is using by another application like Apache, NodeJs ... to further info can you show your nginx error log from systemctl ?

Outbound telnet connection from Docker container refused but works fine on host

I'm facing a network issue on a node hosted via Tutum to AWS.
I sshed into the node and ran
telnet localhost 3000
and it works great. When I docker exec -it <containerid> bash into one of my containers and run the same command above and I get this error:
telnet: Unable to connect to remote host: Connection refused
Can anyone shed some light as to why outbound connections from container to host is not permitted?
What network stack are your containers using? localhost mean local. On your host it is the host-local-interface, your containers it is their own host-local-interface. So unless you run your containers with --net=host it is a regular behavior since there is no service running on containers-localhost-ip:3000 but only on host-localhost-ip:3000 which are different.

How do I connect a Docker container running in boot2docker to a network service running on another host?

I am using the latest version of boot2docker version 1.3.2, 495c19a on a windows 7 (SP1) 64 bit machine.
My docker container is running a celery process which attempts to connect to a rabbitMQ service running on the same machine that boot2docker is running on.
The Celery process running within the docker container cannot connect to RabbitMQ and reports the following :
[2014-12-02 10:28:41,141: ERROR/MainProcess] consumer: Cannot connect
to amqp:// guest:**#127.0.0.1:5672//: [Errno 111] Connection refused.
Trying again in 2.00 seconds...
I have reason to believe this is a network related issue, associated with routing from the container, to the VirtualBox host, and from the host to the RabbitMQ service running on the local machine; I do not know how to configure this and I was wondering if anyone can advise me how to proceed?
I tried setting up port 5672 in port forwarding but it didn't work (but I believe this is for incoming traffic to the VM, like boot2docker ssh).
I am running the container as docker run -i -t tagname
I am not specifying a host with -h when I run the container.
I'm sorry if this question appears rather clueless or if the answer appears obvious ... I appreciate any help!
Some additional information :
The routing table of the host VM is what boot2docker configured during installation as follows :
docker0 IP Address is 172.17.42.1
eth0 IP Address is 10.0.2.15
eth1 IP Address is 192.168.59.103
eth0 is attached to NAT (Adapter 1) in the VirtualBox VM network configuration.
Adapter 1 has port forwarding setup for ssh; default setting of host IP 127.0.0.1, host port 2022, guest port 22.
eth1 is attached to Host-only adapter (Adapter 2).
Both adapters are set to promiscuous mode (allow all).
The IP Address of the docker container is 172.17.0.33.
[2014-12-02 10:28:41,141: ERROR/MainProcess] consumer: Cannot connect to amqp:// guest:**#127.0.0.1:5672//: [Errno 111] Connection refused. Trying again in 2.00 seconds...
127.0.0.1 is a special IP address that means "me", and inside the container it means "me the container", so this is why it is not connecting to the outer host. So the first thing to do is change the IP address where you are trying to connect to Rabbit to that of the outer host where it is running.
Then you probably have to do something about routing, but let's take one step at a time.
as your RabbitMQ server is running on your Windows host, you need to tell your container that it should talk to that IP - which would probably be 192.168.59.3
most importantly, your container's 127.0.0.1 is only a loopback device to that container's services - not even the boot2docker vm's ports.
You could set up an ambassador container that has --expose=80 and uses something like socat to forward all traffic from that container to your host (see svendowideit/ambassador). Then you'd --link that ambassador container to your current image
but personally, I'd avoid that initially, and just configure your containerised app to talk to the real host's IP
You have to specifc explicitely ports for port redirection separately for boot2docker and docker.
Please try this:
c:\>boot2docker init
c:\>boot2docker up
c:\>boot2docker ssh -L 0.0.0.0:5672:localhost:5672
docker#boot2docker:~$ docker run -it -p 5672:5672 tagname

Vagrant forward port 8080 to 80

So I have a NGINX server listening on port 8080 with uwsgi on Vagrant box. The config.vm.forward_port 8080, 80 is not working for me. I know that it's recommended to forward on ports higher than 2000, but I need the 80. Is there any issue for that?
I'm using vagrant for development, but I need to make some tests from outside using my domain name on port 80.
Thanks for your help.
When trying to forward ports to less than 1025 vagrant gives me following message which you might have missed:
You are trying to forward to privileged ports (ports <= 1024). Most
operating systems restrict this to only privileged process (typically
processes running as an administrative user). This is a warning in case
the port forwarding doesn't work. If any problems occur, please try a
port higher than 1024.
I was using port forwarding to same port with following configuration:
config.vm.forward_port 80, 80
And then run vagrant up, but when trying curl localhost, it wasn't able to connect to host. But when running vagrant as sudo user sudo vagrant up, then I was able to access the port from my host.
is port 80 available i.e. if you run netstat -an | grep 80, does it show in the list as already being used by another process? Is uwsgi added to the module list of nginx (and did you run make/make install on it)? Have you tried checking if you need to use higher privilenges (perhaps try running as sudo).

Resources