为什么在手动关闭后不启动KeyClock和SQL的容器?

发布于 2025-02-03 07:55:14 字数 10788 浏览 3 评论 0原文

重新启动后,当我尝试使用Portainer启动容器时,我会在KeyClock日志文件中看到以下错误。

{    
    "address" => [
        ("subsystem" => "undertow"),
        ("server" => "default-server"),
        ("host" => "default-host")
    ],
    "alias" => ["localhost"]
}, {
    "operation" => "add",
    "address" => [
        ("subsystem" => "undertow"),
        ("server" => "default-server"),
        ("host" => "default-host"),
        ("location" => "/")
    ],
    "handler" => "welcome-content"
}, {
    "operation" => "add",
    "address" => [
        ("subsystem" => "undertow"),
        ("server" => "default-server"),
        ("host" => "default-host"),
        ("setting" => "http-invoker")
    ],
    "security-realm" => "ApplicationRealm"
}, {
    "operation" => "add",
    "address" => [
        ("subsystem" => "undertow"),
        ("servlet-container" => "default")
    ]
}, {
    "operation" => "add",
    "address" => [
        ("subsystem" => "undertow"),
        ("servlet-container" => "default"),
        ("setting" => "jsp")
    ]
}, {
    "operation" => "add",
    "address" => [
        ("subsystem" => "undertow"),
        ("servlet-container" => "default"),
        ("setting" => "websockets")
    ]
}, {
    "operation" => "add",
    "address" => [
        ("subsystem" => "undertow"),
        ("configuration" => "handler"),
        ("file" => "welcome-content")
    ],
    "path" => expression "${jboss.home.dir}/welcome-content"
}, {
    "operation" => "add",
    "address" => [("subsystem" => "weld")]
}, {
    "operation" => "boottime-controller-initializer-step",
    "address" => []
}, {
    "operation" => "add-deployer-chains",
    "address" => []
}]: java.util.concurrent.RejectedExecutionException
    at [email protected]//org.jboss.threads.RejectingExecutor.execute(RejectingExecutor.java:37)
    at [email protected]//org.jboss.threads.EnhancedQueueExecutor.rejectShutdown(EnhancedQueueExecutor.java:2029)
    at [email protected]//org.jboss.threads.EnhancedQueueExecutor.execute(EnhancedQueueExecutor.java:757)
    at [email protected]//org.jboss.as.controller.notification.NotificationSupports$NonBlockingNotificationSupport.emit(NotificationSupports.java:95)
    at [email protected]//org.jboss.as.controller.OperationContextImpl.notifyModificationsComplete(OperationContextImpl.java:505)
    at [email protected]//org.jboss.as.controller.OperationContextImpl.releaseStepLocks(OperationContextImpl.java:1233)
    at [email protected]//org.jboss.as.controller.AbstractOperationContext$Step.finalizeInternal(AbstractOperationContext.java:1538)
    at [email protected]//org.jboss.as.controller.AbstractOperationContext$Step.finalizeStep(AbstractOperationContext.java:1496)
    at [email protected]//org.jboss.as.controller.AbstractOperationContext$Step.access$400(AbstractOperationContext.java:1360)
    at [email protected]//org.jboss.as.controller.AbstractOperationContext.executeResultHandlerPhase(AbstractOperationContext.java:912)
    at [email protected]//org.jboss.as.controller.AbstractOperationContext.processStages(AbstractOperationContext.java:792)
    at [email protected]//org.jboss.as.controller.AbstractOperationContext.executeOperation(AbstractOperationContext.java:468)
    at [email protected]//org.jboss.as.controller.OperationContextImpl.executeOperation(OperationContextImpl.java:1415)
    at [email protected]//org.jboss.as.controller.ModelControllerImpl.boot(ModelControllerImpl.java:529)
    at [email protected]//org.jboss.as.controller.AbstractControllerService.boot(AbstractControllerService.java:515)
    at [email protected]//org.jboss.as.controller.AbstractControllerService.boot(AbstractControllerService.java:477)
    at [email protected]//org.jboss.as.server.ServerService.boot(ServerService.java:459)
    at [email protected]//org.jboss.as.server.ServerService.boot(ServerService.java:412)
    at [email protected]//org.jboss.as.controller.AbstractControllerService$1.run(AbstractControllerService.java:416)
    at java.base/java.lang.Thread.run(Thread.java:829)
    Suppressed: java.util.concurrent.RejectedExecutionException: Executor is being shut down
        at [email protected]//org.jboss.threads.EnhancedQueueExecutor.rejectShutdown(EnhancedQueueExecutor.java:2031)
        ... 18 more
rUser with username 'admin' already added to '/opt/jboss/keycloak/standalone/configuration/keycloak-add-user.json'
User with username 'admin' already added to '/opt/jboss/keycloak/standalone/configuration/keycloak-add-user.json'
User with username 'admin' already added to '/opt/jboss/keycloak/standalone/configuration/keycloak-add-user.json'
User with username 'admin' already added to '/opt/jboss/keycloak/standalone/configuration/keycloak-add-user.json'
User with username 'admin' already added to '/opt/jboss/keycloak/standalone/configuration/keycloak-add-user.json'
User with username 'admin' already added to '/opt/jboss/keycloak/standalone/configuration/keycloak-add-user.json'
User with username 'admin' already added to '/opt/jboss/keycloak/standalone/configuration/keycloak-add-user.json'
User with username 'admin' already added to '/opt/jboss/keycloak/standalone/configuration/keycloak-add-user.json'
User with username 'admin' already added to '/opt/jboss/keycloak/standalone/configuration/keycloak-add-user.json'
User with username 'admin' already added to '/opt/jboss/keycloak/standalone/configuration/keycloak-add-user.json'
User with username 'admin' already added to '/opt/jboss/keycloak/standalone/configuration/keycloak-add-user.json'
User with username 'admin' already added to '/opt/jboss/keycloak/standalone/configuration/keycloak-add-user.json'
User with username 'admin' already added to '/opt/jboss/keycloak/standalone/configuration/keycloak-add-user.json'

在研究此之后,我发现SQL Server已关闭,当我启动此问题时,我会看到以下错误。

Msg 1801, Level 16, State 3, Server 1f6e6d05683c, Line 1
Database 'Keycloak' already exists. Choose a different database name.
Sqlcmd: Error: Microsoft ODBC Driver 13 for SQL Server : Login timeout expired.
Sqlcmd: Error: Microsoft ODBC Driver 13 for SQL Server : TCP Provider: Error code 0x2749.
Sqlcmd: Error: Microsoft ODBC Driver 13 for SQL Server : A network-related or instance-specific error has occurred while establishing a connection to SQL Server. Server is not found or not accessible. Check if instance name is correct and if SQL Server is configured to allow remote connections. For more information see SQL Server Books Online..
Sqlcmd: Error: Microsoft ODBC Driver 13 for SQL Server : Login timeout expired.
Sqlcmd: Error: Microsoft ODBC Driver 13 for SQL Server : TCP Provider: Error code 0x2749.
Sqlcmd: Error: Microsoft ODBC Driver 13 for SQL Server : A network-related or instance-specific error has occurred while establishing a connection to SQL Server. Server is not found or not accessible. Check if instance name is correct and if SQL Server is configured to allow remote connections. For more information see SQL Server Books Online..
Msg 1801, Level 16, State 3, Server 1f6e6d05683c, Line 1
Database 'Keycloak' already exists. Choose a different database name.
Msg 1801, Level 16, State 3, Server 1f6e6d05683c, Line 1
Database 'Keycloak' already exists. Choose a different database name.
Msg 1801, Level 16, State 3, Server 1f6e6d05683c, Line 1
Database 'Keycloak' already exists. Choose a different database name.
Msg 1801, Level 16, State 3, Server 1f6e6d05683c, Line 1
Database 'Keycloak' already exists. Choose a different database name. 

我尝试通过Portainer以及Docker-Compose文件运行此错误。 任何建议都将非常有用。

After a restart when I try to start a container by using Portainer I see the following error in keyclock log file.

{    
    "address" => [
        ("subsystem" => "undertow"),
        ("server" => "default-server"),
        ("host" => "default-host")
    ],
    "alias" => ["localhost"]
}, {
    "operation" => "add",
    "address" => [
        ("subsystem" => "undertow"),
        ("server" => "default-server"),
        ("host" => "default-host"),
        ("location" => "/")
    ],
    "handler" => "welcome-content"
}, {
    "operation" => "add",
    "address" => [
        ("subsystem" => "undertow"),
        ("server" => "default-server"),
        ("host" => "default-host"),
        ("setting" => "http-invoker")
    ],
    "security-realm" => "ApplicationRealm"
}, {
    "operation" => "add",
    "address" => [
        ("subsystem" => "undertow"),
        ("servlet-container" => "default")
    ]
}, {
    "operation" => "add",
    "address" => [
        ("subsystem" => "undertow"),
        ("servlet-container" => "default"),
        ("setting" => "jsp")
    ]
}, {
    "operation" => "add",
    "address" => [
        ("subsystem" => "undertow"),
        ("servlet-container" => "default"),
        ("setting" => "websockets")
    ]
}, {
    "operation" => "add",
    "address" => [
        ("subsystem" => "undertow"),
        ("configuration" => "handler"),
        ("file" => "welcome-content")
    ],
    "path" => expression "${jboss.home.dir}/welcome-content"
}, {
    "operation" => "add",
    "address" => [("subsystem" => "weld")]
}, {
    "operation" => "boottime-controller-initializer-step",
    "address" => []
}, {
    "operation" => "add-deployer-chains",
    "address" => []
}]: java.util.concurrent.RejectedExecutionException
    at [email protected]//org.jboss.threads.RejectingExecutor.execute(RejectingExecutor.java:37)
    at [email protected]//org.jboss.threads.EnhancedQueueExecutor.rejectShutdown(EnhancedQueueExecutor.java:2029)
    at [email protected]//org.jboss.threads.EnhancedQueueExecutor.execute(EnhancedQueueExecutor.java:757)
    at [email protected]//org.jboss.as.controller.notification.NotificationSupports$NonBlockingNotificationSupport.emit(NotificationSupports.java:95)
    at [email protected]//org.jboss.as.controller.OperationContextImpl.notifyModificationsComplete(OperationContextImpl.java:505)
    at [email protected]//org.jboss.as.controller.OperationContextImpl.releaseStepLocks(OperationContextImpl.java:1233)
    at [email protected]//org.jboss.as.controller.AbstractOperationContext$Step.finalizeInternal(AbstractOperationContext.java:1538)
    at [email protected]//org.jboss.as.controller.AbstractOperationContext$Step.finalizeStep(AbstractOperationContext.java:1496)
    at [email protected]//org.jboss.as.controller.AbstractOperationContext$Step.access$400(AbstractOperationContext.java:1360)
    at [email protected]//org.jboss.as.controller.AbstractOperationContext.executeResultHandlerPhase(AbstractOperationContext.java:912)
    at [email protected]//org.jboss.as.controller.AbstractOperationContext.processStages(AbstractOperationContext.java:792)
    at [email protected]//org.jboss.as.controller.AbstractOperationContext.executeOperation(AbstractOperationContext.java:468)
    at [email protected]//org.jboss.as.controller.OperationContextImpl.executeOperation(OperationContextImpl.java:1415)
    at [email protected]//org.jboss.as.controller.ModelControllerImpl.boot(ModelControllerImpl.java:529)
    at [email protected]//org.jboss.as.controller.AbstractControllerService.boot(AbstractControllerService.java:515)
    at [email protected]//org.jboss.as.controller.AbstractControllerService.boot(AbstractControllerService.java:477)
    at [email protected]//org.jboss.as.server.ServerService.boot(ServerService.java:459)
    at [email protected]//org.jboss.as.server.ServerService.boot(ServerService.java:412)
    at [email protected]//org.jboss.as.controller.AbstractControllerService$1.run(AbstractControllerService.java:416)
    at java.base/java.lang.Thread.run(Thread.java:829)
    Suppressed: java.util.concurrent.RejectedExecutionException: Executor is being shut down
        at [email protected]//org.jboss.threads.EnhancedQueueExecutor.rejectShutdown(EnhancedQueueExecutor.java:2031)
        ... 18 more
rUser with username 'admin' already added to '/opt/jboss/keycloak/standalone/configuration/keycloak-add-user.json'
User with username 'admin' already added to '/opt/jboss/keycloak/standalone/configuration/keycloak-add-user.json'
User with username 'admin' already added to '/opt/jboss/keycloak/standalone/configuration/keycloak-add-user.json'
User with username 'admin' already added to '/opt/jboss/keycloak/standalone/configuration/keycloak-add-user.json'
User with username 'admin' already added to '/opt/jboss/keycloak/standalone/configuration/keycloak-add-user.json'
User with username 'admin' already added to '/opt/jboss/keycloak/standalone/configuration/keycloak-add-user.json'
User with username 'admin' already added to '/opt/jboss/keycloak/standalone/configuration/keycloak-add-user.json'
User with username 'admin' already added to '/opt/jboss/keycloak/standalone/configuration/keycloak-add-user.json'
User with username 'admin' already added to '/opt/jboss/keycloak/standalone/configuration/keycloak-add-user.json'
User with username 'admin' already added to '/opt/jboss/keycloak/standalone/configuration/keycloak-add-user.json'
User with username 'admin' already added to '/opt/jboss/keycloak/standalone/configuration/keycloak-add-user.json'
User with username 'admin' already added to '/opt/jboss/keycloak/standalone/configuration/keycloak-add-user.json'
User with username 'admin' already added to '/opt/jboss/keycloak/standalone/configuration/keycloak-add-user.json'

After investigating this I found that the sql server is down and when I start this I see the following error.

Msg 1801, Level 16, State 3, Server 1f6e6d05683c, Line 1
Database 'Keycloak' already exists. Choose a different database name.
Sqlcmd: Error: Microsoft ODBC Driver 13 for SQL Server : Login timeout expired.
Sqlcmd: Error: Microsoft ODBC Driver 13 for SQL Server : TCP Provider: Error code 0x2749.
Sqlcmd: Error: Microsoft ODBC Driver 13 for SQL Server : A network-related or instance-specific error has occurred while establishing a connection to SQL Server. Server is not found or not accessible. Check if instance name is correct and if SQL Server is configured to allow remote connections. For more information see SQL Server Books Online..
Sqlcmd: Error: Microsoft ODBC Driver 13 for SQL Server : Login timeout expired.
Sqlcmd: Error: Microsoft ODBC Driver 13 for SQL Server : TCP Provider: Error code 0x2749.
Sqlcmd: Error: Microsoft ODBC Driver 13 for SQL Server : A network-related or instance-specific error has occurred while establishing a connection to SQL Server. Server is not found or not accessible. Check if instance name is correct and if SQL Server is configured to allow remote connections. For more information see SQL Server Books Online..
Msg 1801, Level 16, State 3, Server 1f6e6d05683c, Line 1
Database 'Keycloak' already exists. Choose a different database name.
Msg 1801, Level 16, State 3, Server 1f6e6d05683c, Line 1
Database 'Keycloak' already exists. Choose a different database name.
Msg 1801, Level 16, State 3, Server 1f6e6d05683c, Line 1
Database 'Keycloak' already exists. Choose a different database name.
Msg 1801, Level 16, State 3, Server 1f6e6d05683c, Line 1
Database 'Keycloak' already exists. Choose a different database name. 

I try to run this through Portainer and also with docker-compose file.
Any advice will be very useful.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

懒的傷心 2025-02-10 07:55:14

我创建了一个新的容器数据库,链接到SQL容器。在现有数据库中,用户名:管理员已经从上一个安装创建。当我创建新的容器并与旧数据库链接时,它会显示错误,因为同名“ admin”已经存在。
解决方案:在我的YML文件中,我将用户名从“ admin”更改为“ admin1”。
容器正在启动并运行。

I created a new container database is linked to SQL container. In the existing database the user name :admin was already created from the previous installation. When I create new container and link with old database it show error because same name "admin" is already exist.
Solution: In my yml file I changed the user name from "admin" to "admin1".
The container is up and running.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文