Skip to content
This repository has been archived by the owner on Oct 25, 2019. It is now read-only.

https support #2

Open
0xsaxit opened this issue Jun 6, 2019 · 11 comments
Open

https support #2

0xsaxit opened this issue Jun 6, 2019 · 11 comments

Comments

@0xsaxit
Copy link

0xsaxit commented Jun 6, 2019

After running provided scripts, docker image is forwarding its port to outer port "9092".
Is there any way to change it to https(443 port)?

@randyzwitch
Copy link
Contributor

You can change the port here:
https://github.com/omnisci/mapd_on_azure/blob/master/StartMapD.sh#L19

Please keep in mind that Community Edition is no longer supported. So while these instructions should still work, it doesn't represent the current state of the OmniSci project.

@0xsaxit
Copy link
Author

0xsaxit commented Jun 6, 2019

There must be also some configurations for setting up ssl.
Only change port to 443 doesn't mean to use HTTPS.
Any ideas?

@randyzwitch
Copy link
Contributor

To set up HTTPS, you need to create certificates:

https://www.omnisci.com/docs/latest/5_secure_server.html

The example shows how to make a self-signed example, which should be fine for using locally with a Docker container.

@0xsaxit
Copy link
Author

0xsaxit commented Jun 6, 2019

i am getting "start_omnisci_server command not found".
can you please let me know what I have to fix this error?
Thanks

@0xsaxit
Copy link
Author

0xsaxit commented Jun 6, 2019

https://www.omnisci.com/docs/latest/5_secure_server.html
The steps which were mentioned on this article is for running inside of docker image?
Or outside of docker?

@randyzwitch
Copy link
Contributor

That's actually the wrong link, my apologies. This is the correct one:

https://www.omnisci.com/docs/latest/4_configuration.html#configuration-parameters-for-omnisci-web-server

To answer your question, you have to modify the code inside the docker container, as this is where the OmniSci code is running.

@0xsaxit
Copy link
Author

0xsaxit commented Jun 6, 2019

docker run --runtime=nvidia \
-v $HOME/mapd-docker-storage:/mapd-storage \
-p 9090-9092:9090-9092 \
mapd/mapd-ce-cuda

if I understood properly, this code is for running docker image and the docker image forwards inner port number (9092) to outer port number (9092).
To enable https, do I have to stop omnisci server in the running docker image and start it after proper settings for https?

@andrewseidl
Copy link

If it exists, the Docker image will use the config file at /mapd-storage/mapd.conf if version < 4.6, /omnisci-storage/omnisci.conf if >= 4.6.

Based on your run command, create file $HOME/mapd-docker-storage/mapd.conf with something like:

[web]
enable-https = true
key = "/mapd-storage/server.key"
cert = "/mapd-storage/server.cert"

then place your https key and cert at $HOME/mapd-docker-storage/server.{key,cert} on the host.

Note: you'll still want to use port 9092 inside the container as the scripts to used to start the server inside the container may override it. Outside the container you can use whatever port you want.

@0xsaxit
Copy link
Author

0xsaxit commented Jun 6, 2019

So here are the things what I did.
In docker image, created file at /mapd-storage/mapd.conf.
Copied the contents to mapd.conf file.
Generated server.key and server.cert files at mapd-storage folder.
After that, do I have to restart server?
What commands should I use for this?
Thanks

@andrewseidl
Copy link

Restart the container, either with docker kill ... and then re-run the docker run ..., or use docker stop / docker start.

@0xsaxit
Copy link
Author

0xsaxit commented Jun 6, 2019

Backend TCP:  localhost:9091
Backend HTTP: localhost:9090
Frontend Web: localhost:9092
Calcite TCP: localhost:9093
- sleeping for 5s while server starts
Navigate to: http://localhost:9092
Thrift: Thu Jun  6 18:16:04 2019 TSocket::open() connect() <Host: localhost Port: 9093>Connection refused
Thrift: Thu Jun  6 18:16:04 2019 TSocket::open() connect() <Host: localhost Port: 9093>Connection refused

After restarting docker, it doesn't take me to https. http also doesn't work.
But if I remove mapd.conf, http works and https doesn't work.
I think mapd.conf file is wrong.

[web]
enable-https = true
key = "/mapd-storage/server.key"
cert = "/mapd-storage/server.cert"

Any ideas?

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

No branches or pull requests

3 participants