# Cannot change listener port to port 80

**URL:** <https://community.learningequality.org/t/cannot-change-listener-port-to-port-80/1631>\
**Category:** Kolibri\
**Tags:** installation\
**Created:** [July 28, 2020, 1:32pm UTC](https://community.learningequality.org/t/cannot-change-listener-port-to-port-80/1631 "2020-07-28T13:32:47Z")\
**Posts on this page:** 19\
**Page:** 1

<div class="post-metadata">

**Author:** ![Patrick\_Raths](https://yyz1.discourse-cdn.com/flex035/user_avatar/community.learningequality.org/patrick_raths/32/650_2.png) [@Patrick\_Raths](https://community.learningequality.org/u/Patrick_Raths)\
**Post date:** [July 28, 2020, 1:32pm UTC](https://community.learningequality.org/t/cannot-change-listener-port-to-port-80/1631/1 "2020-07-28T13:32:47Z")

</div>

I tried to change the listener port to port 80 for Kolibri using the instructions find online here, i.e. by changing the daemon.conf file.

However, when trying to start Kolibri after the change it fails with an error message that the socket cannot be created. permission denied.

I am using Ubuntu 20.04.

Any thoughts what could cause this?

---

<div class="post-metadata">

**Author:** ![devon](https://yyz1.discourse-cdn.com/flex035/user_avatar/community.learningequality.org/devon/32/481_2.png) [@devon](https://community.learningequality.org/u/devon)\
**Post date:** [July 28, 2020, 3:16pm UTC](https://community.learningequality.org/t/cannot-change-listener-port-to-port-80/1631/2 "2020-07-28T15:16:54Z")

</div>

Hi @Patrick_Raths

> using the instructions find online here, i.e. by changing the daemon.conf file

which instructions are you referring to?

> it fails with an error message that the socket cannot be created. permission denied

Ubuntu needs root permission to run anything on port 80. One option is to install the `kolibri-server` package as described here:

[https://kolibri.readthedocs.io/en/latest/install/ubuntu-debian.html#higher-performance-with-the-kolibri-server-package](https://kolibri.readthedocs.io/en/latest/install/ubuntu-debian.html#higher-performance-with-the-kolibri-server-package)

This will give you the option of configuring nginx to expose Kolibri on port 80.

---

<div class="post-metadata">

**Author:** ![Patrick\_Raths](https://yyz1.discourse-cdn.com/flex035/user_avatar/community.learningequality.org/patrick_raths/32/650_2.png) [@Patrick\_Raths](https://community.learningequality.org/u/Patrick_Raths)\
**Post date:** [July 30, 2020, 2:32am UTC](https://community.learningequality.org/t/cannot-change-listener-port-to-port-80/1631/3 "2020-07-30T02:32:08Z")

</div>

Thank you. It was a post in a forum to change the HTTP Listener port in the daemon.conf file. But your explanation regarding root permission makes sense.

I tried to install the Kolibri-server following the instruction you provided but on the last step I get the following:

Reading package lists… Done  
Building dependency tree  
Reading state information… Done  
E: Unable to locate package kolibri-server

Appreciate your help in resolving this final step in downloading kolibri-server

Here is some additional information on my installation:  
Distributor ID: Ubuntu  
Description: Ubuntu 20.04.1 LTS  
Release: 20.04  
Codename: focal

Thanks

---

<div class="post-metadata">

**Author:** ![jredrejo](https://yyz1.discourse-cdn.com/flex035/user_avatar/community.learningequality.org/jredrejo/32/561_2.png) [@jredrejo](https://community.learningequality.org/u/jredrejo)\
**Post date:** [July 30, 2020, 3:10pm UTC](https://community.learningequality.org/t/cannot-change-listener-port-to-port-80/1631/5 "2020-07-30T15:10:19Z")

</div>

Hello @Patrick_Raths ,  
As Devon mentioned, in any Linux OS you need special permission to use ports under 1024 (they are called [privileged or system ports](https://en.wikipedia.org/wiki/List_of_TCP_and_UDP_port_numbers#Well-known_ports) ) . If you run Kolibri as a normal user you won’t be able to use ports below 1024. If you use a port like 8000 or whatever is above 1024 you won’t have problems.

Using `kolibri-server` will make `kolibri` be run by the system with special permissions, so it can use port 80. However, there’s not a version of this package for Ubuntu 20.04 yet. It should be available in the following days. Please, if you still can’t use it next week, don’t hesitate in remind it here.

Thanks  
José

---

<div class="post-metadata">

**Author:** ![Patrick\_Raths](https://yyz1.discourse-cdn.com/flex035/user_avatar/community.learningequality.org/patrick_raths/32/650_2.png) [@Patrick\_Raths](https://community.learningequality.org/u/Patrick_Raths)\
**Post date:** [July 30, 2020, 3:26pm UTC](https://community.learningequality.org/t/cannot-change-listener-port-to-port-80/1631/6 "2020-07-30T15:26:51Z")

</div>

Thanks José. Well noted. I currently have Kolibri running on port 8080 and it works fine. I have been trying to install the kolibri-server on by Ubuntu 20.04. LTS but for some reason when I try to install the package I get an error message that the package is not available (see my reply to Devon for that)

---

<div class="post-metadata">

**Author:** ![jredrejo](https://yyz1.discourse-cdn.com/flex035/user_avatar/community.learningequality.org/jredrejo/32/561_2.png) [@jredrejo](https://community.learningequality.org/u/jredrejo)\
**Post date:** [July 30, 2020, 4:22pm UTC](https://community.learningequality.org/t/cannot-change-listener-port-to-port-80/1631/7 "2020-07-30T16:22:26Z")

</div>

Yes, as I said before,` kolibri-server` was not available for Ubuntu 20.04 (yet). It’s for the previous versions of Ubuntu.  
Now it has been added to this Ubuntu version. If you check it in a few hours (or minutes, depending on Ubuntu capacity at this time) you’ll be able to install it in 20.04 following the instructions Devon provided.

---

<div class="post-metadata">

**Author:** ![Patrick\_Raths](https://yyz1.discourse-cdn.com/flex035/user_avatar/community.learningequality.org/patrick_raths/32/650_2.png) [@Patrick\_Raths](https://community.learningequality.org/u/Patrick_Raths)\
**Post date:** [July 31, 2020, 1:13pm UTC](https://community.learningequality.org/t/cannot-change-listener-port-to-port-80/1631/8 "2020-07-31T13:13:14Z")

</div>

Thank for that. I was able to download and install the kolibri-server (using port 80) now but it seems that I hit another snag… When I attempt to connect to the server I get the Welcome to nginx! page but I don’t seem to be able to connect to Kolibri.

Looking at the deamon.txt log file in /var/kolibri/.kolibri/logs it appears that the server has started correctly:  
INFO Starting Kolibri 0.13.3  
INFO ENGINE Listening for SIGTERM.  
INFO ENGINE Listening for SIGHUP.  
INFO ENGINE Listening for SIGUSR1.  
INFO ENGINE Listening for SIGINT.  
INFO ENGINE Bus STARTING  
INFO Started new JOBCHECKER thread ID#74bde378d3b148c78d5057f340a1353c  
INFO Started new JOBCHECKER thread ID#331e2242506c4fd2827a675a7b03b1a3  
INFO Started new SCHEDULECHECKER thread ID#7754a8cf7aa74bba80264a2b11c746b1  
INFO Registering ourselves to zeroconf network with id ‘e0439048e056f8888f47d10c8c91faaa’…  
INFO ENGINE Bus STARTED  
INFO Ping succeeded! (response: {‘id’: 944527, ‘messages’: []})

Likewise the kolibri.txt log file indicates the following:  
INFO 2020-07-31 09:10:17,247 apps Running Kolibri with the following settings: kolibri.deployment.default.settings.base  
INFO 2020-07-31 09:10:19,131 cli Running Kolibri as background process  
INFO 2020-07-31 09:10:19,131 cli Starting Kolibri background workers  
INFO 2020-07-31 09:10:19,132 cli Going to background mode, logging to /var/kolibri/.kolibri/logs/kolibri.txt  
INFO 2020-07-31 09:10:19,141 server Starting Kolibri 0.13.3  
INFO 2020-07-31 09:10:19,145 cherrypy.error ENGINE Listening for SIGTERM.  
INFO 2020-07-31 09:10:19,146 cherrypy.error ENGINE Listening for SIGHUP.  
INFO 2020-07-31 09:10:19,147 cherrypy.error ENGINE Listening for SIGUSR1.  
INFO 2020-07-31 09:10:19,147 cherrypy.error ENGINE Listening for SIGINT.  
INFO 2020-07-31 09:10:19,147 cherrypy.error ENGINE Bus STARTING  
INFO 2020-07-31 09:10:21,717 utils Started new JOBCHECKER thread ID#74bde378d3b148c78d5057f340a1353c  
INFO 2020-07-31 09:10:21,724 utils Started new JOBCHECKER thread ID#331e2242506c4fd2827a675a7b03b1a3  
INFO 2020-07-31 09:10:21,727 utils Started new SCHEDULECHECKER thread ID#7754a8cf7aa74bba80264a2b11c746b1  
INFO 2020-07-31 09:10:22,075 search Registering ourselves to zeroconf network with id ‘e0439048e056f8888f47d10c8c91faaa’…  
INFO 2020-07-31 09:10:22,974 cherrypy.error ENGINE Bus STARTED  
INFO 2020-07-31 09:10:26,881 utils Ping succeeded! (response: {‘id’: 944527, ‘messages’: []})

Sorry, I am new to this so I appreciate any assistance you may be able to give.

Patrick

---

<div class="post-metadata">

**Author:** ![jredrejo](https://yyz1.discourse-cdn.com/flex035/user_avatar/community.learningequality.org/jredrejo/32/561_2.png) [@jredrejo](https://community.learningequality.org/u/jredrejo)\
**Post date:** [July 31, 2020, 3:31pm UTC](https://community.learningequality.org/t/cannot-change-listener-port-to-port-80/1631/9 "2020-07-31T15:31:07Z")

</div>

Hello @Patrick_Raths , I don’t see any problem in the logs you provided. It should be somewhere else.  
Before doing anything else, you can do the usual computing trick: restart your server, or at least, restart kolibri and kolibri-server: `sudo systemctl restart kolibri` and `sudo systemctl restart kolibri-server` . Sometimes the problem is due to conflicts between the version of kolibri that was running prior to installing the new package

If the problem persist, please, could you attach the output of executing:  
`sudo systemctl status kolibri-server`  
and the file` /var/kolibri/.kolibri/uwsgi.log`

---

<div class="post-metadata">

**Author:** ![Patrick\_Raths](https://yyz1.discourse-cdn.com/flex035/user_avatar/community.learningequality.org/patrick_raths/32/650_2.png) [@Patrick\_Raths](https://community.learningequality.org/u/Patrick_Raths)\
**Post date:** [August 6, 2020, 6:10am UTC](https://community.learningequality.org/t/cannot-change-listener-port-to-port-80/1631/11 "2020-08-06T06:10:27Z")

</div>

Thanks. I perform the reboot but the situation is still the same; even rebooted the whole server…

Here is the requested information:  
Aug 01 10:29:46 amcebab02vs systemd[1]: Starting A high performance web server setup for Kolibri…  
Aug 01 10:29:46 amcebab02vs su[3153]: (to kolibri) root on none  
Aug 01 10:29:46 amcebab02vs su[3153]: pam\_unix(su:session): session opened for user kolibri by (uid=0)  
Aug 01 10:30:10 amcebab02vs kolibri-server[3238]: start-stop-daemon: matching on world-writable pidfile /var/run/koli\>  
Aug 01 10:30:16 amcebab02vs kolibri-server[3282]: start-stop-daemon: matching on world-writable pidfile /var/run/koli\>  
Aug 01 10:30:16 amcebab02vs systemd[1]: kolibri-server.service: Succeeded.  
Aug 01 10:30:16 amcebab02vs systemd[1]: Started A high performance web server setup for Kolibri.

And the requested log file:  
\*\*\* Starting uWSGI 2.0.18-debian (64bit) on [Fri Jul 31 07:27:17 2020] \*\*\*  
compiled with version: 10.0.1 20200405 (experimental) [master revision 0be9efad938:fcb98e4978a:705510a708d3642c9c962beb663c476167e4e8a4] on 11 April 2020 11:15:55  
os: Linux-5.4.0-42-generic #46-Ubuntu SMP Fri Jul 10 00:24:02 UTC 2020  
nodename: amcebab02vs  
machine: x86\_64  
clock source: unix  
pcre jit disabled  
detected number of CPU cores: 2  
current working directory: /  
writing pidfile to /var/run/kolibri-server/uwsgi.pid  
detected binary path: /usr/bin/uwsgi-core  
setgid() to 33  
setuid() to 112  
chdir() to /usr/lib/python3/dist-packages/  
your processes number limit is 7601  
limiting address space of processes…  
your process address space limit is 1073741824 bytes (1024 MB)  
your memory page size is 4096 bytes  
\*\*\* WARNING: you have enabled harakiri without post buffering. Slow upload could be rejected on post-unbuffered webservers \*\*\*  
detected max file descriptor number: 1024  
lock engine: pthread robust mutexes  
thunder lock: disabled (you can enable it with --thunder-lock)  
uwsgi socket 0 bound to UNIX address /tmp/kolibri\_uwsgi.sock fd 3  
Python version: 3.8.2 (default, Jul 16 2020, 14:00:26) [GCC 9.3.0]  
Python main interpreter initialized at 0x5598249f4500  
python threads support enabled  
your server socket listen backlog is limited to 100 connections  
your mercy for graceful operations on workers is 60 seconds  
mapped 1309272 bytes (1278 KB) for 16 cores  
\*\*\* Operational MODE: preforking \*\*\*  
added /usr/lib/python3/dist-packages/kolibri/dist/ to pythonpath.  
WARNING:root:No C Extensions available for this platform.

INFO Running Kolibri with the following settings: kolibri.deployment.default.settings.base  
WSGI app 0 (mountpoint=’’) ready in 17 seconds on interpreter 0x5598249f4500 pid: 10625 (default app)  
\*\*\* uWSGI is running in multiple interpreter mode \*\*\*  
spawned uWSGI master process (pid: 10625)  
spawned uWSGI worker 1 (pid: 10638, cores: 1)  
spawned uWSGI worker 2 (pid: 10639, cores: 1)  
spawned uWSGI worker 3 (pid: 10640, cores: 1)  
unable to find requested cheaper algorithm, falling back to spare  
mapping worker 2 to CPUs: 1  
mapping worker 1 to CPUs: 0  
mapping worker 3 to CPUs: 0  
worker 1 killed successfully (pid: 10638)  
uWSGI worker 1 cheaped.  
…brutally killing workers…  
worker 2 buried after 1 seconds  
worker 3 buried after 2 seconds  
binary reloading uWSGI…  
chdir() to /  
closing all non-uwsgi socket fds \> 2 (max\_fd = 1024)…  
found fd 3 mapped to socket 0 (/tmp/kolibri\_uwsgi.sock)  
running /usr/bin/uwsgi-core  
[uWSGI] getting INI configuration from /etc/kolibri/dist/uwsgi.ini  
\*\*\* Starting uWSGI 2.0.18-debian (64bit) on [Fri Jul 31 07:28:37 2020] \*\*\*  
compiled with version: 10.0.1 20200405 (experimental) [master revision 0be9efad938:fcb98e4978a:705510a708d3642c9c962beb663c476167e4e8a4] on 11 April 2020 11:15:55  
os: Linux-5.4.0-42-generic #46-Ubuntu SMP Fri Jul 10 00:24:02 UTC 2020  
nodename: amcebab02vs  
machine: x86\_64  
clock source: unix  
pcre jit disabled  
detected number of CPU cores: 2  
current working directory: /  
detected binary path: /usr/bin/uwsgi-core  
chdir() to /usr/lib/python3/dist-packages/  
your processes number limit is 7601  
limiting address space of processes…  
your process address space limit is 1073741824 bytes (1024 MB)  
your memory page size is 4096 bytes  
\*\*\* WARNING: you have enabled harakiri without post buffering. Slow upload could be rejected on post-unbuffered webservers \*\*\*  
detected max file descriptor number: 1024  
lock engine: pthread robust mutexes  
thunder lock: disabled (you can enable it with --thunder-lock)  
uwsgi socket 0 inherited UNIX address /tmp/kolibri\_uwsgi.sock fd 3  
Python version: 3.8.2 (default, Jul 16 2020, 14:00:26) [GCC 9.3.0]  
Python main interpreter initialized at 0x5581c6fdb990  
python threads support enabled  
your server socket listen backlog is limited to 100 connections  
your mercy for graceful operations on workers is 60 seconds  
mapped 1309272 bytes (1278 KB) for 16 cores  
\*\*\* Operational MODE: preforking \*\*\*  
added /usr/lib/python3/dist-packages/kolibri/dist/ to pythonpath.  
WARNING:root:No C Extensions available for this platform.

INFO Running Kolibri with the following settings: kolibri.deployment.default.settings.base  
WSGI app 0 (mountpoint=’’) ready in 3 seconds on interpreter 0x5581c6fdb990 pid: 10625 (default app)  
\*\*\* uWSGI is running in multiple interpreter mode \*\*\*  
gracefully (RE)spawned uWSGI master process (pid: 10625)  
spawned uWSGI worker 1 (pid: 11485, cores: 1)  
mapping worker 1 to CPUs: 0  
spawned uWSGI worker 2 (pid: 11486, cores: 1)  
spawned uWSGI worker 3 (pid: 11487, cores: 1)  
unable to find requested cheaper algorithm, falling back to spare  
mapping worker 3 to CPUs: 0  
mapping worker 2 to CPUs: 1  
worker 1 killed successfully (pid: 11485)  
uWSGI worker 1 cheaped.  
\*\*\* Starting uWSGI 2.0.18-debian (64bit) on [Fri Jul 31 07:32:47 2020] \*\*\*  
compiled with version: 10.0.1 20200405 (experimental) [master revision 0be9efad938:fcb98e4978a:705510a708d3642c9c962beb663c476167e4e8a4] on 11 April 2020 11:15:55  
os: Linux-5.4.0-42-generic #46-Ubuntu SMP Fri Jul 10 00:24:02 UTC 2020  
nodename: amcebab02vs  
machine: x86\_64  
clock source: unix  
pcre jit disabled  
detected number of CPU cores: 2  
current working directory: /  
writing pidfile to /var/run/kolibri-server/uwsgi.pid  
detected binary path: /usr/bin/uwsgi-core  
setgid() to 33  
setuid() to 112  
chdir() to /usr/lib/python3/dist-packages/  
your processes number limit is 7601  
limiting address space of processes…  
your process address space limit is 1073741824 bytes (1024 MB)  
your memory page size is 4096 bytes  
\*\*\* WARNING: you have enabled harakiri without post buffering. Slow upload could be rejected on post-unbuffered webservers \*\*\*  
detected max file descriptor number: 1024  
lock engine: pthread robust mutexes  
thunder lock: disabled (you can enable it with --thunder-lock)  
uwsgi socket 0 bound to UNIX address /tmp/kolibri\_uwsgi.sock fd 3  
Python version: 3.8.2 (default, Jul 16 2020, 14:00:26) [GCC 9.3.0]  
Python main interpreter initialized at 0x56077dae54f0  
python threads support enabled  
your server socket listen backlog is limited to 100 connections  
your mercy for graceful operations on workers is 60 seconds  
mapped 1309272 bytes (1278 KB) for 16 cores  
\*\*\* Operational MODE: preforking \*\*\*  
added /usr/lib/python3/dist-packages/kolibri/dist/ to pythonpath.  
WARNING:root:No C Extensions available for this platform.

INFO Running Kolibri with the following settings: kolibri.deployment.default.settings.base  
WSGI app 0 (mountpoint=’’) ready in 3 seconds on interpreter 0x56077dae54f0 pid: 1021 (default app)  
\*\*\* uWSGI is running in multiple interpreter mode \*\*\*  
spawned uWSGI master process (pid: 1021)  
spawned uWSGI worker 1 (pid: 1055, cores: 1)  
spawned uWSGI worker 2 (pid: 1056, cores: 1)  
spawned uWSGI worker 3 (pid: 1057, cores: 1)  
unable to find requested cheaper algorithm, falling back to spare  
mapping worker 1 to CPUs: 0  
mapping worker 2 to CPUs: 1  
mapping worker 3 to CPUs: 0  
worker 1 killed successfully (pid: 1055)  
uWSGI worker 1 cheaped.  
…brutally killing workers…  
worker 2 buried after 1 seconds  
worker 3 buried after 1 seconds  
binary reloading uWSGI…  
chdir() to /  
closing all non-uwsgi socket fds \> 2 (max\_fd = 1024)…  
found fd 3 mapped to socket 0 (/tmp/kolibri\_uwsgi.sock)  
running /usr/bin/uwsgi-core  
[uWSGI] getting INI configuration from /etc/kolibri/dist/uwsgi.ini  
\*\*\* Starting uWSGI 2.0.18-debian (64bit) on [Fri Jul 31 09:07:14 2020] \*\*\*  
compiled with version: 10.0.1 20200405 (experimental) [master revision 0be9efad938:fcb98e4978a:705510a708d3642c9c962beb663c476167e4e8a4] on 11 April 2020 11:15:55  
os: Linux-5.4.0-42-generic #46-Ubuntu SMP Fri Jul 10 00:24:02 UTC 2020  
nodename: amcebab02vs  
machine: x86\_64  
clock source: unix  
pcre jit disabled  
detected number of CPU cores: 2  
current working directory: /  
detected binary path: /usr/bin/uwsgi-core  
chdir() to /usr/lib/python3/dist-packages/  
your processes number limit is 7601  
limiting address space of processes…  
your process address space limit is 1073741824 bytes (1024 MB)  
your memory page size is 4096 bytes  
\*\*\* WARNING: you have enabled harakiri without post buffering. Slow upload could be rejected on post-unbuffered webservers \*\*\*  
detected max file descriptor number: 1024  
lock engine: pthread robust mutexes  
thunder lock: disabled (you can enable it with --thunder-lock)  
uwsgi socket 0 inherited UNIX address /tmp/kolibri\_uwsgi.sock fd 3  
Python version: 3.8.2 (default, Jul 16 2020, 14:00:26) [GCC 9.3.0]  
Python main interpreter initialized at 0x55a2c32f2980  
python threads support enabled  
your server socket listen backlog is limited to 100 connections  
your mercy for graceful operations on workers is 60 seconds  
mapped 1309272 bytes (1278 KB) for 16 cores  
\*\*\* Operational MODE: preforking \*\*\*  
added /usr/lib/python3/dist-packages/kolibri/dist/ to pythonpath.  
WARNING:root:No C Extensions available for this platform.

INFO Running Kolibri with the following settings: kolibri.deployment.default.settings.base  
WSGI app 0 (mountpoint=’’) ready in 4 seconds on interpreter 0x55a2c32f2980 pid: 1021 (default app)  
\*\*\* uWSGI is running in multiple interpreter mode \*\*\*  
gracefully (RE)spawned uWSGI master process (pid: 1021)  
spawned uWSGI worker 1 (pid: 1795, cores: 1)  
mapping worker 1 to CPUs: 0  
spawned uWSGI worker 2 (pid: 1796, cores: 1)  
mapping worker 2 to CPUs: 1  
spawned uWSGI worker 3 (pid: 1797, cores: 1)  
unable to find requested cheaper algorithm, falling back to spare  
mapping worker 3 to CPUs: 0  
worker 1 killed successfully (pid: 1795)  
uWSGI worker 1 cheaped.  
\*\*\* Starting uWSGI 2.0.18-debian (64bit) on [Fri Jul 31 09:10:36 2020] \*\*\*  
compiled with version: 10.0.1 20200405 (experimental) [master revision 0be9efad938:fcb98e4978a:705510a708d3642c9c962beb663c476167e4e8a4] on 11 April 2020 11:15:55  
os: Linux-5.4.0-42-generic #46-Ubuntu SMP Fri Jul 10 00:24:02 UTC 2020  
nodename: amcebab02vs  
machine: x86\_64  
clock source: unix  
pcre jit disabled  
detected number of CPU cores: 2  
current working directory: /  
writing pidfile to /var/run/kolibri-server/uwsgi.pid  
detected binary path: /usr/bin/uwsgi-core  
setgid() to 33  
setuid() to 112  
chdir() to /usr/lib/python3/dist-packages/  
your processes number limit is 7601  
limiting address space of processes…  
your process address space limit is 1073741824 bytes (1024 MB)  
your memory page size is 4096 bytes  
\*\*\* WARNING: you have enabled harakiri without post buffering. Slow upload could be rejected on post-unbuffered webservers \*\*\*  
detected max file descriptor number: 1024  
lock engine: pthread robust mutexes  
thunder lock: disabled (you can enable it with --thunder-lock)  
uwsgi socket 0 bound to UNIX address /tmp/kolibri\_uwsgi.sock fd 3  
Python version: 3.8.2 (default, Jul 16 2020, 14:00:26) [GCC 9.3.0]  
Python main interpreter initialized at 0x55c9d12784f0  
python threads support enabled  
your server socket listen backlog is limited to 100 connections  
your mercy for graceful operations on workers is 60 seconds  
mapped 1309272 bytes (1278 KB) for 16 cores  
\*\*\* Operational MODE: preforking \*\*\*  
added /usr/lib/python3/dist-packages/kolibri/dist/ to pythonpath.  
WARNING:root:No C Extensions available for this platform.

INFO Running Kolibri with the following settings: kolibri.deployment.default.settings.base  
WSGI app 0 (mountpoint=’’) ready in 4 seconds on interpreter 0x55c9d12784f0 pid: 1003 (default app)  
\*\*\* uWSGI is running in multiple interpreter mode \*\*\*  
spawned uWSGI master process (pid: 1003)  
spawned uWSGI worker 1 (pid: 1037, cores: 1)  
mapping worker 1 to CPUs: 0  
spawned uWSGI worker 2 (pid: 1038, cores: 1)  
spawned uWSGI worker 3 (pid: 1039, cores: 1)  
unable to find requested cheaper algorithm, falling back to spare  
mapping worker 3 to CPUs: 0  
mapping worker 2 to CPUs: 1  
worker 1 killed successfully (pid: 1037)  
uWSGI worker 1 cheaped.  
…brutally killing workers…  
worker 2 buried after 1 seconds  
worker 3 buried after 1 seconds  
binary reloading uWSGI…  
chdir() to /  
closing all non-uwsgi socket fds \> 2 (max\_fd = 1024)…  
found fd 3 mapped to socket 0 (/tmp/kolibri\_uwsgi.sock)  
running /usr/bin/uwsgi-core  
[uWSGI] getting INI configuration from /etc/kolibri/dist/uwsgi.ini  
\*\*\* Starting uWSGI 2.0.18-debian (64bit) on [Sat Aug 1 10:29:07 2020] \*\*\*  
compiled with version: 10.0.1 20200405 (experimental) [master revision 0be9efad938:fcb98e4978a:705510a708d3642c9c962beb663c476167e4e8a4] on 11 April 2020 11:15:55  
os: Linux-5.4.0-42-generic #46-Ubuntu SMP Fri Jul 10 00:24:02 UTC 2020  
nodename: amcebab02vs  
machine: x86\_64  
clock source: unix  
pcre jit disabled  
detected number of CPU cores: 2  
current working directory: /  
detected binary path: /usr/bin/uwsgi-core  
chdir() to /usr/lib/python3/dist-packages/  
your processes number limit is 7601  
limiting address space of processes…  
your process address space limit is 1073741824 bytes (1024 MB)  
your memory page size is 4096 bytes  
\*\*\* WARNING: you have enabled harakiri without post buffering. Slow upload could be rejected on post-unbuffered webservers \*\*\*  
detected max file descriptor number: 1024  
lock engine: pthread robust mutexes  
thunder lock: disabled (you can enable it with --thunder-lock)  
uwsgi socket 0 inherited UNIX address /tmp/kolibri\_uwsgi.sock fd 3  
Python version: 3.8.2 (default, Jul 16 2020, 14:00:26) [GCC 9.3.0]  
Python main interpreter initialized at 0x55b06666f980  
python threads support enabled  
your server socket listen backlog is limited to 100 connections  
your mercy for graceful operations on workers is 60 seconds  
mapped 1309272 bytes (1278 KB) for 16 cores  
\*\*\* Operational MODE: preforking \*\*\*  
added /usr/lib/python3/dist-packages/kolibri/dist/ to pythonpath.  
WARNING:root:No C Extensions available for this platform.

INFO Running Kolibri with the following settings: kolibri.deployment.default.settings.base  
WSGI app 0 (mountpoint=’’) ready in 2 seconds on interpreter 0x55b06666f980 pid: 1003 (default app)  
\*\*\* uWSGI is running in multiple interpreter mode \*\*\*  
gracefully (RE)spawned uWSGI master process (pid: 1003)  
spawned uWSGI worker 1 (pid: 2996, cores: 1)  
mapping worker 1 to CPUs: 0  
spawned uWSGI worker 2 (pid: 2997, cores: 1)  
mapping worker 2 to CPUs: 1  
mapping worker 3 to CPUs: 0  
spawned uWSGI worker 3 (pid: 2998, cores: 1)  
unable to find requested cheaper algorithm, falling back to spare

---

<div class="post-metadata">

**Author:** ![jredrejo](https://yyz1.discourse-cdn.com/flex035/user_avatar/community.learningequality.org/jredrejo/32/561_2.png) [@jredrejo](https://community.learningequality.org/u/jredrejo)\
**Post date:** [August 6, 2020, 3:19pm UTC](https://community.learningequality.org/t/cannot-change-listener-port-to-port-80/1631/12 "2020-08-06T15:19:47Z")

</div>

Hello @Patrick_Raths  
there are not errors in any of these logs.  
Could it be you had already setup another service using port 80?  
If you try to access to the server using its IP, what do you see?  
The only pending logs to check are ` /var/log/nginx/kolibri_uwsgi.log` and `/var/log/nginx/error.log`  
So far, all the info you have provided is correct and there are not anything suspect to be the reason of your problem.

---

<div class="post-metadata">

**Author:** ![Patrick\_Raths](https://yyz1.discourse-cdn.com/flex035/user_avatar/community.learningequality.org/patrick_raths/32/650_2.png) [@Patrick\_Raths](https://community.learningequality.org/u/Patrick_Raths)\
**Post date:** [August 6, 2020, 4:55pm UTC](https://community.learningequality.org/t/cannot-change-listener-port-to-port-80/1631/14 "2020-08-06T16:55:03Z")

</div>

There was nothing else running on port 80 and I installed the server with the bare minimum; only Open SSH was chosen as an additional package.

When I connect to the server I get the default nginx page telling me that additional configuration is required. By now I found that what is that the below is what I can find in /var/www/html in the file index.nginx-debian.html. The folder does not contain any other file.

 ![kolibri](https://canada1.discourse-cdn.com/flex035/uploads/learneq/original/1X/577efc28e4dbe663e0f06ee03657133b542817a8.png)

I looked at the configuration files of nginx but I don’t yet understand how nginx gets configured to actually connect to kolibri and what site should be loaded when a user connects to the server.

The error.log file you asked me to provide is empty and the /var/log/nginx/kolibri\_uwsgi.log contains the following:

```
praths@amcebab02vs:/var/log/nginx$ cat kolibri_uwsgi.log
10.0.101.254 - - [07/Aug/2020:00:40:51 +0800] “GET / HTTP/1.1” 200 396 “-” “Mozilla/5.0 (iPhone; CPU iPhone OS 13_5_1
like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.1.1 Mobile/15E148 Safari/604.1” 0.000 - .
10.0.101.254 - - [07/Aug/2020:00:40:51 +0800] “GET /favicon.ico HTTP/1.1” 404 134 “http://10.0.100.22/” “Mozilla/5.0 (iPhone; CPU iPhone OS
13_5_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.1.1 Mobile/15E148 Safari/604.1” 0.000 - .
10.0.100.139 - - [07/Aug/2020:00:46:53 +0800] “GET / HTTP/1.1” 200 396 “-” “Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.1.1 Safari/605.1.15” 0.000 - .
10.0.100.139 - - [07/Aug/2020:00:46:53 +0800] “GET /apple-touch-icon-precomposed.png HTTP/1.1” 404 134 “-” “Safari/15609.2.9.1.2 CFNetwork/1126 Darwin/19.5.0 (x86_64)” 0.000 - .
10.0.100.139 - - [07/Aug/2020:00:46:53 +0800] “GET /apple-touch-icon.png HTTP/1.1” 404 134 “-” “Safari/15609.2.9.1.2 CFNetwork/1126 Darwin/19.5.0 (x86_64)” 0.000 - .
10.0.100.139 - - [07/Aug/2020:00:46:53 +0800] “GET /favicon.ico HTTP/1.1” 404 134 “http://10.0.100.22/” “Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.1.1 Safari/605.1.15” 0.000 - .
```

---

<div class="post-metadata">

**Author:** ![Patrick\_Raths](https://yyz1.discourse-cdn.com/flex035/user_avatar/community.learningequality.org/patrick_raths/32/650_2.png) [@Patrick\_Raths](https://community.learningequality.org/u/Patrick_Raths)\
**Post date:** [August 13, 2020, 5:44am UTC](https://community.learningequality.org/t/cannot-change-listener-port-to-port-80/1631/15 "2020-08-13T05:44:59Z")

</div>

@ [jredrejo](https://community.learningequality.org/u/jredrejo)  
Thank you for you help. Have you been able to look at the additional information I shared to you? I am still stuck that I only get the default NGINX web-page instead of accessing kolibri.

Here is the link to my post in reply to your last: [Cannot change listener port to port 80](http://community.learningequality.org/t/cannot-change-listener-port-to-port-80/1631/14)

Thank you

---

<div class="post-metadata">

**Author:** ![blaine](https://yyz1.discourse-cdn.com/flex035/user_avatar/community.learningequality.org/blaine/32/479_2.png) [@blaine](https://community.learningequality.org/u/blaine)\
**Post date:** [August 13, 2020, 4:37pm UTC](https://community.learningequality.org/t/cannot-change-listener-port-to-port-80/1631/16 "2020-08-13T16:37:02Z")

</div>

Hello @Patrick_Raths

Thank you for your patience.

I don’t see in this thread that the nginx configuration has been double checked? Would you please check and reply back with the contents of the following two directories?

- `/etc/nginx/sites-enabled`
- `/etc/nginx/sites-available`

Regards,  
Blaine

---

<div class="post-metadata">

**Author:** ![Patrick\_Raths](https://yyz1.discourse-cdn.com/flex035/user_avatar/community.learningequality.org/patrick_raths/32/650_2.png) [@Patrick\_Raths](https://community.learningequality.org/u/Patrick_Raths)\
**Post date:** [August 14, 2020, 1:44am UTC](https://community.learningequality.org/t/cannot-change-listener-port-to-port-80/1631/17 "2020-08-14T01:44:34Z")

</div>

@blaine  
Thank you for your prompt reply.

Here is the requested information.

```
**/etc/nginx/sites/enabled**
lrwxrwxrwx 1 root root 34 Jul 31 07:21 default -> /etc/nginx/sites-available/default

**/etc/nginx/sites-available`**
-rw-r--r-- 1 root root 2416 Mar 26 22:53 default

```

I am also attaching the default file for your reference. All I did so far was installing the kolibri package using apt-get and configuring to use with user kolibri during the install and then install kolibri-server. No changes were made, so this should be pretty much a plain vanilla installation.

Kolibri itself was accessible on port 8080 just after I installed it

Let me know if you need anything more.

Thanks a lot

Patrick

```
##
# You should look at the following URL's in order to grasp a solid understanding
# of Nginx configuration files in order to fully unleash the power of Nginx.
# https://www.nginx.com/resources/wiki/start/
# https://www.nginx.com/resources/wiki/start/topics/tutorials/config_pitfalls/
# https://wiki.debian.org/Nginx/DirectoryStructure
#
# In most cases, administrators will remove this file from sites-enabled/ and
# leave it as reference inside of sites-available where it will continue to be
# updated by the nginx packaging team.
#
# This file will automatically load configuration files provided by other
# applications, such as Drupal or Wordpress. These applications will be made
# available underneath a path with that package name, such as /drupal8.
#
# Please see /usr/share/doc/nginx-doc/examples/ for more detailed examples.
##

# Default server configuration
#
server {
	listen 80 default_server;
	listen [::]:80 default_server;

	# SSL configuration
	#
	# listen 443 ssl default_server;
	# listen [::]:443 ssl default_server;
	#
	# Note: You should disable gzip for SSL traffic.
	# See: https://bugs.debian.org/773332
	#
	# Read up on ssl_ciphers to ensure a secure configuration.
	# See: https://bugs.debian.org/765782
	#
	# Self signed certs generated by the ssl-cert package
	# Don't use them in a production server!
	#
	# include snippets/snakeoil.conf;

	root /var/www/html;

	# Add index.php to the list if you are using PHP
	index index.html index.htm index.nginx-debian.html;

	server_name _;

	location / {
		# First attempt to serve request as file, then
		# as directory, then fall back to displaying a 404.
		try_files $uri $uri/ =404;
	}

	# pass PHP scripts to FastCGI server
	#
	#location ~ \.php$ {
	#	include snippets/fastcgi-php.conf;
	#
	#	# With php-fpm (or other unix sockets):
	#	fastcgi_pass unix:/var/run/php/php7.4-fpm.sock;
	#	# With php-cgi (or other tcp sockets):
	#	fastcgi_pass 127.0.0.1:9000;
	#}

	# deny access to .htaccess files, if Apache's document root
	# concurs with nginx's one
	#
	#location ~ /\.ht {
	#	deny all;
	#}
}

# Virtual Host configuration for example.com
#
# You can move that to a different file under sites-available/ and symlink that
# to sites-enabled/ to enable it.
#
#server {
#	listen 80;
#	listen [::]:80;
#
#	server_name example.com;
#
#	root /var/www/example.com;
#	index index.html;
#
#	location / {
# try_files $uri $uri/ =404;
#	}
#}
```

---

<div class="post-metadata">

**Author:** ![jredrejo](https://yyz1.discourse-cdn.com/flex035/user_avatar/community.learningequality.org/jredrejo/32/561_2.png) [@jredrejo](https://community.learningequality.org/u/jredrejo)\
**Post date:** [August 17, 2020, 4:11pm UTC](https://community.learningequality.org/t/cannot-change-listener-port-to-port-80/1631/18 "2020-08-17T16:11:50Z")

</div>

Hello @Patrick_Raths  
If your kolibri logs are right, and your uwsgi log is right, the problem must be in your nginx configuration.  
When installing kolibri-server on a clean server it will work out of the box. I think you are mixing it with some others nginx configurations that might be causing conflicts.

Please, check that:

1. You don’t have a` /etc/nginx/sites-enabled/default` with a port set on 80 because it will conflict with the kolibri configuration. If you have it, please either delete it or edit it to change the port.
2. Your /var/kolibri/.kolibri/nginx.conf has a line that says `listen 80;` . If you don’t have it you can do `sudo dpkg-reconfigure kolibri-server` and select the port when asked.

---

<div class="post-metadata">

**Author:** ![Patrick\_Raths](https://yyz1.discourse-cdn.com/flex035/user_avatar/community.learningequality.org/patrick_raths/32/650_2.png) [@Patrick\_Raths](https://community.learningequality.org/u/Patrick_Raths)\
**Post date:** [August 17, 2020, 5:17pm UTC](https://community.learningequality.org/t/cannot-change-listener-port-to-port-80/1631/19 "2020-08-17T17:17:29Z")

</div>

Thank you @jredrejo

Your hunch was right right. The problem was in the /etc/nginx/sites-enabled/default which was set to port 80. After changing it to port 81 and restarting kolibri is now working fine.

What I don’t understand however is where that configuration came from since I did not have nginx previously installed on this machine and I ever installed was the kolibri and kolibri-server package through apt-get. Not sure if this was an issue with the distributed package.

Patrick

---

<div class="post-metadata">

**Author:** ![jredrejo](https://yyz1.discourse-cdn.com/flex035/user_avatar/community.learningequality.org/jredrejo/32/561_2.png) [@jredrejo](https://community.learningequality.org/u/jredrejo)\
**Post date:** [August 17, 2020, 5:42pm UTC](https://community.learningequality.org/t/cannot-change-listener-port-to-port-80/1631/20 "2020-08-17T17:42:38Z")

</div>

> What I don’t understand however is where that configuration came from since I did not have nginx previously installed on this machine and I ever installed was the kolibri and kolibri-server package through apt-get. Not sure if this was an issue with the distributed package.

That configuration is set by default by the Ubuntu/Debian `nginx` package. If you want to run something on port 80 you have to change it.  
The `kolibri-server` package does not do it automatically because there’s no way to know if that’s something the user has set or it’s a default configuration. If the user has set it on purpose, kolibri-server must not change it. The weird thing is that in these cases you should see the error with the port conflict in the nginx logs, making the problem evident. I don’t know why it didn’t appear in your case.

---

<div class="post-metadata">

**Author:** ![Patrick\_Raths](https://yyz1.discourse-cdn.com/flex035/user_avatar/community.learningequality.org/patrick_raths/32/650_2.png) [@Patrick\_Raths](https://community.learningequality.org/u/Patrick_Raths)\
**Post date:** [August 17, 2020, 6:20pm UTC](https://community.learningequality.org/t/cannot-change-listener-port-to-port-80/1631/21 "2020-08-17T18:20:41Z")

</div>

Thanks again @jredrejo for all your help.

In addition to kolibri I would like to kiwi-serve on the same machine. To keep things simple for end users I was thinking of adding two virtual ip addresses to the server, e.g. 10.0.100.31 and 10.0.100.32 and then bind kolibri to 10.0.100.31 while binding kiwis to 10.0.100.32

Do I assume correctly that all I need to do this is to change /var/kolibri/.kolibri/nginx.conf and replace the listen 80; to listen 10.0.100.31:80;?

Thanks again

---

<div class="post-metadata">

**Author:** ![jredrejo](https://yyz1.discourse-cdn.com/flex035/user_avatar/community.learningequality.org/jredrejo/32/561_2.png) [@jredrejo](https://community.learningequality.org/u/jredrejo)\
**Post date:** [August 17, 2020, 6:27pm UTC](https://community.learningequality.org/t/cannot-change-listener-port-to-port-80/1631/22 "2020-08-17T18:27:20Z")

</div>

> [@Patrick\_Raths](#):
>
> Do I assume correctly that all I need to do this is to change /var/kolibri/.kolibri/nginx.conf and replace the listen 80; to listen 10.0.100.31:80;?

Yes, I can’t think of anything else that might be needed (other than adding those IPs to your /etc/hosts file)
