? Pending

User tests: Successful: Unsuccessful:

avatar wojsmol
wojsmol
29 Nov 2021

Pull Request for Issue # .

Summary of Changes

Allow redis server port to be set to 0 - for some hostings strange setups

Testing Instructions

Code review or try set redis server port to 0

Actual result BEFORE applying this Pull Request

Global Configuration can't be successfully saved when redis server port is set to 0.

Expected result AFTER applying this Pull Request

Global Configuration can be successfully saved when redis server port is set to 0.

Documentation Changes Required

N/A

avatar wojsmol wojsmol - open - 29 Nov 2021
avatar wojsmol wojsmol - change - 29 Nov 2021
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 29 Nov 2021
Category Administration com_config
avatar zero-24
zero-24 - comment - 29 Nov 2021

Hmm its a reserverd port (RFC1700) and from what I found its used to be a dynamic port:

Under normal circumstances, you will also not encounter a client-server connection that uses this port, because in socket programming, port 0 is synonymous with a dynamic port assigned by the operating system -- port 0 is used as a so-called wild card. When the bind() function is called, the socket is bound to a free, randomly chosen port.

https://www.heise.de/newsticker/meldung/Port-0-hilft-beim-OS-Fingerprinting-82937.html

According to this bug report and the current code from redis it also is not intended behavior to run on port 0.

Have you confirmed that it actually works when you set the port to 0?

edit: Its also documented on the redis.conf that:

If port 0 is specified Redis will not listen on a TCP socket.

avatar wojsmol
wojsmol - comment - 29 Nov 2021

@zero-24 I contacted technical support of affected hosting and requested informations here on github or via ticket - they checking this.

avatar PhilETaylor
PhilETaylor - comment - 30 Nov 2021

Its impossible for redis to listen on port 0 ! This is the wrong solution for sure!

avatar PhilETaylor
PhilETaylor - comment - 30 Nov 2021

see

// If you are trying to connect to a socket file, ignore the supplied port

This is how Joomla allows connecting to redis over a sock rather than a port. You dont need to specify the port in Joomla global config if you are connecting over a socket.

avatar PhilETaylor
PhilETaylor - comment - 30 Nov 2021

related #18395

avatar wojsmol wojsmol - change - 30 Nov 2021
Status Pending Closed
Closed_Date 0000-00-00 00:00:00 2021-11-30 10:12:41
Closed_By wojsmol
Labels Added: ?
avatar wojsmol wojsmol - close - 30 Nov 2021
avatar wojsmol
wojsmol - comment - 30 Nov 2021

@PhilETaylor You are right, but unfortunately this behaviour is not mentioned in Joomla! Documentation.

Add a Comment

Login with GitHub to post a comment