Skip to content

Fixed websocket connection error#363

Merged
enoch85 merged 1 commit into
nextcloud:masterfrom
agolybev:bugfix/websocket
Sep 15, 2017
Merged

Fixed websocket connection error#363
enoch85 merged 1 commit into
nextcloud:masterfrom
agolybev:bugfix/websocket

Conversation

@agolybev

Copy link
Copy Markdown
Contributor

@enoch85

enoch85 commented Sep 13, 2017

Copy link
Copy Markdown
Member

Thanks for the fix!

My intention with running on port 443 was to secure the connection. With this fix it will be plain HTTP, right?

I mean in this case I won't even need to generate a SSL script (right?) as the connection is insecure anyway?

@agolybev

Copy link
Copy Markdown
Contributor Author

Hi @enoch85, in this case you connection already insecure between proxy server (apache) and the documentserver. Now there aren't any process that listen to 443 inside the documentserver container.
It's normal to use http traffic inside the server or the private network.The secure connection with the end user will be provide by your proxy server.

User----------------->Apache-------->Documentserver
(HttpS through 443 port) (Http through 9090 )

So you don't need to setup SSL on ONLYOFFICE Document Server, just set up it through the apache server.

@enoch85

enoch85 commented Sep 14, 2017

Copy link
Copy Markdown
Member

@agolybev For instance, here we use wss: https://github.com/nextcloud/vm/blob/master/apps/collabora.sh#L239

Any suggestions on how to make that happen here as well?

@agolybev

agolybev commented Sep 14, 2017

Copy link
Copy Markdown
Contributor Author

Ok, first you should turn SSL on inside the Document Server. See here how to do it.
Next, you should proxy both traffic type(http and https) to the Document Server.
I think, your config will be like this

    ...
    ProxyPassMatch (.*)(\/websocket)$ "ws://127.0.0.3:9090/$1$2"
    ProxyPass / "http://127.0.0.3:9090/"
    ProxyPassReverse / "http://127.0.0.3:9090/"

    ProxyPassMatch (.*)(\/websocket)$ "wss://127.0.0.3:9091/$1$2"
    ProxyPass / "https://127.0.0.3:9091/"
    ProxyPassReverse / "https://127.0.0.3:9091/"
   ...

@agolybev

agolybev commented Sep 14, 2017

Copy link
Copy Markdown
Contributor Author

You can also skip proxing http traffic to Document Server, if you sure than you wouldn't have such traffiic to the Document Server. It just need to redirect http to https.

@enoch85

enoch85 commented Sep 15, 2017

Copy link
Copy Markdown
Member

Since that is a bit more advanced, let's merge this and do the SSL stuff in another PR.

Also @agolybev , could you please backport this to the PostgreSQL branch?

Thank you very much!

@enoch85
enoch85 merged commit 94d4462 into nextcloud:master Sep 15, 2017
@agolybev

Copy link
Copy Markdown
Contributor Author

Hi @enoch85,
I don't understand what I should do for backport my changes to the postgresql branch.
You could add this changes to postgresql branch by the git cherry pick.

@enoch85

enoch85 commented Sep 15, 2017

Copy link
Copy Markdown
Member

@agolybev True. s/backport/cherry pick/g. If you wouldn't mind?

@agolybev

Copy link
Copy Markdown
Contributor Author

Hi @enoch85, I've done #365.

@johnczer

johnczer commented Jun 7, 2018

Copy link
Copy Markdown

Are there any updates on the OnlyOffice Document server issues and having to restart Docker to get the Document Server is Running screen? I am still getting this on the latest Nextcloud VM even after recently installing with latest scripts. If I restart Docker I get the Document Server Is Running with the green check mark. I am also still not able to get this to work in Nextcloud even after the Document server is running. I get Error when trying to connect, bad request or timeout after clicking save using Document Server Editing Address https://office.domain.com/. I have tried the advanced options as well with no success. Any help would be greatly appreciated:)

Proxy Error

The proxy server received an invalid response from an upstream server.
The proxy server could not handle the request GET /.

Reason: Error reading from remote server

Apache/2.4.29 (Ubuntu) Server at office.domain.com Port 443

@enoch85

enoch85 commented Jun 7, 2018

Copy link
Copy Markdown
Member

@johnczer You need to restart the service, or the whole VM to get it to work. Last time I tested it worked.

@johnczer

johnczer commented Jun 7, 2018

Copy link
Copy Markdown

Ok, so what would these settings be because I am not able to connect to Document Service from Nextcloud. Thanks!
ONLYOFFICE

ONLYOFFICE Document Service Location specifies the address of the server with the document services installed. Please change the '' for the server address in the below line.

Document Editing Service address Advanced server settings

Document Editing Service address for internal requests from the server

Server address for internal requests from the Document Editing Service

@enoch85

enoch85 commented Jun 7, 2018

Copy link
Copy Markdown
Member

@johnczer I think yo would get better help in the forums: https://help.nextcloud.com

@johnczer

johnczer commented Jun 12, 2018 via email

Copy link
Copy Markdown

@enoch85

enoch85 commented Jun 12, 2018

Copy link
Copy Markdown
Member

@johnczer OK, usally it's the firewall and issues ends up here because "I did everything right, but it's still not working" :)

No, there is no way to get the current VM to work with 16.04. I did save the older scripts in @techandme repo though. But why do you want something that is old?

@johnczer

johnczer commented Jun 12, 2018 via email

Copy link
Copy Markdown

@enoch85

enoch85 commented Jun 12, 2018

Copy link
Copy Markdown
Member

a Proxy rule in the firewall.

Well, since nothing changed in the scripts since the old version, could it be that you updated your firewall FW and now needed to add that particular rule for it to pass the requests?

I guess since the old VM just worked with regards to Docker not having to be restarted

It has always been a fact that it needs to be restarted, maybe not always but in most cases.

Anyway, glad it's working! 👍

@johnczer

johnczer commented Jun 12, 2018 via email

Copy link
Copy Markdown

@johnczer

johnczer commented Jun 12, 2018 via email

Copy link
Copy Markdown

@enoch85

enoch85 commented Jun 12, 2018

Copy link
Copy Markdown
Member

Whenever this happens I think about how many attempts it took Thomas Edison to make a light bulb and if were easy I wouldn’t have learned as much. I guess that is how we get sharper☺

Lol, yeah :D

Is there a way to shrink the volume from 100Gigs to 50Gigs since I am putting my Nextcloud data in another share location?

Yes you can. Just google: "shrink vmdk" or something like that.

Thanks for all of your hard work Daniel!

Thanks! Appreciated!

@johnczer

johnczer commented Jun 15, 2018 via email

Copy link
Copy Markdown

@enoch85

enoch85 commented Jun 17, 2018

Copy link
Copy Markdown
Member

Do what you like. Both Collabora and OnlyOffice should work. It's a matter of taste. :)

@johnczer

johnczer commented Jun 17, 2018 via email

Copy link
Copy Markdown

@enoch85

enoch85 commented Jun 17, 2018

Copy link
Copy Markdown
Member

Not sure what you mean, and sorry but Github is no support forum. I think you will get better answers here.

@enoch85

enoch85 commented Aug 16, 2018

Copy link
Copy Markdown
Member

@johnczer Late answer, but I read your question again and the answer is no, we don't install the "full blown" community server. That's a separate VM distributed by OnlyOffice. Sure, you could install them side by side, but I'm not sure how that would work.

The VM scripts installs OnlyOffice "docs" or how you would call it and integrates that into Nextcloud. What else do you need? :) Nextcloud has mail and all that already.

@johnczer

johnczer commented Aug 16, 2018 via email

Copy link
Copy Markdown

@enoch85

enoch85 commented Aug 16, 2018

Copy link
Copy Markdown
Member

Glad to hear that you managed to solve it!

@johnczer

johnczer commented Aug 16, 2018 via email

Copy link
Copy Markdown

@enoch85

enoch85 commented Aug 16, 2018

Copy link
Copy Markdown
Member

Please don't use this PR to chat. Send me an email.

The short answer is no, the shop will be online September 1st.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants