conan-io / training

(Deprecated) Support code for conan 1.X trainings

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Artifactory local server failing to connect

jhill515 opened this issue · comments

I am on Exercise: Upload to Artifactory. Each time I attempt to upload the hello* packages, I am met with a failure stating that it failed to establish a new connection (Errno 111). I'm not sure what I'm doing wrong or how to resolve the issue. Here's a terminal listing of the issues I have:

conan@f029d1791cf7:~/training$ conan remote add artifactory http://localhost:8082
conan@f029d1791cf7:~/training$ conan remote list
conancenter: https://center.conan.io [Verify SSL: True]
artifactory: http://localhost:8082 [Verify SSL: True]
conan@f029d1791cf7:~/training$ conan upload "hello*" -r artifactory
Are you sure you want to upload 'hello/0.1@user/testing' to 'artifactory'? (yes/no): yes
Uploading to remote 'artifactory':
Uploading hello/0.1@user/testing to remote 'artifactory'                                 
Compressing conan_sources.tgz completed [3 files]                                        
ERROR: hello/0.1@user/testing: Upload recipe to 'artifactory' failed: HTTPConnectionPool(host='localhost', port=8082): Max retries exceeded with url: /v1/ping (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7ffb282449d0>: Failed to establish a new connection: [Errno 111] Connection refused'))

Unable to connect to artifactory=http://localhost:8082
1. Make sure the remote is reachable or,
2. Disable it by using conan remote disable,
Then try again.

ERROR: Errors uploading some packages
conan@f029d1791cf7:~/training$ conan remote remove artifactory
conan@f029d1791cf7:~/training$ conan remote add artifactory http://localhost
conan@f029d1791cf7:~/training$ conan upload "hello*" -r artifactory
Are you sure you want to upload 'hello/0.1@user/testing' to 'artifactory'? (yes/no): yes
Uploading to remote 'artifactory':
Uploading hello/0.1@user/testing to remote 'artifactory'                                 
ERROR: hello/0.1@user/testing: Upload recipe to 'artifactory' failed: HTTPConnectionPool(host='localhost', port=80): Max retries exceeded with url: /v1/ping (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7fcf19a3f350>: Failed to establish a new connection: [Errno 111] Connection refused'))

Unable to connect to artifactory=http://localhost
1. Make sure the remote is reachable or,
2. Disable it by using conan remote disable,
Then try again.

ERROR: Errors uploading some packages
conan@f029d1791cf7:~/training$ conan remote remove artifactory
conan@f029d1791cf7:~/training$ conan remote add artifactory http://localhost:8082/artifactory
conan@f029d1791cf7:~/training$ conan upload "hello*" -r artifactory
Are you sure you want to upload 'hello/0.1@user/testing' to 'artifactory'? (yes/no): yes
Uploading to remote 'artifactory':
Uploading hello/0.1@user/testing to remote 'artifactory'                                 
ERROR: hello/0.1@user/testing: Upload recipe to 'artifactory' failed: HTTPConnectionPool(host='localhost', port=8082): Max retries exceeded with url: /artifactory/v1/ping (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f672e659110>: Failed to establish a new connection: [Errno 111] Connection refused'))

Unable to connect to artifactory=http://localhost:8082/artifactory
1. Make sure the remote is reachable or,
2. Disable it by using conan remote disable,
Then try again.

ERROR: Errors uploading some packages
conan@f029d1791cf7:~/training$ conan remote remove artifactory
conan@f029d1791cf7:~/training$ conan remote add artifactory http://localhost/artifactory
conan@f029d1791cf7:~/training$ conan upload "hello*" -r artifactory
Are you sure you want to upload 'hello/0.1@user/testing' to 'artifactory'? (yes/no): yes
Uploading to remote 'artifactory':
Uploading hello/0.1@user/testing to remote 'artifactory'                                 
ERROR: hello/0.1@user/testing: Upload recipe to 'artifactory' failed: HTTPConnectionPool(host='localhost', port=80): Max retries exceeded with url: /artifactory/v1/ping (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7fe469f61f50>: Failed to establish a new connection: [Errno 111] Connection refused'))

Unable to connect to artifactory=http://localhost/artifactory
1. Make sure the remote is reachable or,
2. Disable it by using conan remote disable,
Then try again.

ERROR: Errors uploading some packages
commented

Hi @jhill515

A couple of preliminary notes:

  • Have you realized the warnings in the training (academy) that this course is deprecated? It is about Conan 1.X, and also uses deprecated features in Conan 1.X, not even using the recommended integrations like CMakeDeps.
  • We have done the "training" equivalent a "tutorial" in the docs 2.0, if you want to check it: https://docs.conan.io/2/tutorial.html

Regarding Artifactory it is possible that docker didn't boot it up correctly. I guess that you cannot navigate to the URL in your browser http://localhost:8082? What is being shown? If there are any traces of the docker-compose, that might help.

commented

Reading carefully the logs it seems you did:

conan remote add artifactory http://localhost

Which is incorrect. You need to define the whole URL that Artifactory provides in the "Set me up" for the Conan repository. I hope the video explanations help with that, but let us know.