使用nexus作为maven私有中央仓库,启动出错

最近将项目从ant迁移到maven

并且使用Nexus建立一个私有的中央仓库(网上有很多相关的资料)

在启动nexus的时候报错启动失败,且部分错误信息非nexus打印

错误信息:

********* simple selection *********  ********* selection by list *********
-A all processes                      -C by command name
-N negate selection                   -G by real group ID (supports names)
-a all w/ tty except session leaders  -U by real user ID (supports names)
-d all except session leaders         -g by session OR by effective group name
-e all processes                      -p by process ID
T  all processes on this terminal     -s processes in the sessions given
a  all w/ tty, including other users  -t by tty
g  OBSOLETE -- DO NOT USE             -u by effective user ID (supports names)
r  only running processes             U  processes for specified users
x  processes w/o controlling ttys     t  by tty
*********** output format **********  *********** long options ***********
-o,o user-defined  -f full            --Group --User --pid --cols --ppid
-j,j job control   s  signal          --group --user --sid --rows --info
-O,O preloaded -o  v  virtual memory  --cumulative --format --deselect
-l,l long          u  user-oriented   --sort --tty --forest --version
-F   extra full    X  registers       --heading --no-heading --context
                    ********* misc options *********
-V,V  show version      L  list format codes  f  ASCII art forest
-m,m,-L,-T,H  threads   S  children in sum    -y change -l format
-M,Z  security data     c  true command name  -c scheduling class
-w,w  wide output       n  numeric WCHAN,UID  -H process hierarchy

这是PS命令的提示信息,于是找到nexus启动脚本中使用ps命令的地方,最终发现错误语句为

pidtest=`$PSEXE -p $pid -o args | grep "wrapper.pidfile" | tail -1`

此错误在sentOS上发生,但在ubuntu中能通过运行,估计有可能是和centOS版本太旧有关

因无法在短时间内升级系统版本,所以修改了语句:

pidtest=`$PSEXE -p $pid wwwwwwwwwwwwwww|awk '{for(i=5;i<=NF;++i){printf $i" "}printf "\n"}' | grep "wrapper.pidfile" | tail -1`

把原来-o args的地方替换为awk输出command命令,n个w是输出PS命令的完整信息

再次运行通过




  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值