[GH-ISSUE #271] Redis/5.6.0-changes: TypeError: Cannot set property 'host' of undefined #149

Closed
opened 2026-02-26 09:37:01 +03:00 by kerem · 6 comments
Owner

Originally created by @edvinkuric on GitHub (Jul 30, 2020).
Original GitHub issue: https://github.com/ONLYOFFICE/Docker-DocumentServer/issues/271

Do you want to request a feature or report a bug?
Bug

What is the current behavior?
Newest version (5.6.0) of documentserver generates the following error, when trying to setup/start a clean install.
Here is a log:

documentserver_1  | undefined:3
documentserver_1  | this.services.CoAuthoring.redis.host = 'redis'
documentserver_1  |                                      ^
documentserver_1  |
documentserver_1  | TypeError: Cannot set property 'host' of undefined
documentserver_1  |     at Object.eval (eval at main (/snapshot/json/lib/json.js), <anonymous>:3:38)
documentserver_1  |     at parseChunk (/snapshot/json/lib/json.js:0:0)
documentserver_1  |     at /snapshot/json/lib/json.js:0:0
documentserver_1  |     at getInput (/snapshot/json/lib/json.js:0:0)
documentserver_1  |     at main (/snapshot/json/lib/json.js:0:0)
documentserver_1  |     at Object.<anonymous> (/snapshot/json/lib/json.js:0:0)
documentserver_1  |     at Module._compile (pkg/prelude/bootstrap.js:1261:22)
documentserver_1  |     at Object.Module._extensions..js (internal/modules/cjs/loader.js:787:10)
documentserver_1  |     at Module.load (internal/modules/cjs/loader.js:651:32)
documentserver_1  |     at tryModuleLoad (internal/modules/cjs/loader.js:591:12)
documentserver_1  | undefined:3
documentserver_1  | this.services.CoAuthoring.redis.port = '6379'
documentserver_1  |                                      ^
documentserver_1  |
documentserver_1  | TypeError: Cannot set property 'port' of undefined
documentserver_1  |     at Object.eval (eval at main (/snapshot/json/lib/json.js), <anonymous>:3:38)
documentserver_1  |     at parseChunk (/snapshot/json/lib/json.js:0:0)
documentserver_1  |     at /snapshot/json/lib/json.js:0:0
documentserver_1  |     at getInput (/snapshot/json/lib/json.js:0:0)
documentserver_1  |     at main (/snapshot/json/lib/json.js:0:0)
documentserver_1  |     at Object.<anonymous> (/snapshot/json/lib/json.js:0:0)
documentserver_1  |     at Module._compile (pkg/prelude/bootstrap.js:1261:22)
documentserver_1  |     at Object.Module._extensions..js (internal/modules/cjs/loader.js:787:10)
documentserver_1  |     at Module.load (internal/modules/cjs/loader.js:651:32)
documentserver_1  |     at tryModuleLoad (internal/modules/cjs/loader.js:591:12)

If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem.
With a running docker-onlyoffice-documentserver, just try to reinstall the newest version (upgrade from 5.5.1 to 5.6.0)

What is the expected behavior?
Should work, like before

Did this work in previous versions of DocumentServer?
yes - i have a test running which tries to install the documentserver every two weeks to catch these errors.

DocumentServer Docker tag:
latest

Host Operating System:
Ubuntu 20.04
Docker 19.03.11
Docker-compose 1.25.5

Originally created by @edvinkuric on GitHub (Jul 30, 2020). Original GitHub issue: https://github.com/ONLYOFFICE/Docker-DocumentServer/issues/271 **Do you want to request a *feature* or report a *bug*?** Bug **What is the current behavior?** Newest version (5.6.0) of documentserver generates the following error, when trying to setup/start a clean install. Here is a log: ``` documentserver_1 | undefined:3 documentserver_1 | this.services.CoAuthoring.redis.host = 'redis' documentserver_1 | ^ documentserver_1 | documentserver_1 | TypeError: Cannot set property 'host' of undefined documentserver_1 | at Object.eval (eval at main (/snapshot/json/lib/json.js), <anonymous>:3:38) documentserver_1 | at parseChunk (/snapshot/json/lib/json.js:0:0) documentserver_1 | at /snapshot/json/lib/json.js:0:0 documentserver_1 | at getInput (/snapshot/json/lib/json.js:0:0) documentserver_1 | at main (/snapshot/json/lib/json.js:0:0) documentserver_1 | at Object.<anonymous> (/snapshot/json/lib/json.js:0:0) documentserver_1 | at Module._compile (pkg/prelude/bootstrap.js:1261:22) documentserver_1 | at Object.Module._extensions..js (internal/modules/cjs/loader.js:787:10) documentserver_1 | at Module.load (internal/modules/cjs/loader.js:651:32) documentserver_1 | at tryModuleLoad (internal/modules/cjs/loader.js:591:12) documentserver_1 | undefined:3 documentserver_1 | this.services.CoAuthoring.redis.port = '6379' documentserver_1 | ^ documentserver_1 | documentserver_1 | TypeError: Cannot set property 'port' of undefined documentserver_1 | at Object.eval (eval at main (/snapshot/json/lib/json.js), <anonymous>:3:38) documentserver_1 | at parseChunk (/snapshot/json/lib/json.js:0:0) documentserver_1 | at /snapshot/json/lib/json.js:0:0 documentserver_1 | at getInput (/snapshot/json/lib/json.js:0:0) documentserver_1 | at main (/snapshot/json/lib/json.js:0:0) documentserver_1 | at Object.<anonymous> (/snapshot/json/lib/json.js:0:0) documentserver_1 | at Module._compile (pkg/prelude/bootstrap.js:1261:22) documentserver_1 | at Object.Module._extensions..js (internal/modules/cjs/loader.js:787:10) documentserver_1 | at Module.load (internal/modules/cjs/loader.js:651:32) documentserver_1 | at tryModuleLoad (internal/modules/cjs/loader.js:591:12) ``` **If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem.** With a running docker-onlyoffice-documentserver, just try to reinstall the newest version (upgrade from 5.5.1 to 5.6.0) **What is the expected behavior?** Should work, like before **Did this work in previous versions of DocumentServer?** yes - i have a test running which tries to install the documentserver every two weeks to catch these errors. **DocumentServer Docker tag:** latest **Host Operating System:** Ubuntu 20.04 Docker 19.03.11 Docker-compose 1.25.5
kerem closed this issue 2026-02-26 09:37:02 +03:00
Author
Owner

@ShockwaveNN commented on GitHub (Jul 30, 2020):

Hi, seems this is some of problem with removal of redis from onlyoffice/documentserver image
But I cannot reproduce this problem

Could you provide your docker-compose.yml file? Maybe there some config from older version?

<!-- gh-comment-id:666470178 --> @ShockwaveNN commented on GitHub (Jul 30, 2020): Hi, seems this is some of problem with removal of `redis` from `onlyoffice/documentserver` image But I cannot reproduce this problem Could you provide your `docker-compose.yml` file? Maybe there some config from older version?
Author
Owner

@edvinkuric commented on GitHub (Jul 31, 2020):

Hey, thank you for your fast reply @ShockwaveNN.

I think i have located the source of my problem:
in https://github.com/ONLYOFFICE/Docker-DocumentServer/blob/master/run-document-server.sh#L241 , there is this function "update_redis_settings".
This function was called, when an external redis-server was specified via .env (i had a seperate redis-container != "localhost").

I could fix my issue by updating the script to not call this function anymore.

Is this function still needed (e.g. for integration-edition)?
Also, what is the purpose of "REDIS_ENABLED" in this case?
Is Redis used in other distributions of the documentserver? (In which cases should this "REDIS_ENABLED"-variable be true?)

<!-- gh-comment-id:666869900 --> @edvinkuric commented on GitHub (Jul 31, 2020): Hey, thank you for your fast reply @ShockwaveNN. I think i have located the source of my problem: in https://github.com/ONLYOFFICE/Docker-DocumentServer/blob/master/run-document-server.sh#L241 , there is this function "update_redis_settings". This function was called, when an external redis-server was specified via .env (i had a seperate redis-container != "localhost"). I could fix my issue by updating the script to not call this function anymore. Is this function still needed (e.g. for integration-edition)? Also, what is the purpose of "REDIS_ENABLED" in this case? Is Redis used in other distributions of the documentserver? (In which cases should this "REDIS_ENABLED"-variable be true?)
Author
Owner

@ShockwaveNN commented on GitHub (Jul 31, 2020):

Is this function still needed (e.g. for integration-edition)?

Yeah, this methods is needed for onlyoffice-documentserver-ie and onlyoffice-documentserver-de

We are awared with some troubles with redis config and fixed some issues at https://github.com/ONLYOFFICE/Docker-DocumentServer/pull/270

(i had a seperate redis-container != "localhost").

Could you specify which edition of DocumentServer are you using? If you using onlyoffice/documentserver image of DocumentServer Community Edition - there is no need of redis any more

<!-- gh-comment-id:666968798 --> @ShockwaveNN commented on GitHub (Jul 31, 2020): > Is this function still needed (e.g. for integration-edition)? Yeah, this methods is needed for `onlyoffice-documentserver-ie` and `onlyoffice-documentserver-de` We are awared with some troubles with redis config and fixed some issues at https://github.com/ONLYOFFICE/Docker-DocumentServer/pull/270 > (i had a seperate redis-container != "localhost"). Could you specify which edition of DocumentServer are you using? If you using `onlyoffice/documentserver` image of DocumentServer Community Edition - there is no need of redis any more
Author
Owner

@edvinkuric commented on GitHub (Aug 23, 2020):

@ShockwaveNN thank you for your reply :-)

sure, we have a "containerized/non-root/readonly/up-to-date"-dockerSetup running with Ubuntu 20.04 and newest nginx, which in theory should work for any onlyoffice-edition.

Currently, our setup works already without redis (thanks to you :-)) - but it would have been nice to see that the setup works in every edition.

We used the Onlyoffice-Versions 5.5.1 as well as 5.6.2 when testing this.

  • How can i verify the functionality of Redis in onlyoffice-documentserver-de?
  • How is redis used exactly or in which submodules (server/web-apps?) is redis used?
    I saw in the commit-history, that some redis-usage was swapped with the "editorDataMemory.js" in 5.4.2, but not sure why - was there a reason for removing the redis-usage within there?
  • Are there some other redis-related tasks/implementations running, like in that "old implementation" within ie/de somewhere else?
  • What is the alternative implementation to this redis-usage in other editions, which is used in the open source "onlyoffice-documentserver"-edition?
  • Are there another/additional implementations or other scenarios with redis-usage on the other editions?

Can you help me here? That would be great :-)

<!-- gh-comment-id:678760061 --> @edvinkuric commented on GitHub (Aug 23, 2020): @ShockwaveNN thank you for your reply :-) sure, we have a "containerized/non-root/readonly/up-to-date"-dockerSetup running with Ubuntu 20.04 and newest nginx, which in theory should work for any onlyoffice-edition. Currently, our setup works already without redis (thanks to you :-)) - but it would have been nice to see that the setup works in every edition. We used the Onlyoffice-Versions 5.5.1 as well as 5.6.2 when testing this. - How can i verify the functionality of Redis in `onlyoffice-documentserver-de`? - How is redis used exactly or in which submodules (server/web-apps?) is redis used? I saw in the commit-history, that some redis-usage was swapped with the "[editorDataMemory.js](https://github.com/ONLYOFFICE/server/blob/master/DocService/sources/editorDataMemory.js)" in 5.4.2, but not sure why - was there a reason for [removing the redis-usage](https://github.com/ONLYOFFICE/server/commit/e796affb5ba2ef9f3814e5700ca3c2969a9656b0#diff-6f60297b88a2d22e9ec854a2e0500c03) within there? - Are there some other redis-related tasks/implementations running, like in that "old implementation" within ie/de somewhere else? - What is the alternative implementation to this redis-usage in other editions, which is used in the open source "onlyoffice-documentserver"-edition? - Are there another/additional implementations or other scenarios with redis-usage on the other editions? Can you help me here? That would be great :-)
Author
Owner

@ShockwaveNN commented on GitHub (Aug 24, 2020):

How can i verify the functionality of Redis in onlyoffice-documentserver-de?

redis is required part in documentserver-ie and document-server-de file. To be 100% sure you can open file with several user, make some edits, close it, wait around minute and open again - there should be no data lost, and you can also see logs for any errors

How is redis used exactly or in which submodules (server/web-apps?) is redis used?

server only. We removed redis from onlyoffice-documentserver version since it's only support 20 concurrent user, so no need of extra dependency, designed to hold a lot of users. So simpler installation of package installation

Not sure that you mean by other questions, especially implementation details, as I said redis is required part of -ie and -de editions to hold more simultaneous users

<!-- gh-comment-id:678945696 --> @ShockwaveNN commented on GitHub (Aug 24, 2020): > How can i verify the functionality of Redis in onlyoffice-documentserver-de? redis is required part in `documentserver-ie` and `document-server-de` file. To be 100% sure you can open file with several user, make some edits, close it, wait around minute and open again - there should be no data lost, and you can also see logs for any errors > How is redis used exactly or in which submodules (server/web-apps?) is redis used? `server` only. We removed redis from `onlyoffice-documentserver` version since it's only support 20 concurrent user, so no need of extra dependency, designed to hold a lot of users. So simpler installation of package installation Not sure that you mean by other questions, especially `implementation details`, as I said `redis` is required part of `-ie` and `-de` editions to hold more simultaneous users
Author
Owner

@ShockwaveNN commented on GitHub (Apr 27, 2021):

This issue was closed due to no response.

<!-- gh-comment-id:827531764 --> @ShockwaveNN commented on GitHub (Apr 27, 2021): This issue was closed due to no response.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/Docker-DocumentServer-ONLYOFFICE#149
No description provided.