question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Bug]: Max retries exceeded with url: /v2/models/cancer-classifier/infer

See original GitHub issue

MLRun Version checks

  • I have checked that this issue has not already been reported.

  • I have confirmed this bug exists on the latest version of the MLRun Kit.

Reproducible Example

original 01-mlrun-basics.ipynb, issues see attached jupyter notebook, you can see this error in case of call serving_fn.invoke("/v2/models/cancer-classifier/infer", body=my_data)

Issue Description

in case of call serving_fn.invoke("/v2/models/cancer-classifier/infer", body=my_data) I got

OSError: error: cannot run function at url http://127.0.0.1:54652/v2/models/cancer-classifier/infer, HTTPConnectionPool(host='127.0.0.1', port=54652): Max retries exceeded with url: /v2/models/cancer-classifier/infer (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f175c75b070>: Failed to establish a new connection: [Errno 111] Connection refused'))

see jupyter Uploading 01-mlrun-basics.ipynb.txt…

Expected Behavior

Invoke without this issue, it can have relation to https://github.com/mlrun/mlrun/issues/2102

Python Version

3.8.8

MLRun Version

1.2.0

Additional Information

No response

Issue Analytics

  • State:closed
  • Created 9 months ago
  • Comments:9

github_iconTop GitHub Comments

1reaction
yaronhacommented, Dec 15, 2022

@yaronha , I got the same issue and I used relevant HOST_IP, I am using this setting:

set HOST_IP=127.0.0.1 set SHARED_DIR=c:\mlrun-data mkdir %SHARED_DIR% docker-compose -f “c:\mlrun\compose.with-jupyter.yaml” up

plus I updated version in YAML file to the 1.2.0 and everything works, only last command in tutorial failed.

BTW: Did you tuned it, here #2768 ?

image

you can see the error you had was: OSError: error: cannot run function at url http://127.0.0.1:54652... it cannot reach the address due to the wrong 127.0.0.1 address setting , in my case the address was the host IP (192.168.0.182)

1reaction
yaronhacommented, Dec 15, 2022

@j0terry i answered it in the other issue:

you cannot use 127.0.0.1 (local address), since it will be local to the client container, you need to use the host address which will allow routing to the other containers… in windows you can see that with ipconfig , best to choose a stable address (not using DHCP, e.g. the WSL address), this is clearly explained in the documentation:

Your HOST_IP address can be found using the ipconfig shell command, it is recommended to select an address that does not change dynamically (for example the IP of the vEthernet interface).

for PowerShell:

Your HOST_IP address can be found using the Get-NetIPConfiguration cmdlet, it is recommended to select an address that does not change dynamically (for example the IP of the vEthernet interface).

Read more comments on GitHub >

github_iconTop Results From Across the Web

Max retries exceeded with URL in requests - Stack Overflow
This answer doesn't make sense. OP's error doesn't say "Connection refused", it says "Name or service not known". This answer seems to assume ......
Read more >
Max retries exceeded - Bugs | VMware Flings
I run the script on my workstation. The workstation has access to the Internet, but through a proxy server. The use of the...
Read more >
Why I get complained about "Max retries exceeded with url ...
Solved: We have one very frequent error when my python program called your API-endpoints (get_issues & get_equipment) : Exception Error when ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found