blazegraph / database

Blazegraph High Performance Graph Database
GNU General Public License v2.0
873 stars 170 forks source link

How not to listen to all interfaces #11

Open unrealwill opened 8 years ago

unrealwill commented 8 years ago

Hello, I'm a beginner with blazegraph. I downloaded blazegraph(2.1.1).jar I followed the getting started (a little modified because it otherwise fails without the encoding) : java -Dfile.encoding=UTF-8 -Dsun.jnu.encoding=UTF-8 -server -Xmx4g -jar blazegraph.jar

The server run fine but it says serviceURL: http://privateip:9999

but it's also accessible on http://publicip:9999

The server is accessible and fully operational on the public interface (and without password). How do I configure it so it's not the case ? Is there a way to configure ssl and password (I searched the doc but could not find it, can you pinpoint it)? For the moment I can put a filter in iptables but I would rather not have blazegraph listen on the public ip.

Thank you

beebs-systap commented 8 years ago

You can do this by customizing the embedded Jetty Server configuration. You can pass the -jettyXml <jettyFile> to the executable jar to configure it. The default jetty.xml can be edited and updated to set the bind address and do the SSL configuration.

otheus commented 7 years ago

@beebs-systap I'm not sure if you answered the OP's question or provided a work-around. Is the Jetty Server the one that is used when no -jettyXml <file> is provided? If so, why doesn't the file reference the magical port number 9999? Relatedly, how do I change the port number?

WolfgangFahl commented 6 years ago

As of 2018-01 the default seems to be the other way round. blazegraph only listens locally. How do i get blazegraph to listen on the network?

aizquier commented 6 years ago

Adding the option -Djetty.host=0.0.0.0 will tell jetty to listen in all the interfaces:

java -server -Xmx4g -Djetty.host=0.0.0.0 -jar blazegraph.jar