org.sonatype.nexus.repository.httpbridge.internal.ViewServlet - Failure servicing: PUT /repository/maven-snapshots
Cannot put key value entry in index
...
Caused by: java.lang.NullPointerException: null
at com.orientechnologies.orient.core.db.record.ridbag.sbtree.OIndexRIDContainerSBTree.<init>(OIndexRIDContainerSBTree.java:88)
This is a solution of a common problem with Nexus Docker repositories. The administrator has to expose port for "pull", another port for "push", other ports for each hosted repository. This solution is about leveraging Nginx reverse proxy to avoid using these ports.
Given :
- Nexus hostname is "nexus.example.com"
- Nexus web port is 8081
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import org.sonatype.nexus.repository.storage.Component | |
import org.sonatype.nexus.repository.storage.StorageFacet; | |
def retentionCount = 15 | |
def repositoryName = 'releases' | |
def dryRun = true | |
log.info("Cleanup script started! Dry Run Mode: $dryRun"); | |
def repo = repository.repositoryManager.get(repositoryName); | |
def tx = repo.facet(StorageFacet.class).txSupplier().get(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Gawk version | |
# Remote | |
grep -v "rem_address" /proc/net/tcp | awk '{x=strtonum("0x"substr($3,index($3,":")-2,2)); for (i=5; i>0; i-=2) x = x"."strtonum("0x"substr($3,i,2))}{print x":"strtonum("0x"substr($3,index($3,":")+1,4))}' | |
# Local | |
grep -v "rem_address" /proc/net/tcp | awk '{x=strtonum("0x"substr($2,index($2,":")-2,2)); for (i=5; i>0; i-=2) x = x"."strtonum("0x"substr($2,i,2))}{print x":"strtonum("0x"substr($2,index($2,":")+1,4))}' | |
# No Gawk | |
# Local | |
grep -v "rem_address" /proc/net/tcp | awk 'function hextodec(str,ret,n,i,k,c){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.awt.*; | |
import java.awt.event.*; | |
import javax.swing.*; | |
import javax.swing.event.*; | |
import javax.swing.text.html.*; | |
public class SwingHTMLBrowser extends JFrame implements ActionListener, HyperlinkListener { | |
private JTextField addressBar; | |
private JEditorPane pane; |