owncloud / ocis

:atom_symbol: ownCloud Infinite Scale Stack
https://doc.owncloud.com/ocis/next/
Apache License 2.0
1.38k stars 182 forks source link

OCIS cannot be reachable from out of the "localhost" TLS handshake error #1587

Closed erwinpalma closed 4 months ago

erwinpalma commented 3 years ago

Describe the bug

I tried to access the OCIS as regular from a machine out of the localhost, and it was not possible.

In the beginning, I got a blank page after accepting the certificate.

image

I took a look into the OCIS server output and I noticed the follow:

2021-02-02 15:10:04.295802 I | http: TLS handshake error from 192.168.178.20:3059: remote error: tls: unknown certificate
2021-02-02 15:10:04.299093 I | http: TLS handshake error from 192.168.178.20:3058: remote error: tls: unknown certificate
2021-02-02 15:10:04.394335 I | http: TLS handshake error from 192.168.178.20:3062: remote error: tls: unknown certificate
2021-02-02 15:10:04.394397 I | http: TLS handshake error from 192.168.178.20:3063: remote error: tls: unknown certificate
{"level":"info","service":"proxy","from":"192.168.178.20:3064","method":"GET","path":"/settings.js","time":"2021-02-02T15:10:05.659067+01:00","message":"access-log"}
{"level":"info","service":"proxy","from":"192.168.178.20:3064","method":"GET","path":"/accounts.js","time":"2021-02-02T15:10:05.704794+01:00","message":"access-log"}

And here is my Certificate

image

Steps to reproduce

Steps to reproduce the behavior:

  1. start the server ./ocis server
  2. From a sepatare Computer open your ocis website "https://192.168.178.35:9200"
  3. Accept the certificate

Actual behavior

I got a Blank Page

Setup

Please describe how you started the server

 ./ocis server

and provide a list of relevant environment variables.

Server Side

./ocis --version
ocis version 1.1.0-rc1

Additional context

I have the follow small infraestructure.

[OCIS Server]

[Regular OC]

LoggeL commented 3 years ago

Same problem here. Additionally I have the following error in the firefox dev console:

firefox_21-02-02_15-45-25

Seems like it's sending a CORS request to the client instead of the server?

./ocis -version
ocis version 1.1.0

Also confirmed with ocis version 98c90e9d Running ocis-linux-arm Also confirmed the same on windows

It only works if the server & client IP are the same

erwinpalma commented 3 years ago

@micbar,

is an expected behavior? or there is a way to configure OCIS to access out of localhost?

ackr-8 commented 3 years ago

Is this an issue with trusted domains? If yes how can we add trusted domains/

micbar commented 3 years ago

If you want to configure ocis to run on a different domain than localhost, you need to configure it

See https://owncloud.github.io/ocis/deployment/basic-remote-setup/.

or

https://owncloud.github.io/ocis/deployment/ocis_traefik/

pascalwengerter commented 3 years ago

@erwinpalma has your question been answered?

001101 commented 3 years ago

n order to run oCIS with automatically generated and self signed certificates please execute following command. You need to replace your-host with an IP or hostname.

PROXY_HTTP_ADDR=0.0.0.0:9200 \ OCIS_URL=https://your-host:9200 \ ./ocis server

not working

pascalwengerter commented 3 years ago

Hey @001101 thanks for giving oCIS a try. Could you confirm you're running on the latest version (v.1.8.0), provide more information on your setup (OS, Dockerized vs compiled oCIS etc) and a paste the error msg you're receiving?

001101 commented 3 years ago

thanks for the fast reply! docker debian buster

2021/07/04 08:35:46 http: TLS handshake error from my-host-ip:51904: read tcp my-kvm-ip:9200->my-host-ip:51904: read: connection reset by peer

maybe it is also a faulty kvm network configuration, cause i am seeing the handshake error coming from the host ip of my new kvm, which is from a provider, so nothing selfhosted, is this normal?

pascalwengerter commented 3 years ago

thanks for the fast reply! docker debian buster

2021/07/04 08:35:46 http: TLS handshake error from my-host-ip:51904: read tcp my-kvm-ip:9200->my-host-ip:51904: read: connection reset by peer

maybe it is also a faulty kvm network configuration, cause i am seeing the handshake error coming from the host ip of my new kvm, which is from a provider, so nothing selfhosted, is this normal?

You're welcome! Since you're running it dockerized ./ocis server seems to be the wrong command (unless I'm missing sth obvious). @wkloucek helped someone else out in a similar scenario recently, could you check this thread and see if it applies to you, too?

001101 commented 3 years ago

yes, this circumstance is right, but i tried first docker and as i noticed that the configs are written to run for localhost I tried to run it directly by binary and ended up with the TLS error, could you also take reference to my asked question about the host system issue with the error?

wkloucek commented 3 years ago

... image ...

Actual behavior

I got a Blank Page

@pascalwengerter @kulmann if ownCloud Web fails on the openid-configuration endpoint it just displays a white page. Could we instead show some error message?

Steps to reproduce:

image

pascuflow commented 12 months ago

Any updates? Running OCIS in Docker and get the same error:

docker run \
    --name ocis_runtime \
    --rm \
    -it \
    -p 9200:9200 \
    --mount type=bind,source=$PWD/ocis/ocis-config,target=/etc/ocis \
    --mount type=bind,source=$PWD/ocis/ocis-data,target=/var/lib/ocis \
    -e OCIS_INSECURE=true \
    -e PROXY_HTTP_ADDR=0.0.0.0:9200 \
    -e OCIS_URL=https://My-Ip:9200 \
    owncloud/ocis
http: TLS handshake error from 139.60.191.197:55712: remote error: tls: unknown certificate
rhafer commented 11 months ago

@pascuflow Would you mind opening a separate issue for your problem? I am pretty sure you're running into something different than what was reported here. If possible please add screenshots and debug level log files (OCIS_LOG_LEVEL=debug ) to that issue.