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

cannot pull from registry #5

Open
hududed opened this issue Oct 21, 2022 · 2 comments
Open

cannot pull from registry #5

hududed opened this issue Oct 21, 2022 · 2 comments

Comments

@hududed
Copy link

hududed commented Oct 21, 2022

❯ fair pull simpleModel/ext/SEIRSconfig.yaml
fair run simpleModel/ext/SEIRSconfig.yaml

Error: Cannot perform pull from registry 'origin' as the server does not exist. Expected response from 'http://127.0.0.1:8001/api/'.
Is your FAIR repository configured correctly?
Traceback (most recent call last):
  File "/home/hud/projects/pySimpleModel/simpleModel/ext/SEIRSModelRun.py", line 16, in <module>
    initial_parameters = pipeline.link_read(handle, "SEIRS_model/parameters")
  File "/home/hud/.pyenv/versions/3.10.7/lib/python3.10/site-packages/data_pipeline_api/link.py", line 158, in link_read
    id=int(fdp_utils.extract_id(data_product_response[0]["object"])),
IndexError: list index out of range
Error: Executed 'run' command failed with exit code 1

Does the config work out of the box? Or how should this be updated?

@LiamPattinson
Copy link

I also ran into this problem, and though I managed to fix it, it just led to a brand new problem I'm unable to solve. I think the recommendation to run fair init --ci is the culprit, as this sets a lot of default configuration details that can't be easily changed, including setting the registry port to 8001, while fair registry start uses port 8000 by default.

  • Call fair purge to remove the local .fair folder. To remove any of the user data which was set by calling fair init --ci you have to go quite a bit further; I had to rm -rf my ~/.fair folder and reinstall the registry to fix it completely.
  • Restart your registry using fair registry stop --force, fair registry start. Note the address it's running on and the location of the token.
  • Call fair init without the --ci tag. Enter the address and token of the registry when prompted. If you started fresh, you'll also need to set things like user name/email. I set the remote api/data to http://127.0.0.1:8000/api/ and http://127.0.0.1:8000/data/, but I'm unsure if this is correct.

On running fair pull simpleModel/ext/SEIRSconfig.yaml, I now get the following error:

Error: Failed to make registry API request 'https://127.0.0.1:8000/api/namespace/'
Is this remote correct and the server running?

I think the issue is that it's making a request using https instead of http, as http://127.0.0.1:8000/api/namespace appears to work just fine if you open it in a browser. Is this a bug, or have I just configured something wrong? I haven't found anything in the documentation or existing issues about it. I followed some online guides for getting https://localhost to work, but that didn't seem to help.

@LiamPattinson
Copy link

LiamPattinson commented Nov 23, 2022

Never mind, I managed to fix this too. It turned out to be a self-inflicted error I'd introduced while experimenting with SEIRSconfig.yaml. It's now running fine for me. I think the advice in the README needs to be updated so that it doesn't recommend fair init --ci, and otherwise this would be resolved. For me, it still complains that I don't have access permission for https://data.scrc.uk/api/, but you can get around this by setting the remote api address to http://127.0.0.1:8000/api/.

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

No branches or pull requests

2 participants