Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JWT troubles after DocumentServer upgrade to v6.4.0 #334

Open
dslengel opened this issue Sep 13, 2021 · 27 comments
Open

JWT troubles after DocumentServer upgrade to v6.4.0 #334

dslengel opened this issue Sep 13, 2021 · 27 comments

Comments

@dslengel
Copy link

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
Copy link
Author

Thank you for your help

@ShockwaveNN
Copy link

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
Copy link
Member

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
Copy link
Author

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
Copy link
Member

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
Copy link
Author

dslengel commented Sep 14, 2021

It still does not work

my.special.adress=Placeholder ;-)

@dslengel
Copy link
Author

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
Copy link
Member

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
Copy link
Author

dslengel commented Sep 14, 2021 via email

@ShockwaveNN ShockwaveNN changed the title Document Server 6.4.0.121 JWT troubles after DocumentServer upgrade to v6.4.0 Sep 14, 2021
@dslengel
Copy link
Author

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
Copy link
Author

Here FYI:

WIN-My-ServerONLYOFFICE DocumentServer ProxyDsProxySvcAngehaltenAutomatisch (verzögerter Start)

@dslengel
Copy link
Author

@Carazyda
Copy link
Member

Carazyda commented Sep 14, 2021

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
Copy link
Author

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
Copy link
Member

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
Copy link
Author

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
Copy link
Author

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
Copy link
Member

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
Copy link
Author

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

@Carazyda
Copy link
Member

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

@dslengel
Copy link
Author

dslengel commented Sep 15, 2021

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
Copy link
Member

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 <add key =" files.docservice.secret.header "value =" "/> match \DocumentServer\config\local.json "inbox": { "header": "" }, "outbox": { "header":"".

@dslengel
Copy link
Author

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
Copy link
Member

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
Copy link
Author

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
Copy link
Member

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
Copy link
Author

dslengel commented Sep 17, 2021 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants