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

Nexus repository create error #122

Open
Chris-luiz-16 opened this issue Oct 17, 2023 · 0 comments
Open

Nexus repository create error #122

Chris-luiz-16 opened this issue Oct 17, 2023 · 0 comments

Comments

@Chris-luiz-16
Copy link

While I'm trying to create a repository using nexus3-cli, I'm getting the below error

[root@nexuscloud ~]# nexus3 repository create proxy yum --strict-content --health-check mysql-chris-test http://mysql-chris-test.com
/usr/local/lib/python3.9/site-packages/nexuscli/nexus_http.py:109: UserWarning: Nexus server version cannot be parsed: nginx
  warnings.warn(f'Nexus server version cannot be parsed: {server}')
Traceback (most recent call last):
  File "/usr/local/bin/nexus3", line 8, in <module>
    sys.exit(nexus_cli())
  File "/usr/local/lib/python3.9/site-packages/click/core.py", line 1157, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python3.9/site-packages/click/core.py", line 1078, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python3.9/site-packages/click/core.py", line 1688, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/lib/python3.9/site-packages/click/core.py", line 1688, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/lib/python3.9/site-packages/click/core.py", line 1688, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  [Previous line repeated 1 more time]
  File "/usr/local/lib/python3.9/site-packages/click/core.py", line 1434, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python3.9/site-packages/click/core.py", line 783, in invoke
    return __callback(*args, **kwargs)
  File "/usr/local/lib/python3.9/site-packages/click/decorators.py", line 33, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/usr/local/lib/python3.9/site-packages/nexuscli/cli/util.py", line 39, in command
    return click_command(ctx, **kwargs)
  File "/usr/local/lib/python3.9/site-packages/nexuscli/cli/__init__.py", line 345, in repository_create_proxy_yum
    _create_repository(ctx, 'proxy', **kwargs)
  File "/usr/local/lib/python3.9/site-packages/nexuscli/cli/__init__.py", line 160, in _create_repository
    subcommand_repository.cmd_create(ctx, repo_type=repo_type, **kwargs)
  File "/usr/local/lib/python3.9/site-packages/nexuscli/cli/subcommand_repository.py", line 29, in cmd_create
    nexus_client.repositories.create(r)
  File "/usr/local/lib/python3.9/site-packages/nexuscli/api/repository/collection.py", line 275, in create
    resp = self.run_script(self._script_create, data=script_args)
  File "/usr/local/lib/python3.9/site-packages/nexuscli/api/base_collection.py", line 51, in run_script
    raise exception.NexusClientAPIError(resp.content)
  File "/usr/local/lib/python3.9/site-packages/nexuscli/exception.py", line 90, in __init__
    _raise_if_error_is_mapped(message_bytes)
  File "/usr/local/lib/python3.9/site-packages/nexuscli/exception.py", line 75, in _raise_if_error_is_mapped
    raise TypeError(f'Unrecognised Nexus error response: {nexus_response}') from None
TypeError: Unrecognised Nexus error response: {'name': 'nexus3-cli-repository-create', 'result': "org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:\nScript16.groovy: 4: unable to resolve class org.sonatype.nexus.repository.storage.WritePolicy\n @ line 4, column 1.\n   import org.sonatype.nexus.repository.storage.WritePolicy\n   ^\n\nScript16.groovy: 43: You cannot create an instance from the abstract interface 'org.sonatype.nexus.repository.config.Configuration'.\n @ line 43, column 26.\n       Configuration conf = new Configuration(\n                            ^\n\n2 errors\n"}

My details of the server as follow

NAME="Rocky Linux"
VERSION="8.8 (Green Obsidian)"
ID="rocky"
ID_LIKE="rhel centos fedora"
VERSION_ID="8.8"
PLATFORM_ID="platform:el8"
PRETTY_NAME="Rocky Linux 8.8 (Green Obsidian)"
ANSI_COLOR="0;32"
LOGO="fedora-logo-icon"
CPE_NAME="cpe:/o:rocky:rocky:8:GA"
HOME_URL="https://rockylinux.org/"
BUG_REPORT_URL="https://bugs.rockylinux.org/"
SUPPORT_END="2029-05-31"
ROCKY_SUPPORT_PRODUCT="Rocky-Linux-8"
ROCKY_SUPPORT_PRODUCT_VERSION="8.8"
REDHAT_SUPPORT_PRODUCT="Rocky Linux"
REDHAT_SUPPORT_PRODUCT_VERSION="8.8"
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

1 participant