1
votes

Why might Nexus 2.0 not cache remote artifacts?

Not sure if you can help. And if you can recommend a better place, please inform me.

I downloaded and installed Nexus 2.0 under 64-bit ubuntu. Nexus starts up and is available on default port 8081. I enabled "Download Remote Indexes" for repositories. The "Browse Index" tab for each repository shows the index tree.

However, when I try to hit the repo from a maven goal (e.g. mvn clean) it is unable to find any artifacts in the Nexus 2.0 cache.

$ mvn clean
[INFO] Scanning for projects...
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building Maven Rocks 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
Downloading: http://localhost:8081/nexus/content/groups/public/org/apache/maven/plugins/maven-clean-plugin/2.4.1/maven-clean-plugin-2.4.1.pom
[WARNING] The POM for org.apache.maven.plugins:maven-clean-plugin:jar:2.4.1 is missing, no dependency information available
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.471s
[INFO] Finished at: Wed Feb 29 10:14:06 MST 2012
[INFO] Final Memory: 3M/15M
[INFO] ------------------------------------------------------------------------
[ERROR] Plugin org.apache.maven.plugins:maven-clean-plugin:2.4.1 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-clean-plugin:jar:2.4.1: Could not find artifact org.apache.maven.plugins:maven-clean-plugin:pom:2.4.1 in nexus (http://localhost:8081/nexus/content/groups/public) -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginResolutionException

Nexus 2.0 Central Repository configuration

After setting log level to DEBUG and hitting the nexus server (via mvn clean), the following shows up in the nexus logs (wrapper.log):

jvm 1    | 2012-02-29 10:39:30 DEBUG [lugin-2.4.1.pom] - org.sonatype.nexus.security.StatelessAndStatefulWebSessionManager - Session ID cookie is disabled - session id will not be acquired from a request cookie.
jvm 1    | 2012-02-29 10:39:30 DEBUG [lugin-2.4.1.pom] - org.apache.shiro.session.mgt.DefaultSessionManager - Unable to resolve session ID from SessionKey [org.apache.shiro.web.session.mgt.WebSessionKey@25bfa475].  Returning null to indicate a session could not be found.
jvm 1    | 2012-02-29 10:39:30 DEBUG [lugin-2.4.1.pom] - org.sonatype.nexus.security.filter.authc.NexusSecureHttpAuthenticationFilter - No authorization found (header or request parameter)
jvm 1    | 2012-02-29 10:39:30 DEBUG [lugin-2.4.1.pom] - org.sonatype.nexus.security.filter.authc.NexusSecureHttpAuthenticationFilter - Attempting to authenticate Subject as Anonymous request...
jvm 1    | 2012-02-29 10:39:30 DEBUG [lugin-2.4.1.pom] - org.apache.shiro.authc.credential.SimpleCredentialsMatcher - Performing credentials equality check for tokenCredentials of type [org.apache.shiro.crypto.hash.SimpleHash and accountCredentials of type [org.apache.shiro.crypto.hash.SimpleHash]
jvm 1    | 2012-02-29 10:39:30 DEBUG [lugin-2.4.1.pom] - org.apache.shiro.authc.credential.SimpleCredentialsMatcher - Both credentials arguments can be easily converted to byte arrays.  Performing array equals comparison
jvm 1    | 2012-02-29 10:39:30 DEBUG [lugin-2.4.1.pom] - org.apache.shiro.authc.AbstractAuthenticator - Authentication successful for token [org.apache.shiro.authc.UsernamePasswordToken - anonymous, rememberMe=false].  Returned account [anonymous]
jvm 1    | 2012-02-29 10:39:30 DEBUG [lugin-2.4.1.pom] - org.apache.shiro.subject.support.DefaultSubjectContext - No SecurityManager available in subject context map.  Falling back to SecurityUtils.getSecurityManager() lookup.
jvm 1    | 2012-02-29 10:39:30 DEBUG [lugin-2.4.1.pom] - org.apache.shiro.subject.support.DefaultSubjectContext - No SecurityManager available in subject context map.  Falling back to SecurityUtils.getSecurityManager() lookup.
jvm 1    | 2012-02-29 10:39:30 DEBUG [lugin-2.4.1.pom] - org.sonatype.nexus.security.StatelessAndStatefulWebSessionManager - Stateless client session 8887af7f-97b8-46e1-ad59-2b311dcc97e3 is not persisted.
jvm 1    | 2012-02-29 10:39:30 DEBUG [lugin-2.4.1.pom] - org.sonatype.nexus.security.StatelessAndStatefulWebSessionManager - Session ID cookie is disabled.  No cookie has been set for new session with id 8887af7f-97b8-46e1-ad59-2b311dcc97e3
jvm 1    | 2012-02-29 10:39:30 DEBUG [lugin-2.4.1.pom] - org.apache.shiro.web.servlet.SimpleCookie - Added HttpServletResponse Cookie [rememberMe=deleteMe; Path=/nexus; Max-Age=0; Expires=Tue, 28-Feb-2012 17:39:30 GMT]
jvm 1    | 2012-02-29 10:39:30 DEBUG [lugin-2.4.1.pom] - org.apache.shiro.mgt.AbstractRememberMeManager - AuthenticationToken did not indicate RememberMe is requested.  RememberMe functionality will not be executed for corresponding account.
jvm 1    | 2012-02-29 10:39:30 DEBUG [lugin-2.4.1.pom] - org.sonatype.nexus.security.filter.authc.NexusSecureHttpAuthenticationFilter - Successfully logged in as anonymous
jvm 1    | 2012-02-29 10:39:30 DEBUG [lugin-2.4.1.pom] - org.sonatype.plexus.appevents.SimpleApplicationEventMulticaster - Notifying 23 EventListener about event org.sonatype.nexus.auth.NexusAuthenticationEvent fired (org.sonatype.nexus.auth.NexusAuthenticationEvent@48c610af)
jvm 1    | 2012-02-29 10:39:30 DEBUG [lugin-2.4.1.pom] - org.sonatype.sisu.goodies.eventbus.internal.DefaultEventBus - Event 'org.sonatype.nexus.auth.NexusAuthenticationEvent@48c610af' fired
jvm 1    | 2012-02-29 10:39:30 DEBUG [lugin-2.4.1.pom] - org.sonatype.nexus.proxy.maven.maven2.M2GroupRepository - getTargetsForRequest() :: public:/org/apache/maven/plugins/maven-clean-plugin/2.4.1/maven-clean-plugin-2.4.1.pom
jvm 1    | 2012-02-29 10:39:30 DEBUG [lugin-2.4.1.pom] - org.sonatype.nexus.proxy.target.DefaultTargetRegistry - Resolving targets for repository='public' for path='/org/apache/maven/plugins/maven-clean-plugin/2.4.1/maven-clean-plugin-2.4.1.pom'
jvm 1    | 2012-02-29 10:39:30 DEBUG [lugin-2.4.1.pom] - org.sonatype.nexus.proxy.access.DefaultNexusItemAuthorizer - Checking isPermitted() with perms: [nexus:target:1:public:read, nexus:target:any:public:read, nexus:target:3:public:read]
jvm 1    | 2012-02-29 10:39:30 DEBUG [lugin-2.4.1.pom] - org.sonatype.nexus.rest.ContentPlexusResource - Created ResourceStore request for /groups/public/org/apache/maven/plugins/maven-clean-plugin/2.4.1/maven-clean-plugin-2.4.1.pom
jvm 1    | 2012-02-29 10:39:30 DEBUG [lugin-2.4.1.pom] - org.sonatype.nexus.proxy.maven.maven2.M2GroupRepository - getTargetsForRequest() :: public:/org/apache/maven/plugins/maven-clean-plugin/2.4.1/maven-clean-plugin-2.4.1.pom
jvm 1    | 2012-02-29 10:39:30 DEBUG [lugin-2.4.1.pom] - org.sonatype.nexus.proxy.target.DefaultTargetRegistry - Resolving targets for repository='public' for path='/org/apache/maven/plugins/maven-clean-plugin/2.4.1/maven-clean-plugin-2.4.1.pom'
jvm 1    | 2012-02-29 10:39:30 DEBUG [lugin-2.4.1.pom] - org.sonatype.nexus.proxy.access.DefaultNexusItemAuthorizer - Checking isPermitted() with perms: [nexus:target:any:public:read, nexus:target:1:public:read, nexus:target:3:public:read]
jvm 1    | 2012-02-29 10:39:30 DEBUG [lugin-2.4.1.pom] - org.sonatype.nexus.proxy.maven.maven2.M2GroupRepository - public.retrieveItem() :: /org/apache/maven/plugins/maven-clean-plugin/2.4.1/maven-clean-plugin-2.4.1.pom
jvm 1    | 2012-02-29 10:39:30 DEBUG [lugin-2.4.1.pom] - org.sonatype.nexus.proxy.storage.local.fs.DefaultFSLocalRepositoryStorage - /org/apache/maven/plugins/maven-clean-plugin/2.4.1/maven-clean-plugin-2.4.1.pom --> /opt/sonatype/nexus-2.0/./../sonatype-work/nexus/storage/public/org/apache/maven/plugins/maven-clean-plugin/2.4.1/maven-clean-plugin-2.4.1.pom
jvm 1    | 2012-02-29 10:39:30 DEBUG [lugin-2.4.1.pom] - org.sonatype.nexus.proxy.maven.maven2.M2GroupRepository - Item /org/apache/maven/plugins/maven-clean-plugin/2.4.1/maven-clean-plugin-2.4.1.pom not found in local storage.
jvm 1    | 2012-02-29 10:39:30 DEBUG [lugin-2.4.1.pom] - org.sonatype.nexus.proxy.mapping.DefaultRequestRepositoryMapper - No mapping exists for request path [/org/apache/maven/plugins/maven-clean-plugin/2.4.1/maven-clean-plugin-2.4.1.pom]
jvm 1    | 2012-02-29 10:39:30 DEBUG [lugin-2.4.1.pom] - org.sonatype.nexus.proxy.maven.maven2.M2Repository - releases.retrieveItem() :: /org/apache/maven/plugins/maven-clean-plugin/2.4.1/maven-clean-plugin-2.4.1.pom
jvm 1    | 2012-02-29 10:39:30 DEBUG [lugin-2.4.1.pom] - org.sonatype.nexus.proxy.maven.maven2.M2Repository - /org/apache/maven/plugins/maven-clean-plugin/2.4.1/maven-clean-plugin-2.4.1.pom :: localOnly=false, remoteOnly=false
jvm 1    | 2012-02-29 10:39:30 DEBUG [lugin-2.4.1.pom] - org.sonatype.nexus.proxy.storage.local.fs.DefaultFSLocalRepositoryStorage - /org/apache/maven/plugins/maven-clean-plugin/2.4.1/maven-clean-plugin-2.4.1.pom --> /opt/sonatype/nexus-2.0/./../sonatype-work/nexus/storage/releases/org/apache/maven/plugins/maven-clean-plugin/2.4.1/maven-clean-plugin-2.4.1.pom
jvm 1    | 2012-02-29 10:39:30 DEBUG [lugin-2.4.1.pom] - org.sonatype.nexus.proxy.maven.maven2.M2Repository - Item /org/apache/maven/plugins/maven-clean-plugin/2.4.1/maven-clean-plugin-2.4.1.pom not found in local storage.
jvm 1    | 2012-02-29 10:39:30 DEBUG [lugin-2.4.1.pom] - org.sonatype.nexus.proxy.maven.maven2.M2Repository - releases retrieveItem() :: NOT FOUND releases:/org/apache/maven/plugins/maven-clean-plugin/2.4.1/maven-clean-plugin-2.4.1.pom
jvm 1    | 2012-02-29 10:39:30 DEBUG [lugin-2.4.1.pom] - org.sonatype.nexus.proxy.maven.maven2.M2Repository - snapshots.retrieveItem() :: /org/apache/maven/plugins/maven-clean-plugin/2.4.1/maven-clean-plugin-2.4.1.pom
jvm 1    | 2012-02-29 10:39:30 DEBUG [lugin-2.4.1.pom] - org.sonatype.nexus.proxy.maven.maven2.M2Repository - The serving of item /org/apache/maven/plugins/maven-clean-plugin/2.4.1/maven-clean-plugin-2.4.1.pom is forbidden by Maven repository policy.
jvm 1    | 2012-02-29 10:39:30 DEBUG [lugin-2.4.1.pom] - org.sonatype.nexus.proxy.maven.maven2.M2Repository - snapshots retrieveItem() :: NOT FOUND snapshots:/org/apache/maven/plugins/maven-clean-plugin/2.4.1/maven-clean-plugin-2.4.1.pom
jvm 1    | 2012-02-29 10:39:30 DEBUG [lugin-2.4.1.pom] - org.sonatype.nexus.proxy.maven.maven2.M2Repository - thirdparty.retrieveItem() :: /org/apache/maven/plugins/maven-clean-plugin/2.4.1/maven-clean-plugin-2.4.1.pom
jvm 1    | 2012-02-29 10:39:30 DEBUG [lugin-2.4.1.pom] - org.sonatype.nexus.proxy.maven.maven2.M2Repository - /org/apache/maven/plugins/maven-clean-plugin/2.4.1/maven-clean-plugin-2.4.1.pom :: localOnly=false, remoteOnly=false
jvm 1    | 2012-02-29 10:39:30 DEBUG [lugin-2.4.1.pom] - org.sonatype.nexus.proxy.storage.local.fs.DefaultFSLocalRepositoryStorage - /org/apache/maven/plugins/maven-clean-plugin/2.4.1/maven-clean-plugin-2.4.1.pom --> /opt/sonatype/nexus-2.0/./../sonatype-work/nexus/storage/thirdparty/org/apache/maven/plugins/maven-clean-plugin/2.4.1/maven-clean-plugin-2.4.1.pom
jvm 1    | 2012-02-29 10:39:30 DEBUG [lugin-2.4.1.pom] - org.sonatype.nexus.proxy.maven.maven2.M2Repository - Item /org/apache/maven/plugins/maven-clean-plugin/2.4.1/maven-clean-plugin-2.4.1.pom not found in local storage.
jvm 1    | 2012-02-29 10:39:30 DEBUG [lugin-2.4.1.pom] - org.sonatype.nexus.proxy.maven.maven2.M2Repository - thirdparty retrieveItem() :: NOT FOUND thirdparty:/org/apache/maven/plugins/maven-clean-plugin/2.4.1/maven-clean-plugin-2.4.1.pom
jvm 1    | 2012-02-29 10:39:30 DEBUG [lugin-2.4.1.pom] - org.sonatype.nexus.proxy.maven.maven2.M2Repository - central.retrieveItem() :: /org/apache/maven/plugins/maven-clean-plugin/2.4.1/maven-clean-plugin-2.4.1.pom
jvm 1    | 2012-02-29 10:39:30 DEBUG [lugin-2.4.1.pom] - org.sonatype.nexus.proxy.maven.maven2.M2Repository - /org/apache/maven/plugins/maven-clean-plugin/2.4.1/maven-clean-plugin-2.4.1.pom :: localOnly=false, remoteOnly=false, ProxyMode=BLOCKED_MANUAL
jvm 1    | 2012-02-29 10:39:30 DEBUG [lugin-2.4.1.pom] - org.sonatype.nexus.proxy.storage.local.fs.DefaultFSLocalRepositoryStorage - /org/apache/maven/plugins/maven-clean-plugin/2.4.1/maven-clean-plugin-2.4.1.pom --> /opt/sonatype/sonatype-work/nexus/storage/central/org/apache/maven/plugins/maven-clean-plugin/2.4.1/maven-clean-plugin-2.4.1.pom
jvm 1    | 2012-02-29 10:39:30 DEBUG [lugin-2.4.1.pom] - org.sonatype.nexus.proxy.maven.maven2.M2Repository - Item /org/apache/maven/plugins/maven-clean-plugin/2.4.1/maven-clean-plugin-2.4.1.pom not found in local storage.
jvm 1    | 2012-02-29 10:39:30 DEBUG [lugin-2.4.1.pom] - org.sonatype.nexus.proxy.storage.local.fs.DefaultFSLocalRepositoryStorage - /org/apache/maven/plugins/maven-clean-plugin/2.4.1/maven-clean-plugin-2.4.1.pom --> /opt/sonatype/sonatype-work/nexus/storage/central/org/apache/maven/plugins/maven-clean-plugin/2.4.1/maven-clean-plugin-2.4.1.pom
jvm 1    | 2012-02-29 10:39:30 DEBUG [lugin-2.4.1.pom] - org.sonatype.nexus.proxy.maven.maven2.M2Repository - Item /org/apache/maven/plugins/maven-clean-plugin/2.4.1/maven-clean-plugin-2.4.1.pom not found in local storage.
jvm 1    | 2012-02-29 10:39:30 DEBUG [lugin-2.4.1.pom] - org.sonatype.nexus.proxy.maven.maven2.M2Repository - Item /org/apache/maven/plugins/maven-clean-plugin/2.4.1/maven-clean-plugin-2.4.1.pom does not exist locally and cannot go remote, throwing ItemNotFoundException.
jvm 1    | 2012-02-29 10:39:30 DEBUG [lugin-2.4.1.pom] - org.sonatype.nexus.proxy.maven.maven2.M2Repository - central retrieveItem() :: NOT FOUND central:/org/apache/maven/plugins/maven-clean-plugin/2.4.1/maven-clean-plugin-2.4.1.pom
jvm 1    | 2012-02-29 10:39:30 DEBUG [lugin-2.4.1.pom] - org.sonatype.nexus.proxy.maven.maven2.M2Repository - Proxy repository 'central' is is not allowed to issue remote requests (BLOCKED_MANUAL), not adding path '/org/apache/maven/plugins/maven-clean-plugin/2.4.1/maven-clean-plugin-2.4.1.pom' to NFC
jvm 1    | 2012-02-29 10:39:30 DEBUG [lugin-2.4.1.pom] - org.sonatype.nexus.proxy.maven.maven2.M2Repository - apache-snapshots.retrieveItem() :: /org/apache/maven/plugins/maven-clean-plugin/2.4.1/maven-clean-plugin-2.4.1.pom
jvm 1    | 2012-02-29 10:39:30 DEBUG [lugin-2.4.1.pom] - org.sonatype.nexus.proxy.maven.maven2.M2Repository - The path /org/apache/maven/plugins/maven-clean-plugin/2.4.1/maven-clean-plugin-2.4.1.pom is in NFC and still active, throwing ItemNotFoundException.
jvm 1    | 2012-02-29 10:39:30 DEBUG [lugin-2.4.1.pom] - org.sonatype.nexus.proxy.maven.maven2.M2Repository - codehaus-snapshots.retrieveItem() :: /org/apache/maven/plugins/maven-clean-plugin/2.4.1/maven-clean-plugin-2.4.1.pom
jvm 1    | 2012-02-29 10:39:30 DEBUG [lugin-2.4.1.pom] - org.sonatype.nexus.proxy.maven.maven2.M2Repository - The path /org/apache/maven/plugins/maven-clean-plugin/2.4.1/maven-clean-plugin-2.4.1.pom is in NFC and still active, throwing ItemNotFoundException.
jvm 1    | 2012-02-29 10:39:30 DEBUG [lugin-2.4.1.pom] - org.sonatype.nexus.proxy.maven.maven2.M2GroupRepository - public retrieveItem() :: NOT FOUND public:/org/apache/maven/plugins/maven-clean-plugin/2.4.1/maven-clean-plugin-2.4.1.pom
jvm 1    | 2012-02-29 10:39:30 ERROR [lugin-2.4.1.pom] - org.sonatype.nexus.rest.ContentPlexusResource - Got exception during processing request "GET http://localhost:8081/nexus/content/groups/public/org/apache/maven/plugins/maven-clean-plugin/2.4.1/maven-clean-plugin-2.4.1.pom": Item not found on path "/org/apache/maven/plugins/maven-clean-plugin/2.4.1/maven-clean-plugin-2.4.1.pom" in repository "public"!
jvm 1    | 2012-02-29 10:39:30 DEBUG [lugin-2.4.1.pom] - org.sonatype.plexus.appevents.SimpleApplicationEventMulticaster - Notifying 23 EventListener about event org.sonatype.nexus.log.internal.LogbackLoggingEvent fired (LogbackLoggingEvent [level=ERROR, message=Got exception during processing request "GET http://localhost:8081/nexus/content/groups/public/org/apache/maven/plugins/maven-clean-plugin/2.4.1/maven-clean-plugin-2.4.1.pom": Item not found on path "/org/apache/maven/plugins/maven-clean-plugin/2.4.1/maven-clean-plugin-2.4.1.pom" in repository "public"!, ])
jvm 1    | 2012-02-29 10:39:30 DEBUG [lugin-2.4.1.pom] - org.sonatype.sisu.goodies.eventbus.internal.DefaultEventBus - Event 'LogbackLoggingEvent [level=ERROR, message=Got exception during processing request "GET http://localhost:8081/nexus/content/groups/public/org/apache/maven/plugins/maven-clean-plugin/2.4.1/maven-clean-plugin-2.4.1.pom": Item not found on path "/org/apache/maven/plugins/maven-clean-plugin/2.4.1/maven-clean-plugin-2.4.1.pom" in repository "public"!, ]' fired

Analyze on Central shows zero Open Source?

Nexus 2.0 Analyze on Central shows 0 Open Source?

1
If you look at the screen shot you will see that the "Repository Status" is "In Service - Remote Manually Blocked...". This can happen if you right-click on a repository (while logged in as an Administrator) and you select "Block Proxy". You can re-enable by right-click and select "Allow Proxy" from same popup menu. - John Kroubalkian

1 Answers

0
votes

When you bring up the Repositories view in Nexus 2.0, depending on the screen real estate you have, there is a possibility that a portion of a column's data could be clipped. In that event, relevant data is obscured. In the case in question here, the "Repository Status" column was clipped to the point where the column simply said "In Service". By widening the column it became clear that there were extenuating circumstances. Namely, "- Remote Manually Blocked...".

This can happen if you right-click on a repository (while logged in as an Administrator) and you select "Block Proxy".

You can re-enable by right-click and select "Allow Proxy" from same popup menu.