Oc-id service custom port


#1

Hi All,
Default port on which oc-id service is running is 9090.
is there any way to change this port to some other port via configuration?

i found the changes in config (chef-server.rb) file for below services but not able to find for oc-id
erchef[‘port’] = 8000
nginx[‘ssl_port’] = 443

Thanks in advance.


#2

That port is internal. nginx is reverse proxying oc-id (in the same way it does for erchef and the rest).

It’s possible to change it in a similar way to the other services (see here), but I’m not sure I understand why anyone would want this :wink:

So…what are you trying to do?

Cheers
Stephan


#3

Thanks Stephan for your response.
the generic ports in my organization has been reserved such as 9090. and same can not be used for applications other than those for which it is reserved.

will there be any issue if we change it from 9090 to some other port.


#4

will there be any issue if we change it from 9090 to some other port.

It should just work, but there’s no way to tell without trying. (“The proof of the pudding is in the eating.”) Please file an issue if it doesn’t work.

To try it, you would add this to your chef-server.rb:

oc_id['port'] = 19090 # whatever you can use

You should then find, after chef-server-ctl reconfigure, that it uses a different port:

# netstat -lnp | grep :19090
tcp        0      0 127.0.0.1:19090         0.0.0.0:*               LISTEN      7868/rails master -

and that chef-server’s nginx knows about that, too:

# grep -R 19090 /var/opt/opscode/nginx/etc/
/var/opt/opscode/nginx/etc/addon.d/40-oc_id_upstreams.conf:    server 127.0.0.1:19090;

#5

Thanks a lot Stephan.
You helped me right when I needed help most.