tomcat后台日志启动正常,但是不能访问http://ip:8080页面

本文介绍了解决Windows环境下8080端口不可访问的问题,通过配置iptables规则并重启服务使端口生效,最终实现通过HTTP正常访问ip:8080页面。
解决:
1.windows下 telnet 132.151.18.42 8080 发现8080没开,有可能是端口被防火墙拦住了
2.[root@el6 ~]# vi /etc/sysconfig/iptables
增加下面2行:
-A INPUT -m state --state NEW -m tcp -p tcp --dport 8080 -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 8009 -j ACCEPT

service iptables stop
service iptables start
chkconfig iptables off
chkconfig iptables on
再telnet ip 8080,发现通了
3.再重启tomcat, http://ip:8080页面正常访问   
请分析下面代码:server: port: 8088 tomcat: max-http-form-post-size: -1 servlet: context-path: /wo spring: application: name: wo-system cloud: nacos: discovery: server-addr: 10.105.191.35:8848 namespace: PQS_TEST group: DEFAULT_GROUP datasource: type: com.alibaba.druid.pool.DruidDataSource url: jdbc:p6spy:oracle:thin:@(DESCRIPTION =(ADDRESS = (PROTOCOL = TCP)(HOST = 10.105.191.39)(PORT = 1521))(CONNECT_DATA =(SERVER = DEDICATED)(SERVICE_NAME = SJWO))) username: SJWOUSER_T password: SJWOUSERT12345678 driver-class-name: com.p6spy.engine.spy.P6SpyDriver connection-test-query: SELECT * from dual druid: test-on-borrow: false test-while-idle: false initial-size: 2 min-idle: 1 max-active: 10 jackson: date-format: yyyy-MM-dd HH:mm:ss time-zone: GMT+8 # cache: # type: caffeine #上传附件的大小限制 servlet: multipart: max-file-size: 20MB max-request-size: 20MB enabled: true #邮件 thymeleaf: enabled: true cache: false encoding: UTF-8 prefix: classpath:/mail-template/ suffix: .html servlet: content-type: text/html # p6spy sql打印 decorator: datasource: enabled: true # 是否启用 knife4j: enable: false production: false feign: client: config: default: connect-timeout: 5000 read-timeout: 30000 server-name: jyong-server fmcode-name: fmcode global-config: appName: wo-system jyongSysName: wo-system xxl: sso: server: http://10.100.86.13:8087/sso logout: path: /logout excluded: paths: /doc.html/**,/swagger-resources,/v2/api-docs,/webjars/**,/api/**, redis: address: redis://10.100.86.13:6379 job: admin: addresses: http://10.105.191.35:13001/xxl-job-admin executor: address: appname: wo-job ip: logpath: F:\EpmsFile\applogs\xxl-job\jobHandler logretentiondays: 15 port: 14007 accessToken: default_token mybatis-plus: type-aliases-package: com.sjsemi.app.wo.domain mapper-locations: classpath*:/mappers/*.xml wo: dps-push-date: '2024/03/26 12:00:00' mes-wtc: webservice: wsdl-url: http://10.100.86.13:13002/TuxedoConnectionService/services/CommonMsgService req-timeout: 120 # 120s j2-mes: server-id: FABJ2A mail-box: TPSJOHS msgHeader: srvAddr: //10.100.86.13:13002 #cancel_wo_url: http://10.100.86.13:8401/prms/api/cancelSjWoInfoByWoNo cancel_wo_url: http://10.101.60.14:8081/prms/api/cancelSjWoInfoByWoNo
最新发布
09-26
[root@ip-10-1-2-224 logs]# ps aux | grep java root 166922 0.1 5.0 4785424 397856 ? Sl 10:02 0:27 java -server -Xms2G -Xmx2G -Xss256K -XX:+UseConcMarkSweepGC -XX:+CMSParallelRemarkEnabled -XX:+UseCMSCompactAtFullCollection -XX:+DisableExplicitGC -XX:+PrintGCDetails -Xloggc:/data/devops/camel-web-sql/logs/gc.log -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/data/devops/camel-web-sql/logs/trade.dump -Djava.net.preferIPv4Stack=true -Dlog4j.configurationFile=config/logback-spring.xml -Dspring.config.name=application -classpath /data/devops/camel-web-sql/config:/data/devops/camel-web-sql/lib/aspectjweaver-1.9.7.jar:/data/devops/camel-web-sql/lib/attoparser-2.0.5.RELEASE.jar:/data/devops/camel-web-sql/lib/commons-codec-1.15.jar:/data/devops/camel-web-sql/lib/commons-lang3-3.12.0.jar:/data/devops/camel-web-sql/lib/druid-1.2.18.jar:/data/devops/camel-web-sql/lib/fastjson-1.2.83.jar:/data/devops/camel-web-sql/lib/hutool-all-5.8.21.jar:/data/devops/camel-web-sql/lib/jackson-annotations-2.13.3.jar:/data/devops/camel-web-sql/lib/jackson-core-2.13.3.jar:/data/devops/camel-web-sql/lib/jackson-databind-2.13.3.jar:/data/devops/camel-web-sql/lib/jackson-datatype-jdk8-2.13.3.jar:/data/devops/camel-web-sql/lib/jackson-datatype-jsr310-2.13.3.jar:/data/devops/camel-web-sql/lib/jackson-module-parameter-names-2.13.3.jar:/data/devops/camel-web-sql/lib/jakarta.annotation-api-1.3.5.jar:/data/devops/camel-web-sql/lib/java-jwt-3.10.3.jar:/data/devops/camel-web-sql/lib/jsch-0.2.9.jar:/data/devops/camel-web-sql/lib/jul-to-slf4j-1.7.36.jar:/data/devops/camel-web-sql/lib/log4j-api-2.17.2.jar:/data/devops/camel-web-sql/lib/log4j-to-slf4j-2.17.2.jar:/data/devops/camel-web-sql/lib/logback-classic-1.2.11.jar:/data/devops/camel-web-sql/lib/logback-core-1.2.11.jar:/data/devops/camel-web-sql/lib/lombok-1.18.16.jar:/data/devops/camel-web-sql/lib/mysql-connector-java-8.0.28.jar:/data/devops/camel-web-sql/lib/redshift-jdbc42-2.1.0.1.jar:/data/devops/camel-web-sql/lib/riam-token-util-1.0-SNAPSHOT.jar:/data/devops/camel-web-sql/lib/slf4j-api-1.7.36.jar:/data/devops/camel-web-sql/lib/snakeyaml-1.30.jar:/data/devops/camel-web-sql/lib/spring-aop-5.3.22.jar:/data/devops/camel-web-sql/lib/spring-beans-5.3.22.jar:/data/devops/camel-web-sql/lib/spring-boot-2.7.2.jar:/data/devops/camel-web-sql/lib/spring-boot-autoconfigure-2.7.2.jar:/data/devops/camel-web-sql/lib/spring-boot-starter-2.7.2.jar:/data/devops/camel-web-sql/lib/spring-boot-starter-aop-2.7.2.jar:/data/devops/camel-web-sql/lib/spring-boot-starter-json-2.7.2.jar:/data/devops/camel-web-sql/lib/spring-boot-starter-logging-2.7.2.jar:/data/devops/camel-web-sql/lib/spring-boot-starter-thymeleaf-2.7.2.jar:/data/devops/camel-web-sql/lib/spring-boot-starter-tomcat-2.7.2.jar:/data/devops/camel-web-sql/lib/spring-boot-starter-web-2.7.2.jar:/data/devops/camel-web-sql/lib/spring-context-5.3.22.jar:/data/devops/camel-web-sql/lib/spring-core-5.3.22.jar:/data/devops/camel-web-sql/lib/spring-expression-5.3.22.jar:/data/devops/camel-web-sql/lib/spring-jcl-5.3.22.jar:/data/devops/camel-web-sql/lib/spring-web-5.3.22.jar:/data/devops/camel-web-sql/lib/spring-webmvc-5.3.22.jar:/data/devops/camel-web-sql/lib/thymeleaf-3.0.15.RELEASE.jar:/data/devops/camel-web-sql/lib/thymeleaf-extras-java8time-3.0.4.RELEASE.jar:/data/devops/camel-web-sql/lib/thymeleaf-spring5-3.0.15.RELEASE.jar:/data/devops/camel-web-sql/lib/tomcat-embed-core-9.0.65.jar:/data/devops/camel-web-sql/lib/tomcat-embed-el-9.0.65.jar:/data/devops/camel-web-sql/lib/tomcat-embed-websocket-9.0.65.jar:/data/devops/camel-web-sql/lib/unbescape-1.1.6.RELEASE.jar:/data/devops/camel-web-sql/lib/web-sql.jar:/data/devops/camel-web-sql/lib/web-sql.jar.back20240607:/data/devops/camel-web-sql/lib/web-sql.jar.back2024060702: com.camelgames.sql.Application root 177500 0.0 0.0 222316 2052 pts/0 S+ 15:19 0:00 grep --color=auto java如何将这个Java程序结束运行
04-02
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值