use docker install onlyoffice/documentserver ,and start java spring example , visit my application. I was prompted to open the file error
(Not good at English) Do you want to request a feature or report a bug? bug What is the current behavior?


If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem.
docker
docker pull onlyoffice/documentserver
docker run --name=onlyoffice-three -i -t -d -p 9000:80 --restart=always
-v /home/xiedi/Documents/home/xiedi/Documents/app/onlyoffice/DocumentServer/logs:/var/log/onlyoffice
-v /home/xiedi/Documents/app/onlyoffice/DocumentServer/data:/var/www/onlyoffice/Data
-v /home/xiedi/Documents/app/onlyoffice/DocumentServer/lib:/var/lib/onlyoffice
-v /home/xiedi/Documents/app/onlyoffice/DocumentServer/rabbitmq:/var/lib/rabbitmq
-v /home/xiedi/Documents/app/onlyoffice/DocumentServer/redis:/var/lib/redis
-v /home/xiedi/Documents/app/onlyoffice/DocumentServer/db:/var/lib/postgresql -e JWT_ENABLED=false onlyoffice/documentserver
java spring example
https://api.onlyoffice.com/editors/example/javaspring
update my java spring example config
server.port=4000 files.docservice.url.site=http://127.0.0.1:9000/ files.docservice.secret=
start my java project ok
show docker log
docker logs 7155e8a4fdf9 -f
Creating new PostgreSQL cluster 12/main ... /usr/lib/postgresql/12/bin/initdb -D /var/lib/postgresql/12/main --auth-local peer --auth-host md5 The files belonging to this database system will be owned by user "postgres". This user must also own the server process.
The database cluster will be initialized with locale "en_US.UTF-8". The default database encoding has accordingly been set to "UTF8". The default text search configuration will be set to "english".
Data page checksums are disabled.
fixing permissions on existing directory /var/lib/postgresql/12/main ... ok creating subdirectories ... ok selecting dynamic shared memory implementation ... posix selecting default max_connections ... 100 selecting default shared_buffers ... 128MB selecting default time zone ... Etc/UTC creating configuration files ... ok running bootstrap script ... ok performing post-bootstrap initialization ... ok syncing data to disk ... ok
Success. You can now start the database server using:
pg_ctlcluster 12 main start
Ver Cluster Port Status Owner Data directory Log file 12 main 5432 down postgres /var/lib/postgresql/12/main /var/log/postgresql/postgresql-12-main.log
- Starting PostgreSQL 12 database server [ OK ]
- Starting RabbitMQ Messaging Server rabbitmq-server [ OK ] CREATE DATABASE CREATE ROLE GRANT psql:/var/www/onlyoffice/documentserver/server/schema/postgresql/removetbl.sql:4: NOTICE: table "doc_callbacks" does not exist, skipping psql:/var/www/onlyoffice/documentserver/server/schema/postgresql/removetbl.sql:9: NOTICE: function merge_db(pg_catalog.varchar,int2,int8,pg_catalog.timestamp,pg_catalog.varchar,int8,int8) does not exist, skipping psql:/var/www/onlyoffice/documentserver/server/schema/postgresql/removetbl.sql:10: NOTICE: function merge_db(pg_catalog.varchar,int2,int4,pg_catalog.timestamp,pg_catalog.varchar,int4,int4) does not exist, skipping Starting supervisor: supervisord.
- Starting periodic command scheduler cron [ OK ]
- Starting nginx nginx [ OK ] Generating AllFonts.js, please wait...Done Generating presentation themes, please wait...Done ds:docservice: stopped ds:docservice: started ds:converter: stopped ds:converter: started
- Reloading nginx configuration nginx [ OK ] ==> /var/log/onlyoffice/documentserver/converter/err.log <==
==> /var/log/onlyoffice/documentserver/converter/out.log <== [2023-03-18T03:12:30.065] [WARN] nodeJS - update cluster with 1 workers [2023-03-18T03:12:30.071] [WARN] nodeJS - worker 974 started. [2023-03-18T03:12:30.073] [WARN] nodeJS - update cluster with 1 workers [2023-03-18T03:13:16.975] [WARN] nodeJS - update cluster with 1 workers [2023-03-18T03:13:16.982] [WARN] nodeJS - worker 1091 started. [2023-03-18T03:13:16.985] [WARN] nodeJS - update cluster with 1 workers
==> /var/log/onlyoffice/documentserver/docservice/err.log <==
==> /var/log/onlyoffice/documentserver/docservice/out.log <==
at M.i.onEditorPermissions (http://127.0.0.1:9000/6.4.2-6/web-apps/apps/spreadsheeteditor/main/app.js:76:7249)
at E (http://127.0.0.1:9000/6.4.2-6/web-apps/apps/spreadsheeteditor/main/app.js:8:11724)
at Fa.
==> /var/log/onlyoffice/documentserver/metrics/err.log <==
==> /var/log/onlyoffice/documentserver/metrics/out.log <== 18 Mar 03:12:29 - [915] reading config file: ./config/config.js 18 Mar 03:12:29 - server is up INFO
==> /var/log/onlyoffice/documentserver/nginx.error.log <== 2023/03/18 03:12:49 [error] 970#970: *1 open() "/var/www/onlyoffice/documentserver/sdkjs/common/libfont/wasm/engine.js" failed (2: No such file or directory), client: 172.17.0.1, server: , request: "GET /sdkjs/common/libfont/wasm/engine.js HTTP/1.1", host: "127.0.0.1:9000", referrer: "http://127.0.0.1:9000/web-apps/apps/api/documents/cache-scripts.html" 2023/03/18 03:12:49 [error] 970#970: *2 open() "/var/www/onlyoffice/documentserver/sdkjs/common/libfont/wasm/file.js" failed (2: No such file or directory), client: 172.17.0.1, server: , request: "GET /sdkjs/common/libfont/wasm/file.js HTTP/1.1", host: "127.0.0.1:9000", referrer: "http://127.0.0.1:9000/web-apps/apps/api/documents/cache-scripts.html" 2023/03/18 03:12:49 [error] 970#970: *3 open() "/var/www/onlyoffice/documentserver/sdkjs/common/libfont/wasm/manager.js" failed (2: No such file or directory), client: 172.17.0.1, server: , request: "GET /sdkjs/common/libfont/wasm/manager.js HTTP/1.1", host: "127.0.0.1:9000", referrer: "http://127.0.0.1:9000/web-apps/apps/api/documents/cache-scripts.html" 2023/03/18 03:12:49 [error] 970#970: *2 open() "/var/www/onlyoffice/documentserver/sdkjs/common/libfont/wasm/engine.js" failed (2: No such file or directory), client: 172.17.0.1, server: , request: "GET /sdkjs/common/libfont/wasm/engine.js HTTP/1.1", host: "127.0.0.1:9000", referrer: "http://127.0.0.1:9000/web-apps/apps/api/documents/cache-scripts.html" 2023/03/18 03:12:49 [error] 970#970: *2 open() "/var/www/onlyoffice/documentserver/sdkjs/common/libfont/wasm/manager.js" failed (2: No such file or directory), client: 172.17.0.1, server: , request: "GET /sdkjs/common/libfont/wasm/manager.js HTTP/1.1", host: "127.0.0.1:9000", referrer: "http://127.0.0.1:9000/web-apps/apps/api/documents/cache-scripts.html" 2023/03/18 03:12:49 [error] 970#970: *2 open() "/var/www/onlyoffice/documentserver/sdkjs/common/libfont/wasm/file.js" failed (2: No such file or directory), client: 172.17.0.1, server: , request: "GET /sdkjs/common/libfont/wasm/file.js HTTP/1.1", host: "127.0.0.1:9000", referrer: "http://127.0.0.1:9000/web-apps/apps/api/documents/cache-scripts.html" 2023/03/18 03:12:49 [error] 970#970: *2 open() "/var/www/onlyoffice/documentserver/sdkjs/common/libfont/wasm/file.js" failed (2: No such file or directory), client: 172.17.0.1, server: , request: "GET /sdkjs/common/libfont/wasm/file.js HTTP/1.1", host: "127.0.0.1:9000", referrer: "http://127.0.0.1:9000/web-apps/apps/api/documents/cache-scripts.html" 2023/03/18 03:12:49 [error] 970#970: *2 open() "/var/www/onlyoffice/documentserver/sdkjs/common/libfont/wasm/engine.js" failed (2: No such file or directory), client: 172.17.0.1, server: , request: "GET /sdkjs/common/libfont/wasm/engine.js HTTP/1.1", host: "127.0.0.1:9000", referrer: "http://127.0.0.1:9000/web-apps/apps/api/documents/cache-scripts.html" 2023/03/18 03:12:49 [error] 970#970: *2 open() "/var/www/onlyoffice/documentserver/sdkjs/common/libfont/wasm/manager.js" failed (2: No such file or directory), client: 172.17.0.1, server: , request: "GET /sdkjs/common/libfont/wasm/manager.js HTTP/1.1", host: "127.0.0.1:9000", referrer: "http://127.0.0.1:9000/web-apps/apps/api/documents/cache-scripts.html"
==> /var/log/onlyoffice/documentserver/metrics/out.log <== Flushing stats at Sat Mar 18 2023 03:22:30 GMT+0000 (Coordinated Universal Time) { counters: { 'statsd.bad_lines_seen': 0, 'statsd.packets_received': 0, 'statsd.metrics_received': 0 }, timers: {}, gauges: {}, timer_data: {}, counter_rates: { 'statsd.bad_lines_seen': 0, 'statsd.packets_received': 0, 'statsd.metrics_received': 0 }, sets: {}, pctThreshold: [ 90 ] }
==> /var/log/onlyoffice/documentserver/docservice/out.log <==
[2023-03-18T03:25:37.703] [ERROR] nodeJS - changesError: docId = undefined Error: Uncaught TypeError: Cannot read properties of null (reading 'change') Script: http://127.0.0.1:9000/6.4.2-6/web-apps/apps/spreadsheeteditor/main/app.js Line: 76:7249 userAgent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/107.0.0.0 Safari/537.36 Edg/107.0.1418.42 platform: Linux x86_64 isLoadFullApi: true isDocumentLoadComplete: false StackTrace: TypeError: Cannot read properties of null (reading 'change')
at M.i.onEditorPermissions (http://127.0.0.1:9000/6.4.2-6/web-apps/apps/spreadsheeteditor/main/app.js:76:7249)
at E (http://127.0.0.1:9000/6.4.2-6/web-apps/apps/spreadsheeteditor/main/app.js:8:11724)
at Fa.
==> /var/log/onlyoffice/documentserver/metrics/out.log <== Flushing stats at Sat Mar 18 2023 03:32:30 GMT+0000 (Coordinated Universal Time) { counters: { 'statsd.bad_lines_seen': 0, 'statsd.packets_received': 0, 'statsd.metrics_received': 0 }, timers: {}, gauges: { 'statsd.timestamp_lag': 0 }, timer_data: {}, counter_rates: { 'statsd.bad_lines_seen': 0, 'statsd.packets_received': 0, 'statsd.metrics_received': 0 }, sets: {}, pctThreshold: [ 90 ] }
==> /var/log/onlyoffice/documentserver/docservice/out.log <==
[2023-03-18T03:35:29.425] [ERROR] nodeJS - changesError: docId = undefined Error: Uncaught TypeError: Cannot read properties of null (reading 'change') Script: http://127.0.0.1:9000/6.4.2-6/web-apps/apps/documenteditor/main/app.js Line: 69:7802 userAgent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/107.0.0.0 Safari/537.36 platform: Linux x86_64 isLoadFullApi: false isDocumentLoadComplete: false StackTrace: TypeError: Cannot read properties of null (reading 'change')
at D.i.onEditorPermissions (http://127.0.0.1:9000/6.4.2-6/web-apps/apps/documenteditor/main/app.js:69:7802)
at M (http://127.0.0.1:9000/6.4.2-6/web-apps/apps/documenteditor/main/app.js:8:11724)
at Vb.
What is the expected behavior?
Did this work in previous versions of DocumentServer?
onlyoffice/documentserver latest 731f9669f88e 17 months ago 2.72GB
DocumentServer Docker tag:
onlyoffice/documentserver latest 731f9669f88e 17 months ago 2.72GB
Host Operating System:
docker version
Server: Docker Engine - Community Engine: Version: 20.10.21 API version: 1.41 (minimum version 1.12) Go version: go1.18.7 Git commit: 3056208 Built: Tue Oct 25 18:00:18 2022 OS/Arch: linux/amd64 Experimental: false containerd: Version: 1.6.12 GitCommit: a05d175400b1145e5e6a735a6710579d181e7fb0 runc: Version: 1.1.4 GitCommit: v1.1.4-0-g5fd4c4d docker-init: Version: 0.19.0 GitCommit: de40ad0
cat /etc/os-release
PRETTY_NAME="Deepin 20.7.1" NAME="Deepin" VERSION_ID="20.7.1" VERSION="20.7.1" VERSION_CODENAME="apricot" ID=Deepin HOME_URL="https://www.deepin.org/" BUG_REPORT_URL="https://bbs.deepin.org/"
Looking forward to your reply
mark
Hello @xiedi-w, sorry for the late reply. You used deprecated time ago ver version of the documentserver 6.4.2-6. Update to the newest 7.5.1 now and try again.
Hello @xiedi-w, sorry for the late reply. You used deprecated time ago ver version of the documentserver 6.4.2-6. Update to the newest 7.5.1 now and try again.
Same problem.
@michael-gao-1998 The reason why localhost or 127.0.0.1 cannot be used in the parameter files.docservice.url.site for connecting to the OnlyOffice Document Server from the Java example (or any other external service) is as follows:
localhost and 127.0.0.1 point to the container, not the host.
When you specifyhttp://127.0.0.1:9000/ in the Spring application configuration, this means:
"Send a request to port 9000 of the local machine."
But if the Spring application does not run in the same container as OnlyOffice, then 127.0.0.1 will point to the client itself - to the Java application, and not to the DocumentServer.
This issue was closed due to no response.