openrefine-client
openrefine-client copied to clipboard
Connection refused
I am trying to use openrefine client on my local refine instance (OR 3.5.2 on M1 Mac) to get a list of all the projects. However, the command
docker run --rm --platform linux/amd64 --network=host -v ${PWD}:/data:z felixlohmeier/openrefine-client:v0.3.10 --list
result in the following error:
Traceback (most recent call last):
File "/app/refine.py", line 35, in <module>
__main__.main()
File "/app/google/refine/__main__.py", line 237, in main
cli.ls()
File "/app/google/refine/cli.py", line 211, in ls
projects = refine.Refine(refine.RefineServer()).list_projects().items()
File "/app/google/refine/refine.py", line 154, in list_projects
return self.server.urlopen_json('get-all-project-metadata')['projects']
File "/app/google/refine/refine.py", line 114, in urlopen_json
response = json.loads(self.urlopen(*args, **kwargs).read())
File "/app/google/refine/refine.py", line 104, in urlopen
(e.reason, self.server))
urllib2.URLError: <urlopen error [Errno 111] Connection refused for http://127.0.0.1:3333. No Refine server reachable/running; ENV set?>
Important to notice:
- Openrefine is running and it is functional!
- If I use the command with an instance of OpenRefine running on a server, everything works fine.
Any ideas?
Hi @ncarboni,
Unfortunately, I do not have a macOS test device. Maybe it's the network configuration of docker? The parameter --network=host
seems to be Linux only:
The host networking driver only works on Linux hosts, and is not supported on Docker Desktop for Mac, Docker Desktop for Windows, or Docker EE for Windows Server.
https://docs.docker.com/network/host/
Unfortunately, with or without host does not make a difference. If I find a solution I will post it here 👍
I am trying to use openrefine client on my local refine instance (OR 3.5.2 on M1 Mac) to get a list of all the projects. However, the command
docker run --rm --platform linux/amd64 --network=host -v ${PWD}:/data:z felixlohmeier/openrefine-client:v0.3.10 --list
result in the following error: (…)
@ncarboni & @felixlohmeier: I found that this will work on a Macintosh…
docker run felixlohmeier/openrefine-client:v0.3.10 -H host.docker.internal -P 3333 --list
Regards, Antoine
Thank you! Unfortunately I still get an error
Traceback (most recent call last):
File "/app/refine.py", line 35, in <module>
__main__.main()
File "/app/google/refine/__main__.py", line 237, in main
cli.ls()
File "/app/google/refine/cli.py", line 211, in ls
projects = refine.Refine(refine.RefineServer()).list_projects().items()
File "/app/google/refine/refine.py", line 154, in list_projects
return self.server.urlopen_json('get-all-project-metadata')['projects']
File "/app/google/refine/refine.py", line 114, in urlopen_json
response = json.loads(self.urlopen(*args, **kwargs).read())
File "/app/google/refine/refine.py", line 100, in urlopen
raise Exception('HTTP %d "%s" for %s\n\t%s' % (e.code, e.msg, e.geturl(), data))
Exception: HTTP 404 "Not Found" for http://host.docker.internal:3333/command/core/get-all-project-metadata
{}
At this point is quite clear that is me. I will try to maybe find a solution using another platform
At this point is quite clear that is me. I will try to maybe find a solution using another platform
Hum. Maybe. This is what I get with the server running, and with the server closed. You get a 404, when I get a « No Refine server reachable/running; ENV set? ».
Weird.
Good luck, Antoine
Mac-Mini-AB-2019-i7:cypress antoine$ docker run felixlohmeier/openrefine-client:v0.3.10 -H host.docker.internal -P 3333 --list
2576376891252: Verify facets panel (left-panel) appears with no facets yet-1655530987664
1706530357456: TEST-One
Mac-Mini-AB-2019-i7:cypress antoine$ docker run felixlohmeier/openrefine-client:v0.3.10 -H host.docker.internal -P 3333 --list
Traceback (most recent call last):
File "/app/refine.py", line 35, in <module>
__main__.main()
File "/app/google/refine/__main__.py", line 237, in main
cli.ls()
File "/app/google/refine/cli.py", line 211, in ls
projects = refine.Refine(refine.RefineServer()).list_projects().items()
File "/app/google/refine/refine.py", line 154, in list_projects
return self.server.urlopen_json('get-all-project-metadata')['projects']
File "/app/google/refine/refine.py", line 114, in urlopen_json
response = json.loads(self.urlopen(*args, **kwargs).read())
File "/app/google/refine/refine.py", line 104, in urlopen
(e.reason, self.server))
urllib2.URLError: <urlopen error [Errno 111] Connection refused for http://host.docker.internal:3333. No Refine server reachable/running; ENV set?>