Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

升级SofaBoot至4.0.0&SofaArk至2.2.0,动态加载,遇到web单host模式下提示"Address already in use" #682

Closed
343585776 opened this issue Jul 26, 2023 · 4 comments
Assignees
Labels
good first issue Good for newcomers help wanted Extra attention is needed

Comments

@343585776
Copy link

Describe the bug

升级SofaBoot至4.0.0&SofaArk至2.2.0,动态加载,遇到web单host模式下提示"Address already in use"
更改biz包server.port后可以正常加载
目前宿主包与biz包无法同一端口下正常运行

SofaBoot版本 :3.19.1 -> 4.0.0
SofaArk版本 :2.1.3 -> 2.2.0

参考的教程地址:https://github.com/sofastack-guides/sofa-ark-dynamic-guides

涉及到的变更如下:

sofa-ark-dynamic-guides/pom.xml

<parent>
        <groupId>com.alipay.sofa</groupId>
        <artifactId>sofaboot-dependencies</artifactId>
        <version>3.11.0</version>
        <relativePath/> <!-- lookup parent from repository -->
</parent>

变更为

<parent>
        <groupId>com.alipay.sofa</groupId>
        <artifactId>sofaboot-dependencies</artifactId>
        <version>4.0.0</version>
        <relativePath/> <!-- lookup parent from repository -->
</parent>

sofa-ark-dynamic-guides/dynamic-stock-mng/pom.xml

变更为

<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-web</artifactId>
</dependency>

<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-thymeleaf</artifactId>
</dependency>

<dependency>
    <groupId>com.alipay.sofa</groupId>
    <artifactId>web-ark-plugin</artifactId>
    <version>${sofa.ark.version}</version>
</dependency>

<dependency>
    <groupId>com.alipay.sofa</groupId>
    <artifactId>ark-sofa-boot-starter</artifactId>
</dependency>

sofa-ark-dynamic-guides/dynamic-provider/pom.xml

移除

<dependency>
    <groupId>com.alipay.sofa</groupId>
    <artifactId>healthcheck-sofa-boot-starter</artifactId>
    <scope>provided</scope>
</dependency>

以上变更参照了如下文档:
image

因为未查找到更多升级的配置资料,暂时不清楚是因为配置有误还是存在bug

期待验证并升级教程示例sofa-ark-dynamic-guides至最新版本

@hustchaya
Copy link
Collaborator

hustchaya commented Aug 11, 2023

已经纳入迭代啦~

@lylingzhen
Copy link
Contributor

放在 SOFABoot 4.0 兼容治理中统一跟进。

@lvjing2
Copy link
Collaborator

lvjing2 commented Nov 9, 2023

可能原因是 jdk 17 tomcat 使用了jakata,在支持 jdk17 里修复该问题,详细查看https://github.com/sofastack/sofa-serverless/tree/master/samples/springboot3-samples

@lvjing2 lvjing2 closed this as completed Nov 9, 2023
@kongshuaifu
Copy link

image
image
我使用jdk17也遇到同样的问题,应该是这个 servlet 包名调整了,导致ArkTomcatServletWebServerFactory 没配置成功依然还是走的TomcatServletWebServerFactory

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

5 participants