Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Connection refused #22

Open
ncarboni opened this issue Feb 24, 2022 · 5 comments
Open

Connection refused #22

ncarboni opened this issue Feb 24, 2022 · 5 comments

Comments

@ncarboni
Copy link

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:

  1. Openrefine is running and it is functional!
  2. If I use the command with an instance of OpenRefine running on a server, everything works fine.

Any ideas?

@felixlohmeier
Copy link
Member

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/

@ncarboni
Copy link
Author

ncarboni commented Feb 26, 2022

Unfortunately, with or without host does not make a difference. If I find a solution I will post it here 👍

@antoine2711
Copy link

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

@ncarboni
Copy link
Author

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

@antoine2711
Copy link

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?>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants