ONLYOFFICE / CommunityServer

Free open source office suite with business productivity tools: document and project management, CRM, mail aggregator.
http://www.onlyoffice.com
Apache License 2.0
2.72k stars 613 forks source link

JWT troubles after DocumentServer upgrade to v6.4.0 #334

Open dslengel opened 3 years ago

dslengel commented 3 years ago

Hello everyone,

I had just installed the Document Server version from 4.1.5.1 to 6.4.0.121. Now I get the following error message:

image

Question is if i made a mistake here?

The second thing I notice is that 4.1.5.1 is still the installed version in the control panel

dslengel commented 3 years ago

Thank you for your help

ShockwaveNN commented 3 years ago

that 4.1.5.1 is still the installed version in the control panel

@Carazyda could you take a look? I think this is not an issue per DocumentServer, but something went wrong during the upgrade process via the control panel

@dslengel please specify your host os, installation methods, and versions of all components (CommunityServer, DocumentServer (already got it), and ControlPanel)

Carazyda commented 3 years ago

Hello @dslengel Seems that JWT token is lost in Document Server configuration. Please check at WebStudio\web.appsettings.config <add key="files.docservice.secret" value="" /> and set this value in the \DocumentServer\config\local.json in "secret": { section.

Version 4.1.5.1 of Document Server in Control Panel on Windows is an old bug. After the cache is cleared - it should be displayed normally.

dslengel commented 3 years ago

OK, it worked. Unfortunately, after a restart, another error occurs that I cannot explain to myself either.

image

Do you also have a solution?

Thanks in advance

Carazyda commented 3 years ago

This key must also match <add key =" files.docservice.secret.header "value =" "/>. Then check your Document Service settings, are they saved successfully? Or maybe there are some errors in the web.files.log?

dslengel commented 3 years ago

It still does not work

my.special.adress=Placeholder ;-)

dslengel commented 3 years ago

In the meantime I have uninstalled and reinstalled the document server. The result was that neither the document server nor the control panel worked anymore. Then I reinstalled the control panel. Unfortunately, that didn't work.

Help. What was that mistake now?

Carazyda commented 3 years ago

Document Service you can find in portal settings, on /Management.aspx?type=17 page. Make sure that <add key =" files.docservice.secret.header "value =" "/> match \DocumentServer\config\local.json "inbox": { "header": "" }, "outbox": { "header":"".

dslengel commented 3 years ago

Thanks, I'll check it out.

Liebe Grüße, Dirk Büchin

Am Di., 14. Sept. 2021 um 16:16 Uhr schrieb Mike Grunin < @.***>:

Document Service you can find in portal settings, on /Management.aspx?type=17 page. Make sure that match \DocumentServer\config\local.json "inbox": { "header": "" }, "outbox": { "header":"".

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/ONLYOFFICE/CommunityServer/issues/334#issuecomment-919195317, or unsubscribe https://github.com/notifications/unsubscribe-auth/ATBJ2FMYKRXT3VPGMQXBJXDUB5KNDANCNFSM5D6SN5GQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

dslengel commented 3 years ago

Dear Carazyda,

this is the actual problem with the control panel:

image

AND please what exactly do I have to enter here.:

2021-09-14

Let's call my dns-adress: "https://my.special.adress"

dslengel commented 3 years ago

Here FYI:

WIN-My-ServerONLYOFFICE DocumentServer ProxyDsProxySvcAngehaltenAutomatisch (verzögerter Start)
dslengel commented 3 years ago

web.api.log web.log web.controlpanel.09-14.log

Carazyda commented 3 years ago

AND please what exactly do I have to enter here.:

Where you have installed Document Server? On the same server as a Community Server, or on the separate server? If this is the same server - you need to enter the localhost address. If it is separate - enter the public address that the servers can resolve. And then try saving the document service settings.

What about Control Panel - after what you got this error? In the web.controlpanel.log have no errors. And please open a new issue for that problem.

dslengel commented 3 years ago

These are the current settings and yes, both are on the same server. So the settings should be correct or should I make changes here?

image

Carazyda commented 3 years ago

If both servers on the same machine and installed with workspace installation - its ok. But it does not match with this screenshot https://user-images.githubusercontent.com/79863061/133291340-38a12e68-7b21-49b2-93b7-277021330c9e.png What is "https://my.special.adress" ?

Is the save successful with the address "localhost"?

dslengel commented 3 years ago

Please look here: https://user-images.githubusercontent.com/79863061/133306869-7d69a443-70b4-45e7-b804-ca01d607e4ba.png

These are the actuell settings

I only used this address (https://my.special.adress) in order not to have to give my actual address here - You know :-)

dslengel commented 3 years ago

It is noticeable that the ONLYOFFICE DocumentServer Proxy DsProxySv service was stopped by Windows 2016 Server. It can no longer be started manually.

image

Regards, Dirk

Carazyda commented 3 years ago

If Document Server on the same machine please check \DocumentServer\nginx\conf\ds.conf and set port 8083 listen 0.0.0.0:8083; listen [::]:8083 default_server;

Then try to start DS Proxy service.

dslengel commented 3 years ago

I did it. Than I got this on the screen when I tried to open a file image

Carazyda commented 3 years ago

DS Proxy started? Is Document Service saved successfully? Also please check web.files.log for the new errors?

dslengel commented 3 years ago

DS Proxy started? Yes Is Document Service saved successfully? Where can I check this?

Also please check web.files.log for the new errors? Please have a look into it (remember: I changed my dns to https://my.special.adress)

2021-09-15 10:28:25,734 ERROR [142] ASC.Files - DocService track header is null 2021-09-15 10:28:25,859 ERROR [192] ASC.Files - Download stream header http://localhost/Products/Files/HttpHandlers/filehandler.ashx?action=stream&fileid=164&stream_auth=369397701780.PFTOYQ8UOPTWGDRSNYJKO9KMYJH0ZMMOQGXINXGNQ&X-REWRITER-URL=https://my.special.adress:80 System.Exception: Invalid header bei ASC.Web.Files.FileHandler.StreamFile(HttpContext context) 2021-09-15 10:28:26,891 ERROR [138] ASC.Files - Download stream header http://localhost/Products/Files/HttpHandlers/filehandler.ashx?action=stream&fileid=164&stream_auth=369397701780.PFTOYQ8UOPTWGDRSNYJKO9KMYJH0ZMMOQGXINXGNQ&X-REWRITER-URL=https://my.special.adress:80 System.Exception: Invalid header bei ASC.Web.Files.FileHandler.StreamFile(HttpContext context) 2021-09-15 10:28:27,912 ERROR [116] ASC.Files - Download stream header http://localhost/Products/Files/HttpHandlers/filehandler.ashx?action=stream&fileid=164&stream_auth=369397701780.PFTOYQ8UOPTWGDRSNYJKO9KMYJH0ZMMOQGXINXGNQ&X-REWRITER-URL=https://my.special.adress:80 System.Exception: Invalid header bei ASC.Web.Files.FileHandler.StreamFile(HttpContext context) 2021-09-15 10:30:11,926 ERROR [219] ASC.Files - DocService track header is null 2021-09-15 10:30:37,180 ERROR [147] ASC.Files - DocService track header is null 2021-09-15 10:30:37,205 ERROR [192] ASC.Files - Download stream header http://localhost/Products/Files/HttpHandlers/filehandler.ashx?action=stream&fileid=164&stream_auth=369397836024.LXEUZTDAB5HOF0G5VQREZGTWOR3NCTMLUNSZSDD0&X-REWRITER-URL=https://my.special.adress:443 System.Exception: Invalid header bei ASC.Web.Files.FileHandler.StreamFile(HttpContext context) 2021-09-15 10:30:38,217 ERROR [134] ASC.Files - Download stream header http://localhost/Products/Files/HttpHandlers/filehandler.ashx?action=stream&fileid=164&stream_auth=369397836024.LXEUZTDAB5HOF0G5VQREZGTWOR3NCTMLUNSZSDD0&X-REWRITER-URL=https://my.special.adress:443 System.Exception: Invalid header bei ASC.Web.Files.FileHandler.StreamFile(HttpContext context) 2021-09-15 10:30:39,240 ERROR [154] ASC.Files - Download stream header http://localhost/Products/Files/HttpHandlers/filehandler.ashx?action=stream&fileid=164&stream_auth=369397836024.LXEUZTDAB5HOF0G5VQREZGTWOR3NCTMLUNSZSDD0&X-REWRITER-URL=https://my.special.adress:443 System.Exception: Invalid header bei ASC.Web.Files.FileHandler.StreamFile(HttpContext context)

Carazyda commented 3 years ago

Where can I check this?

Try to save Document Service settings.

2021-09-15 10:28:25,859 ERROR [192] ASC.Files - Download stream header http://localhost/Products/Files/HttpHandlers/filehandler.ashx?action=stream&fileid=164&stream_auth=369397701780.PFTOYQ8UOPTWGDRSNYJKO9KMYJH0ZMMOQGXINXGNQ&X-REWRITER-URL=https://my.special.adress:80 System.Exception: Invalid header

This error means that jwt headers does not match.

Make sure that match \DocumentServer\config\local.json "inbox": { "header": "" }, "outbox": { "header":"".

dslengel commented 3 years ago

I can't save the Document Service settings. It always jumps back to the original settings.

I took the value of files.docservice.secret.header "value ="xyz.4example" and put it to

local.json "inbox": { "header": "xyz.4example" } and "outbox": { "header":"xyz.4example"}

Was this correct? Afterwards I tried to open a document. But I get still the same fault. Any other idea?

Carazyda commented 3 years ago

It always jumps back to the original settings.

What do you mean? If you have installed Workspace on the one machine (Document Server and Community Server on the same server) it should have localhost address by default. And this address is right.

Did you restart docservice after setting header in local.json?

dslengel commented 3 years ago

Hi Mike, Unfortunately, I can't get any further here. Please see for yourself. Perhaps you will find the mistake

Did you restart docservice after setting header in local.json? I restarted the server, because I didn't know what the service was called in german.

What do you mean? If you have installed Workspace on the one machine (Document Server and Community Server on the same server) it should have localhost address by default. And this address is right.

Now I have these settings. Are they correct? settings1

I have saved these settings again and get this message: Converter URL: download settings2

File which I would like to open: file-to-open

First alert: first-screen

Second alert: second-screen

Carazyda commented 3 years ago

We still think this is a bug due to misconfiguration of jwt. Where did you set up local.json, in \Program Files (x86)\? Because after the upgrade, Document Server is installed in \Program Files\ by default. Make sure you change the correct local.json in the Document Server working folder.

dslengel commented 3 years ago

Hi Mike,

the local.json is located in C:\Program Files\ONLYOFFICE\DocumentServer\config I did the changes in that file.

Correct?

Am Fr., 17. Sept. 2021 um 11:11 Uhr schrieb Mike Grunin < @.***>:

We still think this is a bug due to misconfiguration of jwt. Where did you set up local.json, in \Program Files (x86)? Because after the upgrade, Document Server is installed in \Program Files\ by default. Make sure you change the correct local.json in the Document Server working folder.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/ONLYOFFICE/CommunityServer/issues/334#issuecomment-921638673, or unsubscribe https://github.com/notifications/unsubscribe-auth/ATBJ2FL4JYUHD7MVEUBQZNTUCMA4NANCNFSM5D6SN5GQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.