Wildlfy远程数据库连接:java.util.concurrent.TimeoutException:java.util.concurrent.TimeoutException

时间:2016-07-14 04:51:08

标签: hibernate postgresql java-ee jboss wildfly

尝试从Wildfly服务器连接远程数据库时出现以下问题。

import pandas as pd 
pd.read_html('http://www.espn.com.au/nba/boxscore?gameId=400827888')

[  Unnamed: 0   1   2   3   4    T
 0        DET  25  23  34  24  106
 1        ATL  25  18  23  28   94,
              starters  MIN    FG  3PT    FT  OREB  DREB  REB  AST  STL  BLK  \
 0         M. MorrisPF   37  6-19  1-4   5-6     5     5   10    4    0    0
 1       E. IlyasovaPF   34  6-12  3-6   1-2     3     4    7    3    0    1
 2        A. DrummondC   37  6-16  0-0  6-10     8    11   19    3    1    2
 3        R. JacksonPG   32  4-10  2-4   5-5     1     7    8    5    2    0
 4  K. Caldwell-PopeSG   37  7-14  4-7   3-3     1     3    4    1    1    0

    TO  PF  +/-  PTS
 0   0   1   17   18
 1   3   4   20   16
 2   2   4   23   18
 3   2   0   26   15
 4   2   1   17   21  ,
         starters  MIN    FG  3PT   FT  OREB  DREB  REB  AST  STL  BLK  TO  PF  \
 0   P. MillsapPF   36  7-15  2-6  3-4     1     7    8    3    0    0   2   4
 1  K. BazemoreSF   21   0-3  0-1  0-0     0     7    7    1    0    0   4   3
 2    A. HorfordC   30  6-11  1-3  2-3     1     3    4    4    2    3   1   1
 3    J. TeaguePG   32  7-16  1-3  3-4     0     2    2    4    0    0   5   1
 4    K. KorverSG   29   3-9  1-5  0-0     0     2    2    1    1    0   1   4

    +/-  PTS
 0  -22   19
 1  -17    0
 2   -5   15
 3  -23   18
 4   -9    7  ,
         TEAM   W   L    PCT  GB STRK
 0  Cleveland  57  25  0.695   0   L1
 1    Indiana  45  37  0.549  12   W3
 2    Detroit  44  38  0.537  13   W1
 3    Chicago  42  40  0.512  15   W3
 4  Milwaukee  33  49  0.402  24   L2,
          TEAM   W   L    PCT  GB STRK
 0       Miami  48  34  0.585   0   L1
 1     Atlanta  48  34  0.585   0   L2
 2   Charlotte  48  34  0.585   0   W2
 3  Washington  41  41  0.500   7   W3
 4     Orlando  35  47  0.427  13   L1]

我已经验证我可以从本地计算机访问远程数据库服务器并通过WildFly Management Console验证连接。这是我对远程数据源的配置,

16-07-13 11:17:50,031 INFO  [org.jboss.as.jpa] (ServerService Thread Pool -- 60) WFLYJPA0010: Starting Persistence Unit (phase 2 of 2) Service 'perpetulist.war#primary'
2016-07-13 11:17:50,270 INFO  [org.hibernate.annotations.common.Version] (ServerService Thread Pool -- 60) HCANN000001: Hibernate Commons Annotations {4.0.5.Final}
2016-07-13 11:22:25,587 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) WFLYCTL0348: Timeout after [300] seconds waiting for service container stability. Operation will roll back. Step that first updated the service container was 'add' at address '[
    ("core-service" => "management"),
    ("management-interface" => "http-interface")
]'
2016-07-13 11:22:25,672 TRACE [org.jboss.security] (MSC service thread 1-8) PBOX00337: nextState for action getPolicyConfiguration: open
2016-07-13 11:22:25,673 TRACE [org.jboss.security] (MSC service thread 1-8) PBOX00315: delete, contextID: perpetulist.war
2016-07-13 11:22:25,673 TRACE [org.jboss.security] (MSC service thread 1-8) PBOX00337: nextState for action delete: deleted
2016-07-13 11:22:30,603 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) WFLYCTL0190: Step handler org.jboss.as.server.DeployerChainAddHandler$FinalRuntimeStepHandler@14294f63 for operation {"operation" => "add-deployer-chains","address" => []} at address [] failed handling operation rollback -- java.util.concurrent.TimeoutException: java.util.concurrent.TimeoutException
    at org.jboss.as.controller.OperationContextImpl.waitForRemovals(OperationContextImpl.java:396)
    at org.jboss.as.controller.AbstractOperationContext$Step.handleResult(AbstractOperationContext.java:1384)
    at org.jboss.as.controller.AbstractOperationContext$Step.finalizeInternal(AbstractOperationContext.java:1332)
    at org.jboss.as.controller.AbstractOperationContext$Step.finalizeStep(AbstractOperationContext.java:1292)
    at org.jboss.as.controller.AbstractOperationContext$Step.access$300(AbstractOperationContext.java:1180)
    at org.jboss.as.controller.AbstractOperationContext.handleContainerStabilityFailure(AbstractOperationContext.java:964)
    at org.jboss.as.controller.AbstractOperationContext.doCompleteStep(AbstractOperationContext.java:590)
    at org.jboss.as.controller.AbstractOperationContext.completeStepInternal(AbstractOperationContext.java:354)
    at org.jboss.as.controller.AbstractOperationContext.executeOperation(AbstractOperationContext.java:330)
    at org.jboss.as.controller.OperationContextImpl.executeOperation(OperationContextImpl.java:1183)
    at org.jboss.as.controller.ModelControllerImpl.boot(ModelControllerImpl.java:453)
    at org.jboss.as.controller.AbstractControllerService.boot(AbstractControllerService.java:327)
    at org.jboss.as.controller.AbstractControllerService.boot(AbstractControllerService.java:313)
    at org.jboss.as.server.ServerService.boot(ServerService.java:384)
    at org.jboss.as.server.ServerService.boot(ServerService.java:359)
    at org.jboss.as.controller.AbstractControllerService$1.run(AbstractControllerService.java:271)
    at java.lang.Thread.run(Thread.java:745)

2016-07-13 11:22:30,605 ERROR [org.jboss.as.controller.client] (Controller Boot Thread) WFLYCTL0190: Step handler org.jboss.as.server.DeployerChainAddHandler$FinalRuntimeStepHandler@14294f63 for operation {"operation" => "add-deployer-chains","address" => []} at address [] failed handling operation rollback -- java.util.concurrent.TimeoutException
2016-07-13 11:22:35,608 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) WFLYCTL0190: Step handler org.jboss.as.domain.management.security.SecurityRealmAddHandler$ServiceInstallStepHandler@1f6b87ac for operation {"address" => [("core-service" => "management"),("security-realm" => "ApplicationRealm")],"operation" => "add","map-groups-to-roles" => undefined} at address [
    ("core-service" => "management"),
    ("security-realm" => "ApplicationRealm")
] failed handling operation rollback -- java.util.concurrent.TimeoutException: java.util.concurrent.TimeoutException
    at org.jboss.as.controller.OperationContextImpl.waitForRemovals(OperationContextImpl.java:396)
    at org.jboss.as.controller.AbstractOperationContext$Step.handleResult(AbstractOperationContext.java:1384)
    at org.jboss.as.controller.AbstractOperationContext$Step.finalizeInternal(AbstractOperationContext.java:1332)
    at org.jboss.as.controller.AbstractOperationContext$Step.finalizeStep(AbstractOperationContext.java:1307)
    at org.jboss.as.controller.AbstractOperationContext$Step.access$300(AbstractOperationContext.java:1180)
    at org.jboss.as.controller.AbstractOperationContext.handleContainerStabilityFailure(AbstractOperationContext.java:964)
    at org.jboss.as.controller.AbstractOperationContext.doCompleteStep(AbstractOperationContext.java:590)
    at org.jboss.as.controller.AbstractOperationContext.completeStepInternal(AbstractOperationContext.java:354)
    at org.jboss.as.controller.AbstractOperationContext.executeOperation(AbstractOperationContext.java:330)
    at org.jboss.as.controller.OperationContextImpl.executeOperation(OperationContextImpl.java:1183)
    at org.jboss.as.controller.ModelControllerImpl.boot(ModelControllerImpl.java:453)
    at org.jboss.as.controller.AbstractControllerService.boot(AbstractControllerService.java:327)
    at org.jboss.as.controller.AbstractControllerService.boot(AbstractControllerService.java:313)
    at org.jboss.as.server.ServerService.boot(ServerService.java:384)
    at org.jboss.as.server.ServerService.boot(ServerService.java:359)
    at org.jboss.as.controller.AbstractControllerService$1.run(AbstractControllerService.java:271)
    at java.lang.Thread.run(Thread.java:745)

2016-07-13 11:22:35,610 ERROR [org.jboss.as.controller.client] (Controller Boot Thread) WFLYCTL0190: Step handler org.jboss.as.domain.management.security.SecurityRealmAddHandler$ServiceInstallStepHandler@1f6b87ac for operation {"address" => [("core-service" => "management"),("security-realm" => "ApplicationRealm")],"operation" => "add","map-groups-to-roles" => undefined} at address [
    ("core-service" => "management"),
    ("security-realm" => "ApplicationRealm")
] failed handling operation rollback -- java.util.concurrent.TimeoutException
2016-07-13 11:22:40,611 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) WFLYCTL0190: Step handler org.jboss.as.domain.management.security.SecurityRealmAddHandler$ServiceInstallStepHandler@1f6b87ac for operation {"address" => [("core-service" => "management"),("security-realm" => "ManagementRealm")],"operation" => "add","map-groups-to-roles" => false} at address [
    ("core-service" => "management"),
    ("security-realm" => "ManagementRealm")
] failed handling operation rollback -- java.util.concurrent.TimeoutException: java.util.concurrent.TimeoutException
    at org.jboss.as.controller.OperationContextImpl.waitForRemovals(OperationContextImpl.java:396)
    at org.jboss.as.controller.AbstractOperationContext$Step.handleResult(AbstractOperationContext.java:1384)
    at org.jboss.as.controller.AbstractOperationContext$Step.finalizeInternal(AbstractOperationContext.java:1332)
    at org.jboss.as.controller.AbstractOperationContext$Step.finalizeStep(AbstractOperationContext.java:1307)
    at org.jboss.as.controller.AbstractOperationContext$Step.access$300(AbstractOperationContext.java:1180)
    at org.jboss.as.controller.AbstractOperationContext.handleContainerStabilityFailure(AbstractOperationContext.java:964)
    at org.jboss.as.controller.AbstractOperationContext.doCompleteStep(AbstractOperationContext.java:590)
    at org.jboss.as.controller.AbstractOperationContext.completeStepInternal(AbstractOperationContext.java:354)
    at org.jboss.as.controller.AbstractOperationContext.executeOperation(AbstractOperationContext.java:330)
    at org.jboss.as.controller.OperationContextImpl.executeOperation(OperationContextImpl.java:1183)
    at org.jboss.as.controller.ModelControllerImpl.boot(ModelControllerImpl.java:453)
    at org.jboss.as.controller.AbstractControllerService.boot(AbstractControllerService.java:327)
    at org.jboss.as.controller.AbstractControllerService.boot(AbstractControllerService.java:313)
    at org.jboss.as.server.ServerService.boot(ServerService.java:384)
    at org.jboss.as.server.ServerService.boot(ServerService.java:359)
    at org.jboss.as.controller.AbstractControllerService$1.run(AbstractControllerService.java:271)
    at java.lang.Thread.run(Thread.java:745)

2016-07-13 11:22:40,614 ERROR [org.jboss.as.controller.client] (Controller Boot Thread) WFLYCTL0190: Step handler org.jboss.as.domain.management.security.SecurityRealmAddHandler$ServiceInstallStepHandler@1f6b87ac for operation {"address" => [("core-service" => "management"),("security-realm" => "ManagementRealm")],"operation" => "add","map-groups-to-roles" => false} at address [
    ("core-service" => "management"),
    ("security-realm" => "ManagementRealm")
] failed handling operation rollback -- java.util.concurrent.TimeoutException
2016-07-13 11:22:45,616 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) WFLYCTL0190: Step handler org.jboss.as.controller.AbstractControllerService$ModelControllerServiceInitializationBootStepHandler$1@4cc494f for operation {"operation" => "boottime-controller-initializer-step","address" => []} at address [] failed handling operation rollback -- java.util.concurrent.TimeoutException: java.util.concurrent.TimeoutException
    at org.jboss.as.controller.OperationContextImpl.waitForRemovals(OperationContextImpl.java:396)
    at org.jboss.as.controller.AbstractOperationContext$Step.handleResult(AbstractOperationContext.java:1384)
    at org.jboss.as.controller.AbstractOperationContext$Step.finalizeInternal(AbstractOperationContext.java:1332)
    at org.jboss.as.controller.AbstractOperationContext$Step.finalizeStep(AbstractOperationContext.java:1307)
    at org.jboss.as.controller.AbstractOperationContext$Step.access$300(AbstractOperationContext.java:1180)
    at org.jboss.as.controller.AbstractOperationContext.handleContainerStabilityFailure(AbstractOperationContext.java:964)
    at org.jboss.as.controller.AbstractOperationContext.doCompleteStep(AbstractOperationContext.java:590)
    at org.jboss.as.controller.AbstractOperationContext.completeStepInternal(AbstractOperationContext.java:354)
    at org.jboss.as.controller.AbstractOperationContext.executeOperation(AbstractOperationContext.java:330)
    at org.jboss.as.controller.OperationContextImpl.executeOperation(OperationContextImpl.java:1183)
    at org.jboss.as.controller.ModelControllerImpl.boot(ModelControllerImpl.java:453)
    at org.jboss.as.controller.AbstractControllerService.boot(AbstractControllerService.java:327)
    at org.jboss.as.controller.AbstractControllerService.boot(AbstractControllerService.java:313)
    at org.jboss.as.server.ServerService.boot(ServerService.java:384)
    at org.jboss.as.server.ServerService.boot(ServerService.java:359)
    at org.jboss.as.controller.AbstractControllerService$1.run(AbstractControllerService.java:271)
    at java.lang.Thread.run(Thread.java:745)

我不确定导致此问题的原因是因为我认为数据源连接正常并且相同的连接适用于localhost。我也为postgresql启用了远程服务器访问。

1 个答案:

答案 0 :(得分:1)

远程数据源的配置似乎很好。关于这个here有一个很好的描述。默认情况下,wildfly仅允许来自localhost的连接。因此,要更改此设置,我们需要配置wildfly,以便它也可以连接到远程源。

更新standalone.xml上的以下部分,

<interface name="management">
    <inet-address value="${jboss.bind.address.management:127.0.0.1}"/>
</interface>
<interface name="public">
    <inet-address value="${jboss.bind.address:0.0.0.0}"/>
</interface>

有了这个:

<interface name="management">
    <any-address/>
</interface>
<interface name="public">
    <any-address/>
</interface>