Change port from 8443


#1

Hi there, I’m using the prebuilt AWS version of MapD. I’d like to have mapD accessible on port 443 instead of 8443. Is it possible to change the port?

Thanks!


#2

HI,

Yes it is possible to change to any port.

How familiar are you with using a port in the privileged range (0-1024)?

From the MapD perspective it is a matter of updating the mapd.conf to the new port, see here.

But to run on the new port you may have to either change the user running the mapd_web_server to root or give the mapd user permission to use the lower ports (read about setcap). There are other options like using port redirection you could also use but they might be even more obscure.

regards


#3

EDIT: Fixed those errors. I’m now running the last bit of code from the link you gave:

“$MAPD_PATH/bin/initdb $MAPD_STORAGE”

and I receive the following error:

“-bash: /var/lib/mapd/bin/initdb: No such file or directory”

When I run echo $MAPD_PATH, it comes up empty. Any advice? Thanks!


#4

Hi,

Please refer to this link https://www.mapd.com/docs/latest/getting-started/configuration/#configuration-file

You just need to change the contents of mapd.conf to move from port 8443 to 443 in the [web] section

ie:

[web]
port = 8443

to

[web]
port = 443

regards


#5

Hi,

You will also need to change your firewall/security rules in AWS etc but I assume you are familiar with networking already to undertake this change

regards


#6

Do I need to create the mapd.conf file or does it already exist? If so, where is it located?


#7

I created a file called mapd.conf in the /var/lib/mapd directory. I wrote:

“[web]
port = 443”

inside that file, and saved it. Then I went to the bash file and put MAPD_STORAGE="/var/lib/mapd"

I rebooted the instance. It still is only broadcasting from 8443. Confused


#8

You haven’t to create the file but modify the one created during the installation of the software.
I am not familiar with the aws instances of mapd, so I can only suggest to do a find to locate the configuration file

find / -name mapd.conf


#9

I had a similar problem, trying to change the port number for the MapD web-server on an AWS instance. Here’s the solution that worked for me:

  • The mapd.conf file is in /raidStorage/prod/mapd-storage (this is instance specific but the find command in the previous response will find it for you)

  • By default, Linux does not allow processes to listen on low level ports (such as 443). You need to enable that by running the following command:

sudo setcap CAP_NET_BIND_SERVICE=+eip /raidStorage/prod/mapd/bin/mapd_web_server

Change this to point it to the mapd_web_server executable’s path.