Can’t assign a different HTTP address to OR’s server

I’m trying, on Mac, to change the IP of the OR’s server, on a compiled Mac version, and it doesn’t work… I know OR gets the parameters because the browser window that opens upon launch goes to the new address. What is funny it that http://127.0.0.1:3333 still works.

The IP really exist on my machine, as this command proves it:

ifconfig | grep 192.168
	inet 192.168.0.30 netmask 0xffffff00 broadcast 192.168.0.255

Here’s my modifications to Info.plist file:

<string>-Drefine.host=192.168.0.30</string>
<string>-Drefine.port=3333</string>

@tfmorris: I’m pinging you because I know you are also a Mac user and a core developer.
If you want me to open a GitHub issue, just tell me.

Regards, Antoine

As a follow-up, I tried from the current master on a github clone locally, and, with refine.ini containing these values, on MacOS Sonoma (v14.7):

no_proxy="localhost,127.0.0.1,192.168.0.30"
REFINE_PORT=3334
REFINE_HOST=192.168.0.30

I get the same problem. With the URL http://127.0.0.1:3334/, I can get the OR’s web page, with the other IP in the refine.ini. Since I changed the port number to 3334, I’m sure that the configuration is read.

Also, I can SSH my machine with this IP, so I’m pretty sure the network part of this IP is working.

Regards, Antoine

Here’s the log from the server:

./refine 
Using refine.ini for configuration
-------------------------------------------------------------------------------------------------
You have 5047M of free memory.
Your current configuration is set to use 1400M of memory.
OpenRefine can run better when given more memory. Read our FAQ on how to allocate more memory here:
https://openrefine.org/docs/manual/installing#increasing-memory-allocation
-------------------------------------------------------------------------------------------------

08:04:37.237 [            refine_server] Java runtime version 17.0.13+0 from java.home: /usr/local/Cellar/openjdk@17/17.0.13/libexec/openjdk.jdk/Contents/Home (0ms)
08:04:37.243 [            refine_server] Java VM: Homebrew OpenJDK 64-Bit Server VM 17.0.13+0 mixed mode, sharing (5ms)
08:04:37.243 [            refine_server] Starting Server bound to '127.0.0.1:3334' (0ms)
08:04:37.243 [            refine_server] refine.memory size: 1400M JVM Max heap: 1400.0 MBytes (0ms)

We can see it accept the new port but not the new IP…

Regards, Antoine

You can do 3 things:

  1. use ./refine -i 192.168.0.30
  2. Set and use an environment variable. export REFINE_HOST=192.168.0.30 and export REFINE_INTERFACE=192.168.0.30 prior to running ./refine
  3. Set the Java option in the refine.ini file with a line JAVA_OPTIONS=-Drefine.interface=192.168.0.30

It seems you have tried the 3rd option only. If you could try the other 2 that would help find the source of the problem.

Alternatively, it might help to just turn on debugging in the shebang line of the Bash script.

#!/usr/bin/env bash -v

My hunch is that we probably need to do a tweak or two in the refine bash script.
Reply back with which options work or not. As well as the full debug output of the refine script after adding the -v , just pipe the output to a txt file and zip it or whatever as attachment and we'll take a look.

Wait a sec...

  1. Did you specify that the refine script should read from a custom refine.ini path with -c ? The default is that it reads from refine.ini in the same folder.

  2. I do not see anything in the refine script that it would read from an Info.plist file for any of the 3 OS's. Where did you read or see that the refine script would read configuration from an Info.plist file?

It looks like this was changed relatively recently in https://github.com/OpenRefine/OpenRefine/pull/3212
The open issue for documentation improvements may be relevant as well https://github.com/OpenRefine/openrefine.org/issues/201

Tom's right. Host essentially moved to become Interface. Our docs need to be updated.

The IP is now set via refine.interface
The HOST (like example.org) is now set via refine.host
The PORT remains the same via refine.port

And in doing so, @Antoine2711 you could probably improve this line?

You cannot start the Mac version with modifications using Terminal, but you can modify the way the application starts with settings within files.

to

If starting via the Application, then edit info.plist as mentioned below in settings within files. If starting via terminal with the refine shell script, then follow Linux running instead of Mac.

Thanks @tfmorris, that’s exactly what I needed. Indeed, it’s not REFINE_HOST=192.168.0.30, but REFINE_INTERFACE=192.168.0.30.

There are a lot of places in the docs where this has not been updated/corrected.
I will do that.

Regards, Antoine

1 Like

Yes @thadguidry, just setting -Drefine.interface=192.168.0.30 fixed everything.
I will also update the docs, there are plenty of places where the old configuration pattern are still shown.

Thanks, Antoine

1 Like

@thadguidry & @tfmorris:
If you want to review my suggested corrections, feel free to do so…

https://github.com/OpenRefine/openrefine.org/pull/390

Regards, Antoine

There is the opposite that is said in the documentation.

You can find OpenRefine in your Applications folder, or you can open it using Terminal.
But when I try what’s proposed, I get this: (quick translation: JavaAppLaucher is broken, put it in the trash).

It also says:

If you are using an older version of OpenRefine or are on an older version of MacOS, check our Wiki for solutions to problems with MacOS.

But, the Wiki page has been fully erased… @tfmorris: suggestions?

Also, your proposed revision jumps on another subject. As stated by Tom earlier, this is no refine script in the Mac version, unless you clone the repo… If you can do that, you probably don’t need to be explained that MacOS is kind like Linux… :wink: Let’s keep it simple, no?

Regards, Antoine

1 Like

I won't be further useful on this topic or reviewing the PR, other than helping with general networking. Not a Mac user.

1 Like

But, the Wiki page has been fully erased… @tfmorris: suggestions?

I've lost the thread as to what is being quoted from where, but links to the wiki are generally obsolete and should be updated. In most cases the wiki page should contain a link to the new home for the information.

Tom

1 Like

@Antoine2711 You can always check the GitHub wiki page history from here to access previous version.

1 Like

Yes @Martin, and I will try to recover the juicy stuff for Mac that is now buried in past revisions. But it needs updating, it works diffently now.

Regards, Antoine

1 Like