nexus-repository-conan icon indicating copy to clipboard operation
nexus-repository-conan copied to clipboard

Conan hosted repository not working

Open f18m opened this issue 4 years ago • 1 comments

What are you trying to do?

I would like to host my own Conan repository in my Nexus. I'm using NRM OSS version 3.22.1 and I have enabled in the "nexus.properties" file the setting "nexus.conan.hosted.enabled=true". I was able to create a hosted repository in Nexus and I configured it in my "conan 1.29.0" client. However the upload of any package to my hosted repository always fails with an error like

ERROR: openssl/1.1.1g: Upload recipe to 'nexus_nossl' failed: invalid literal for int() with base 10: ''. [Remote: nexus_nossl]

Procedure to reproduce the problem

  1. on my Linux client I generated a "conanfile.txt" containing:
[requires]
openssl/1.1.1g
  1. I download from "conan-center" such Conan package by running "install" command against the conanfile.txt generated in step 1; this of course works:
# conan install .
Configuration:
[settings]
arch=x86_64
arch_build=x86_64
build_type=Release
compiler=gcc
compiler.libcxx=libstdc++11
compiler.version=8
os=Linux
os_build=Linux
[options]
[build_requires]
[env]

openssl/1.1.1g: Not found in local cache, looking in remotes...
openssl/1.1.1g: Trying with 'conan-center'...
Downloading conanmanifest.txt completed [0.17k]                                          
Downloading conanfile.py completed [33.42k]                                              
Downloading conan_export.tgz completed [0.24k]                                           
Decompressing conan_export.tgz completed [0.00k]                                         
openssl/1.1.1g: Downloaded recipe revision 0
conanfile.txt: Installing package
Requirements
    openssl/1.1.1g from 'conan-center' - Downloaded
Packages
    openssl/1.1.1g:1d877a3df840030e6a8abb74c5ffb9088d08b47a - Download

Installing (downloading, building) binaries...
openssl/1.1.1g: Retrieving package 1d877a3df840030e6a8abb74c5ffb9088d08b47a from remote 'conan-center' 
Downloading conanmanifest.txt completed [6.22k]                                          
Downloading conaninfo.txt completed [1.00k]                                              
Downloading conan_package.tgz completed [3904.34k]                                       
Decompressing conan_package.tgz completed [0.00k]                                        
openssl/1.1.1g: Package installed 1d877a3df840030e6a8abb74c5ffb9088d08b47a
openssl/1.1.1g: Downloaded package revision 0
conanfile.txt: Generator txt created conanbuildinfo.txt
conanfile.txt: Generated conaninfo.txt
conanfile.txt: Generated graphinfo
  1. I try to re-upload such package (not created by me so I assume the package is just fine as it's hosted and works fine on the Conan center) on my Nexus hosted repository:
# conan remote list
conan-center: https://conan.bintray.com [Verify SSL: True]
nexus_ssl: http://repo-billerica.perform.empirix.com:8081/repository/ecc-eva-devel-conan/ [Verify SSL: True]
nexus_nossl: http://repo-billerica.perform.empirix.com:8081/repository/ecc-eva-devel-conan/ [Verify SSL: False]


# conan user -r nexus_ssl developer
User of remote 'nexus_ssl' is already 'developer'
# conan user -r nexus_nossl developer
User of remote 'nexus_nossl' is already 'developer'


# conan upload -r nexus_ssl openssl/1.1.1g
Are you sure you want to upload 'openssl/1.1.1g' to 'nexus_ssl'? (yes/no): yes
Uploading to remote 'nexus_ssl':
Uploading openssl/1.1.1g to remote 'nexus_ssl'                                           
Downloading conan_sources.tgz completed [0.46k]                                          
Decompressing conan_sources.tgz completed [0.00k]                                        
Compressing conan_export.tgz completed [1 files]                                         
Compressing conan_sources.tgz completed [1 files]                                        
ERROR: openssl/1.1.1g: Upload recipe to 'nexus_ssl' failed: invalid literal for int() with base 10: ''. [Remote: nexus_ssl]

ERROR: Errors uploading some packages

Same issue if I try to upload against my Nexus hosted repository having SSL check disabled:

# conan upload -r nexus_nossl openssl/1.1.1g
Are you sure you want to upload 'openssl/1.1.1g' to 'nexus_nossl'? (yes/no): yes
Uploading to remote 'nexus_nossl':
Uploading openssl/1.1.1g to remote 'nexus_nossl'                                         
ERROR: openssl/1.1.1g: Upload recipe to 'nexus_nossl' failed: invalid literal for int() with base 10: ''. [Remote: nexus_nossl]

ERROR: Errors uploading some packages
  1. note that the upload works just fine if instead of uploading to Nexus I upload that package to an Artifactory repository I have access to:
# conan upload -r artifactory openssl/1.1.1g
Are you sure you want to upload 'openssl/1.1.1g' to 'artifactory'? (yes/no): yes
Uploading to remote 'artifactory':
Uploading openssl/1.1.1g to remote 'artifactory'                                         
Uploaded conan_export.tgz -> openssl/1.1.1g [0.24k]                                      
Uploaded conan_sources.tgz -> openssl/1.1.1g [0.46k]                                     
Uploaded conanfile.py -> openssl/1.1.1g [33.42k]                                         
Uploaded conanmanifest.txt -> openssl/1.1.1g [0.17k]                                     
Uploaded conan recipe 'openssl/1.1.1g' to 'artifactory': https://empirixartifactory.jfrog.io/artifactory/api/conan/conan-local/

So the problem has to be on the Nexus hosted repository implementation...

f18m avatar Sep 04 '20 16:09 f18m

Hi, we are moving Conan source code to the nexus public. This Github page will be archived. Your issue https://issues.sonatype.org/browse/NEXUS-25216

Mykyta avatar Sep 09 '20 10:09 Mykyta