zx9481
V2EX  ›  Java

springboot 项目无法启动 也没有报错日志

  •  
  •   zx9481 · Sep 5, 2023 · 4278 views
    This topic created in 1163 days ago, the information mentioned may be changed or developed.

    求大佬看看 pPr5gQs.png

    Supplement 1  ·  Sep 5, 2023
    完整日志在这里 https://t.wss.ink/f/c3z1i3i923n
    34 replies  •  2023-09-09 18:20:47 +08:00
    wawaguo
    wawaguo
    Sep 5, 2023
    1
    哪里有报错 没看到啊
    zx9481
    zx9481
    OP
    Sep 5, 2023
    2
    @wawaguo
    {dataSource-1} closed
    falsemask
    falsemask
    Sep 5, 2023
    3
    看上去是 quartz 的问题
    Laysan
    Laysan
    Sep 5, 2023
    4
    WashFreshFresh
    WashFreshFresh
    Sep 5, 2023❤️2
    5
    op 的帖子是我逛 V2EX 这么久以来唯一能看到的图...其它图在我这看都是挂的。
    EarthChild
    EarthChild
    Sep 5, 2023
    6
    阿里的东西能不用就不用,换 hikari 连接池吧 https://github.com/brettwooldridge/HikariCP
    nothingistrue
    nothingistrue
    Sep 5, 2023
    7
    啥错也没有,这就是跑起来,执行完,自己退出了。把你的 BootStrap 类贴出来看看,估计用错方式了。

    这日志配色看得是真头疼
    Duolingo
    Duolingo
    Sep 5, 2023
    8
    没看到报错,倒是像是 quarts 运行完就直接把整个进程停了哈哈哈( doge
    WashFreshFresh
    WashFreshFresh
    Sep 5, 2023
    9
    你这是新项目?是不是忘记加 web 的依赖了?没加是会正常关闭的。
    zx9481
    zx9481
    OP
    Sep 5, 2023
    10
    @nothingistrue https://t.wss.ink/f/c3z1i3i923n 复制链接到浏览器打开 ,这是完整的日志,请帮忙看一下😭
    chendy
    chendy
    Sep 5, 2023
    11
    目测有的操作有问题,或者配置有问题
    任务跑完直接给 System.exit 了
    NoString
    NoString
    Sep 5, 2023
    12
    没看到有报错哇
    zx9481
    zx9481
    OP
    Sep 5, 2023
    13
    @NoString 就是没有报错。。。 系统自动关闭了。。
    vacuitym
    vacuitym
    Sep 5, 2023
    14
    可以检查下 redis 是不是能连上
    zx9481
    zx9481
    OP
    Sep 5, 2023
    15
    @vacuitym 可以连接上
    kd9yYw2RyhQwAwzn
    kd9yYw2RyhQwAwzn
    Sep 5, 2023
    16
    在 shutdown 处打个断点看下呢
    lazyfighter
    lazyfighter
    Sep 5, 2023
    17
    进程已结束,退出代码为 0 , 看看因没有引用 spring-web-starter , 感觉不是 web 程序,所以进程直接结束了
    ganning
    ganning
    Sep 5, 2023
    18
    看日志显示服务已经启动成功了,看看定时任务执行吧,逐个注释排查下

    “2023-09-05 14:42:18.991 INFO 9400 --- [ main] org.springcrazy.Application : Started Application in 16.229 seconds (JVM running for 17.097)”
    xeathen
    xeathen
    Sep 5, 2023
    19
    @WashFreshFresh #5 你是不是用新加坡节点
    wentz
    wentz
    Sep 5, 2023
    20
    在 Application 的 main 方法,加个 try ,catch ,打印下错误信息看看
    WashFreshFresh
    WashFreshFresh
    Sep 5, 2023
    21
    @xeathen #19 确实是
    xeathen
    xeathen
    Sep 5, 2023
    22
    @WashFreshFresh #21 换香港之类的节点你就能看到 imgur 的图了
    hiwind
    hiwind
    Sep 5, 2023 via iPhone
    23
    截图是啥工具处理的?
    hidemyself
    hidemyself
    Sep 5, 2023
    24
    代码发出来看看
    c3de3f21
    c3de3f21
    Sep 5, 2023
    25
    有没有一种可能,你在 Application 里写个 while(true) 他就不会死掉了
    tianmalj0613
    tianmalj0613
    Sep 5, 2023
    26
    你先把日志调好吧,这个 error 和 warn 的日志都没有 咋个 debug?
    nothingistrue
    nothingistrue
    Sep 5, 2023
    27
    @zx9481 #10 整个日志,都没有 error 级别的,看着就是 Redis 连上那一刻,服务自行结束了。这个不是无法启动,是启动后自行结束。日志上能看出,这是有 Web 服务器 Undertow 的,基本可以排除启动类不是 Web 启动类这个原因。那么剩下的,有很大的概率,各组件的集成问题。初始配置的问题,还是要找这个项目的老程序员给找找错误原因,外人很难找出来原因。
    daye
    daye
    Sep 5, 2023
    28
    如果确定你的项目有引用 spring-boot-starter-web 依赖的话,那么很大概率是 9080 端口被占用,端口冲突
    daye
    daye
    Sep 5, 2023
    29
    已与地址为 ''127.0.0.1:9080',传输: '套接字'' 的目标虚拟机断开连接
    chocotan
    chocotan
    Sep 5, 2023
    30
    楼主这是没加 web 依赖吧。。
    NeroKamin
    NeroKamin
    Sep 5, 2023
    31
    看起来像是 quartz 的问题呢
    Daniel17
    Daniel17
    Sep 5, 2023
    32
    把日志级别搞一下。。
    KevinBlandy
    KevinBlandy
    Sep 6, 2023
    33
    推荐一个优质的 spring/boot/data/security/cloud 的中文文档,无广告,无须登录,无须关注,在线读。

    https://springdoc.cn/docs/
    yinxs2003
    yinxs2003
    Sep 9, 2023
    34
    看看 pom 里有没有
    <dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter</artifactId>
    <exclusions>
    <exclusion>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-logging</artifactId>
    </exclusion>
    </exclusions>
    </dependency>
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   2535 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 61ms · UTC 10:45 · PVG 18:45 · LAX 02:45 · JFK 05:45
    ♥ Do have faith in what you're doing.