Exposing OpenRefine to other machines on my LAN

When I try to reach my OpenRefine instance from another computer on my LAN, e.g., http://host-running-openrefine.local:3333/, I get a 404 error:

HTTP ERROR 404 Invalid hostname
URI:	/
STATUS:	404
MESSAGE:	Invalid hostname
SERVLET:	-

I don't get the same error when trying to reach other endpoints on the same computer, which leads me to think that OpenRefine is configured to only listen for requests for localhost (127.0.0.1), and not for other hostnames.

Does OpenRefine have a configuration option that allows it to be accessed from the LAN?

Hi Joe,

Great to read you, welcome back to the community :slight_smile:

Indeed, this is a setting we introduced a while ago, which is documented here:

In short you need to make sure you are indeed listening for any incoming connection (which is apparently already the case since you are able to get an HTTP error, otherwise you'd have a connection error instead) and then specify the host(s) on which OpenRefine is expected to be accessed, as explained in the docs.

I hope it helps!

Hi Antonin,

Thanks so much for the kind welcome back! I somehow missed the move from the mailing list to this forum, so I went searching for where to ask questions. It looks like this has been a successful move for the community!

Thank you for the pointer to the documentation. That method works perfectly for me.

Cheers!
Joe

I'm sorry, I spoke too soon. When I first wrote, I edited the plist file on the host running OpenRefine and visited OpenRefine from the same machine, but using its hostname rather than "localhost", and that worked; I was able to reach OpenRefine. But when I switched over to my other computer and tried the same hostname, it failed with the "ERR_CONNECTION_REFUSED" error in Chrome. The strange thing is that I'm able to reach a different application running on the same host as OpenRefine. The other application is eXist-db, running on port 8080. The two URLs are:

  1. http://joes-macbook-pro-14-fsioh.local:3333/
  2. http://joes-macbook-pro-14-fsioh.local:8080/

The 2nd one works, but the 1st one produces the ERR_CONNECTION_REFUSED.

Repeating this using the server's IP address rather than hostname, and using curl instead of Chrome:

❯ curl -Iv http://10.0.0.118:3333
*   Trying 10.0.0.118:3333...
* connect to 10.0.0.118 port 3333 failed: Connection refused
* Failed to connect to 10.0.0.118 port 3333 after 78 ms: Couldn't connect to server
* Closing connection
curl: (7) Failed to connect to 10.0.0.118 port 3333 after 78 ms: Couldn't connect to server

❯ curl -Iv http://10.0.0.118:8080
*   Trying 10.0.0.118:8080...
* Connected to 10.0.0.118 (10.0.0.118) port 8080
> HEAD / HTTP/1.1
> Host: 10.0.0.118:8080
...

The fragment from my Info.plist file:

<key>JVMOptions</key>
<array>
    <string>-Dapple.laf.useScreenMenuBar=true</string>
    <string>-Xdock:name=OpenRefine</string>
    <string>-Xms512M</string>
    <string>-Xmx2048M</string>
    <string>-Drefine.version=3.7.7</string>
    <string>-Drefine.webapp=$APP_ROOT/Contents/Resources/webapp</string>
    <string>-Drefine.host=0.0.0.0</string>
</array>

It seems the -Drefine.host=0.0.0.0 isn't having the effect described in the documentation.

I've checked my macOS firewall settings, and the firewall is off on both systems. No proxy is set. And port 8080 works with no problem.

Do you have any other ideas? Thanks!