开发者社区 问答 正文

ubuntu 16.04 64安装nexus之后,浏览器访问不到

1、下面是我的服务器的打印信息:
=========================================start
root@iZm5e1pa0vrgjahri60th8Z:~# lsof -i:8081
COMMAND  PID USER   FD   TYPE DEVICE SIZE/OFF NODE NAME
java    1231 root  717u  IPv4  18563      0t0  TCP *:tproxy (LISTEN)
root@iZm5e1pa0vrgjahri60th8Z:~# ps -ef |grep nexus
root      1231     1  0 16:54 ?        00:02:07 /usr/local/java/jdk1.8.0_161/bin/java -server -Dinstall4j.jvmDir=/usr/local/java/jdk1.8.0_161 -Dexe4j.moduleName=/usr/nexus/nexus-3.9.0-01/bin/nexus -XX:+UnlockDiagnosticVMOptions -Dinstall4j.launcherId=245 -Dinstall4j.swt=false -Di4jv=0 -Di4jv=0 -Di4jv=0 -Di4jv=0 -Di4jv=0 -Xms64M -Xmx512M -XX:MaxDirectMemorySize=512M -XX:+UnlockDiagnosticVMOptions -XX:+UnsyncloadClass -XX:+LogVMOutput -XX:LogFile=../sonatype-work/nexus3/log/jvm.log -XX:-OmitStackTraceInFastThrow -Djava.net.preferIPv4Stack=true -Dkaraf.home=. -Dkaraf.base=. -Dkaraf.etc=etc/karaf -Djava.util.logging.config.file=etc/karaf/java.util.logging.properties -Dkaraf.data=../sonatype-work/nexus3 -Djava.io.tmpdir=../sonatype-work/nexus3/tmp -Dkaraf.startLocalConsole=false -Di4j.vpt=true -classpath /usr/nexus/nexus-3.9.0-01/.install4j/i4jruntime.jar:/usr/nexus/nexus-3.9.0-01/lib/boot/nexus-main.jar:/usr/nexus/nexus-3.9.0-01/lib/boot/org.apache.karaf.main-4.0.9.jar:/usr/nexus/nexus-3.9.0-01/lib/boot/org.osgi.core-6.0.0.jar:/usr/nexus/nexus-3.9.0-01/lib/boot/org.apache.karaf.diagnostic.boot-4.0.9.jar:/usr/nexus/nexus-3.9.0-01/lib/boot/org.apache.karaf.jaas.boot-4.0.9.jar com.install4j.runtime.launcher.UnixLauncher start 9d17dc87   org.sonatype.nexus.karaf.NexusMain
root      1653  1576  0 20:52 pts/0    00:00:00 grep --color=auto nexus
root@iZm5e1pa0vrgjahri60th8Z:~#
=========================================end


看了下nexus已经正常启动了,但是在我电脑上使用 ttp://XXX[公IP]:8081/nexus/ 访问的页面一直是空白,这个是在防火墙上要开启8081端口吗?


2、下面是别人CentOS 的攻略:
===================== start

在部署机上的iptables里打开8081端口[root@master-node src]# vim /etc/sysconfig/iptables....-A INPUT -p tcp -m state --state NEW -m tcp --dport 8081 -j ACCEPT[root@master-node src]# /etc/init.d/iptables restart
访问nexus,即ttp://localhost:8081    (如果出现404,就访问ttp://localhost:8081/nexus)
===================== end


3、但是我在服务器上没有找到 /etc/sysconfig目录



展开
收起
forever_gx 2018-03-30 20:59:00 4044 分享 版权
2 条回答
写回答
取消 提交回答
  • 回 1楼dongshan8的帖子
    试了下,访问不成功,但是看进程里面nexus已经启动了的
    2018-03-31 18:28:11
    赞同 展开评论
  • 旺旺:nectar2。
    楼主您好,

    在服务器本地,用wget localhost:8081/nexus 测试,有访问成功的结果吗?

    如有,可检查一下ECS实例的安全组规则,看是否允许外网访问8081的端口: https://help.aliyun.com/document_detail/25471.html

    -------------------------

    回 2楼(forever_gx) 的帖子
    您好,

    如果在服务器本地都不能成功访问,

    或许您需要查看一下nexus的日志、配置文件,看看是否有错误信息提示喔。
    2018-03-31 16:04:39
    赞同 展开评论