V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
zx9481
V2EX  ›  Java

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

  •  
  •   zx9481 · 234 天前 · 2529 次点击
    这是一个创建于 234 天前的主题,其中的信息可能已经有所发展或是发生改变。

    求大佬看看 pPr5gQs.png

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

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

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

    https://springdoc.cn/docs/
    yinxs2003
        34
    yinxs2003  
       230 天前
    看看 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>
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   2828 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 86ms · UTC 05:56 · PVG 13:56 · LAX 22:56 · JFK 01:56
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.