您的位置:首页 > 其它

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

2013-03-28 10:54 471 查看
最近将项目从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命令的完整信息

再次运行通过
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  nexus maven