Re: Reg executing sudo commands in DEA vm


Nithiyasri Gnanasekaran -X (ngnanase - TECH MAHINDRA LIM@Cisco) <ngnanase at cisco.com...>
 

Hi
Now I understand the use of the PORT env in the warden. I am using the same for nginx whichis offered by CF.

But what port should I specify for gunicorn running in the same app... CF offers only one port /app. Can I use any unused port listed by netstat –lntl for gunicorn.


Regards
Nithiaysri



From: Nithiyasri Gnanasekaran -X (ngnanase - TECH MAHINDRA LIM at Cisco)
Sent: Saturday, June 11, 2016 12:15 AM
To: 'Eric Malm' <emalm(a)pivotal.io>
Cc: 'Discussions about Cloud Foundry projects and the system overall.' <cf-dev(a)lists.cloudfoundry.org>
Subject: RE: [cf-dev] Re: Reg executing sudo commands in DEA vm

Hi

I have started nginx in 8010 and gunicorn in 8000.
Though the processes are running in ps –ef cmd, curl to localhost:8000 & 8010 are connection refusing..

Even the ports used by the DEA vm doesn’t show 8000 & 8010

I selected 8010, as it is not listed in netstat –lntl command. Does this method apply to DEA vm?
Is there any specific way to find out the port number offered by CF to DEA , as you had mentioned in the below mail..

From: Nithiyasri Gnanasekaran -X (ngnanase - TECH MAHINDRA LIM at Cisco)
Sent: Friday, June 10, 2016 12:39 AM
To: 'Eric Malm' <emalm(a)pivotal.io<mailto:emalm(a)pivotal.io>>
Cc: 'Discussions about Cloud Foundry projects and the system overall.' <cf-dev(a)lists.cloudfoundry.org<mailto:cf-dev(a)lists.cloudfoundry.org>>
Subject: RE: [cf-dev] Re: Reg executing sudo commands in DEA vm

It worked!

We are not using PORT env variable..We have directly hardcoded only the port number.
I thought the permission issue is due to non-nginx user and it dint strike me its below 1024

Thanks Much!!!

Regards
Nithiyasri

From: Eric Malm [mailto:emalm(a)pivotal.io]
Sent: Friday, June 10, 2016 12:00 AM
To: Nithiyasri Gnanasekaran -X (ngnanase - TECH MAHINDRA LIM at Cisco) <ngnanase(a)cisco.com<mailto:ngnanase(a)cisco.com>>; cf-dev <cf-dev(a)lists.cloudfoundry.org<mailto:cf-dev(a)lists.cloudfoundry.org>>
Subject: Re: [cf-dev] Re: Reg executing sudo commands in DEA vm

On Thu, Jun 9, 2016 at 11:23 AM, Nithiyasri Gnanasekaran -X (ngnanase - TECH MAHINDRA LIM at Cisco) <ngnanase(a)cisco.com<mailto:ngnanase(a)cisco.com>> wrote:
Hi Eric

The error is “Permission Denied” on the port..
As you told, I tried with port 90.. Again the same error Permission Denied..

I didn't tell you to use port 90. I said to use whatever CF provides to your process in the PORT environment variable. The process isn't running as root, so it won't be able to bind any port below 1024.


From: Eric Malm [mailto:emalm(a)pivotal.io<mailto:emalm(a)pivotal.io>]
Sent: Thursday, June 09, 2016 10:59 PM
To: Nithiyasri Gnanasekaran -X (ngnanase - TECH MAHINDRA LIM at Cisco) <ngnanase(a)cisco.com<mailto:ngnanase(a)cisco.com>>
Cc: Discussions about Cloud Foundry projects and the system overall. <cf-dev(a)lists.cloudfoundry.org<mailto:cf-dev(a)lists.cloudfoundry.org>>; Jayarajan Ramapurath Kozhummal (jayark) <jayark(a)cisco.com<mailto:jayark(a)cisco.com>>

Subject: Re: [cf-dev] Re: Reg executing sudo commands in DEA vm

Hi, Nithiyasri,

As Amit already mentioned on another thread, you need to make sure nginx is binding to the port conveyed in the PORT environment variable. It will not be able to bind port 80 because it's not running as root. This seems to be how the PHP buildpack accomplishes that for its nginx config: https://github.com/cloudfoundry/php-buildpack/blob/d9b1f27af8d5083401f0ac5e81f9578fc19b619f/defaults/config/nginx/server-defaults.conf#L2

Best,
Eric

Join cf-dev@lists.cloudfoundry.org to automatically receive all group messages.