cannot create poolableconnectionfactory cannot connect to a broker 문의 드립니다.

by yunhossi posted Jan 29, 2015

* 질문 등록 시 다음의 내용을 꼭 기입하여 주세요.
OS
Window7 64bit, Linux 64bit 등
CUBRID Ver.
[cubrid_rel] 수행 결과
CUBRID TOOL Ver.
[도움말]-[버전정보] 확인
응용 환경(API)
java, php, odbc 등 입력

* CUBRID 응용 오류, SQL 오류 또는 SQL 튜닝 관련된 문의는 반드시 다음의 내용을 추가해 주세요. 비밀글이나 비밀 댓글도 가능합니다.
* 저희가 상황을 이해하고, 재현이 가능해야 알 수 있는 문제들이 많습니다. 가능한 정보/정황들을 부탁합니다.
에러 내용 및 재현 방법 재현 가능한 Source와 SQL
관련 테이블(인덱스, 키정보 포함) 정보 CUBRID 홈 디렉토리 아래 log 디렉토리 압축


-------------- 아래에 질문 사항을 기입해 주세요. ------------------------------------------------------------------------

********** [cubrid_rel] 수행결과

CUBRID 2008 R4.3 (8.4.3.1005) (64bit release build for linux_gnu) (Dec 14 2012 19:16:51)

 

********** cubrid service status 결과
@ cubrid master status
++ cubrid master is running.
@ cubrid server status
 Server CIVIL (rel 8.4, pid 18252)
@ cubrid broker status
  NAME           PID  PORT  AS  JQ      REQ  TPS  QPS    LONG-T    LONG-Q  ERR-Q
================================================================================
* broker1      18928 33000  30   0        0    0    0    0/60.0    0/60.0      0
* query_editor 18963 30000   5   0  3559761 3558766 3557875    1/60.0    0/60.0    318
@ cubrid manager server status
++ cubrid manager server is running.

 

 

********** cubird_broker.conf 파일 내용

[broker]
ADMIN_LOG_FILE=log/broker/cubrid_broker.log
ENABLE_ACCESS_CONTROL=OFF
MASTER_SHM_ID=30001


[%broker1]
SERVICE=ON
BROKER_PORT=33000
MIN_NUM_APPL_SERVER=30
MAX_NUM_APPL_SERVER=300
APPL_SERVER_SHM_ID=33000
LOG_DIR=log/broker/sql_log
ERROR_LOG_DIR=log/broker/error_log
SQL_LOG=ON
TIME_TO_KILL=120
SESSION_TIMEOUT=300
KEEP_CONNECTION=AUTO

[%query_editor]
SERVICE=ON
BROKER_PORT=30000
MIN_NUM_APPL_SERVER=5
MAX_NUM_APPL_SERVER=20
APPL_SERVER_SHM_ID=30000
LOG_DIR=log/broker/sql_log
ERROR_LOG_DIR=log/broker/error_log
SQL_LOG=ON
TIME_TO_KILL=120
SESSION_TIMEOUT=300
KEEP_CONNECTION=AUTO

 

 

******************** 에러 내용

16:55:12,187 INFO  [STDOUT] 2015-01-28 16:55:12,186 DEBUG [java.sql.Connection] {conn-100000} Connection
16:55:12,195 INFO  [STDOUT] 2015-01-28 16:55:12,195 DEBUG [java.sql.Connection] {conn-100000} Preparing Statement:          SELECT A.PST_ITEM_SEQ_NO      , A.TITL     , A.INPT_DT         FROM T_NSTA_CONS_BORD A         WHERE A.BOARD_CD = 'faq2'         ORDER BY A.INPT_DT DESC         LIMIT 5    
16:55:33,264 INFO  [STDOUT] 2015-01-28 16:55:33,264 ERROR [java.sql.Connection] Error calling Connection.prepareStatement:
org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (Cannot connect to a broker)
 at org.apache.commons.dbcp.BasicDataSource.createPoolableConnectionFactory(BasicDataSource.java:1549)
 at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1388)
 at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:1044)
 at org.springframework.jdbc.datasource.DataSourceUtils.doGetConnection(DataSourceUtils.java:111)
 at org.springframework.jdbc.datasource.TransactionAwareDataSourceProxy$TransactionAwareInvocationHandler.invoke(TransactionAwareDataSourceProxy.java:224)
 at com.sun.proxy.$Proxy274.prepareStatement(Unknown Source)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
 at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
 at java.lang.reflect.Method.invoke(Unknown Source)
 at com.ibatis.common.jdbc.logging.ConnectionLogProxy.invoke(ConnectionLogProxy.java:53)
 at com.sun.proxy.$Proxy275.prepareStatement(Unknown Source)
 at com.ibatis.sqlmap.engine.execution.SqlExecutor.prepareStatement(SqlExecutor.java:497)
 at com.ibatis.sqlmap.engine.execution.SqlExecutor.executeQuery(SqlExecutor.java:175)
 at com.ibatis.sqlmap.engine.mapping.statement.MappedStatement.sqlExecuteQuery(MappedStatement.java:221)
 at com.ibatis.sqlmap.engine.mapping.statement.MappedStatement.executeQueryWithCallback(MappedStatement.java:189)
 at com.ibatis.sqlmap.engine.mapping.statement.MappedStatement.executeQueryForList(MappedStatement.java:139)
 at com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.queryForList(SqlMapExecutorDelegate.java:567)
 at com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.queryForList(SqlMapExecutorDelegate.java:541)
 at com.ibatis.sqlmap.engine.impl.SqlMapSessionImpl.queryForList(SqlMapSessionImpl.java:118)
 at org.springframework.orm.ibatis.SqlMapClientTemplate$3.doInSqlMapClient(SqlMapClientTemplate.java:295)
 at org.springframework.orm.ibatis.SqlMapClientTemplate$3.doInSqlMapClient(SqlMapClientTemplate.java:1)
 at org.springframework.orm.ibatis.SqlMapClientTemplate.execute(SqlMapClientTemplate.java:200)
 at org.springframework.orm.ibatis.SqlMapClientTemplate.queryForList(SqlMapClientTemplate.java:293)
 at egovframework.rte.psl.dataaccess.EgovAbstractDAO.list(EgovAbstractDAO.java:124)
 at egovframework.nsta.service.impl.CvdfMainDAO.getFaqList(CvdfMainDAO.java:36)
 at egovframework.nsta.service.impl.CvdfMainServiceImpl.getFaqList(CvdfMainServiceImpl.java:40)
 at egovframework.nsta.web.CvdfMainController.doCvdfMain(CvdfMainController.java:47)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
 at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
 at java.lang.reflect.Method.invoke(Unknown Source)
 at org.springframework.web.bind.annotation.support.HandlerMethodInvoker.invokeHandlerMethod(HandlerMethodInvoker.java:176)
 at org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.invokeHandlerMethod(AnnotationMethodHandlerAdapter.java:426)
 at org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.handle(AnnotationMethodHandlerAdapter.java:414)
 at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:790)
 at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:719)
 at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:644)
 at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:549)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
 at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
 at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
 at egovframework.nsta.cmm.filter.HttpsFilter.doFilter(HttpsFilter.java:51)
 at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
 at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
 at egovframework.rte.ptl.mvc.filter.HTMLTagFilter.doFilter(HTMLTagFilter.java:51)
 at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
 at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
 at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)
 at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
 at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
 at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
 at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
 at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
 at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
 at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:235)
 at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
 at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:190)
 at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:92)
 at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)
 at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)
 at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
 at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
 at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)
 at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
 at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)
 at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:829)
 at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:598)
 at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
 at java.lang.Thread.run(Unknown Source)
Caused by: cubrid.jdbc.driver.CUBRIDException: Cannot connect to a broker
 at java.net.DualStackPlainSocketImpl.connect0(Native Method)
 at java.net.DualStackPlainSocketImpl.socketConnect(Unknown Source)
 at java.net.AbstractPlainSocketImpl.doConnect(Unknown Source)
 at java.net.AbstractPlainSocketImpl.connectToAddress(Unknown Source)
 at java.net.AbstractPlainSocketImpl.connect(Unknown Source)
 at java.net.PlainSocketImpl.connect(Unknown Source)
 at java.net.SocksSocketImpl.connect(Unknown Source)
 at java.net.Socket.connect(Unknown Source)
 at java.net.Socket.connect(Unknown Source)
 at cubrid.jdbc.net.BrokerHandler.connectBroker(BrokerHandler.java:30)
 at cubrid.jdbc.jci.UConnection.reconnectWorker(UConnection.java:1473)
 at cubrid.jdbc.jci.UConnection.reconnect(UConnection.java:1565)
 at cubrid.jdbc.jci.UConnection.checkReconnect(UConnection.java:1720)
 at cubrid.jdbc.jci.UConnection.tryConnect(UConnection.java:250)
 at cubrid.jdbc.driver.CUBRIDDriver.connect(CUBRIDDriver.java:285)
 at org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:38)
 at org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:582)
 at org.apache.commons.dbcp.BasicDataSource.validateConnectionFactory(BasicDataSource.java:1556)
 at org.apache.commons.dbcp.BasicDataSource.createPoolableConnectionFactory(BasicDataSource.java:1545)
 ... 70 more

 

이렇게 나오는 이유를 잘 모르겠습니다.


Articles