Проблема подключения к базе данных - вызвано: java.sql.sqlrecoverableexception: IO Ошибка: Неизвестный хост указанJAVA

Программисты JAVA общаются здесь
Ответить Пред. темаСлед. тема
Anonymous
 Проблема подключения к базе данных - вызвано: java.sql.sqlrecoverableexception: IO Ошибка: Неизвестный хост указан

Сообщение Anonymous »

Мы внезапно столкнулись с проблемой подключения к базе данных в экземпляре производства. После перезапуска приложение снова работает. < /p>

Вот The Stack Trace < /p>

06 Feb 2020 11:11:37,714 [http-nio-6060-exec-21] ERROR IntegrationDAOImpl : authenticate user failed
org.hibernate.exception.JDBCConnectionException: C a n n o t o p e n c o n n e c t i o n < b r / > a t o r g . h i b e r n a t e . e x c e p t i o n . S Q L S t a t e C o n v e r t e r . c o n v e r t ( S Q L S t a t e C o n v e r t e r . j a v a : 7 4 ) < b r / > a t o r g . h i b e r n a t e . e x c e p t i o n . J D B C E x c e p t i o n H e l p e r . c o n v e r t ( J D B C E x c e p t i o n H e l p e r . j a v a : 4 3 ) < b r / > a t o r g . h i b e r n a t e . e x c e p t i o n . J D B C E x c e p t i o n H e l p e r . c o n v e r t ( J D B C E x c e p t i o n H e l p e r . j a v a : 2 9 ) < b r / > a t o r g . h i b e r n a t e . j d b c . C o n n e c t i o n M a n a g e r . o p e n C o n n e c t i o n ( C o n n e c t i o n M a n a g e r . j a v a : 4 2 6 ) < b r / > a t o r g . h i b e r n a t e . j d b c . C o n n e c t i o n M a n a g e r . g e t C o n n e c t i o n ( C o n n e c t i o n M a n a g e r . j a v a : 1 4 4 ) < b r / > a t o r g . h i b e r n a t e . j d b c . A b s t r a c t B a t c h e r . p r e p a r e Q u e r y S t a t e m e n t ( A b s t r a c t B a t c h e r . j a v a : 1 3 9 ) < b r / > a t o r g . h i b e r n a t e . l o a d e r . L o a d e r . p r e p a r e Q u e r y S t a t e m e n t ( L o a d e r . j a v a : 1 5 4 7 ) < b r / > a t o r g . h i b e r n a t e . l o a d e r . L o a d e r . d o Q u e r y ( L o a d e r . j a v a : 6 7 3 ) < b r / > a t o r g . h i b e r n a t e . l o a d e r . L o a d e r . d o Q u e r y A n d I n i t i a l i z e N o n L a z y C o l l e c t i o n s ( L o a d e r . j a v a : 2 3 6 ) < b r / > a t o r g . h i b e r n a t e . l o a d e r . L o a d e r . d o L i s t ( L o a d e r . j a v a : 2 2 2 0 ) < b r / > a t o r g . h i b e r n a t e . l o a d e r . L o a d e r . l i s t I g n o r e Q u e r y C a c h e ( L o a d e r . j a v a : 2 1 0 4 ) < b r / > a t o r g . h i b e r n a t e . l o a d e r . L o a d e r . l i s t ( L o a d e r . j a v a : 2 0 9 9 ) < b r / > a t o r g . h i b e r n a t e . l o a d e r . c u s t o m . C u s t o m L o a d e r . l i s t ( C u s t o m L o a d e r . j a v a : 2 8 9 ) < b r / > a t o r g . h i b e r n a t e . i m p l . S e s s i o n I m p l . l i s t C u s t o m Q u e r y ( S e s s i o n I m p l . j a v a : 1 6 9 5 ) < b r / > a t o r g . h i b e r n a t e . i m p l . A b s t r a c t S e s s i o n I m p l . l i s t ( A b s t r a c t S e s s i o n I m p l . j a v a : 1 4 2 ) < b r / > a t o r g . h i b e r n a t e . i m p l . S Q L Q u e r y I m p l . l i s t ( S Q L Q u e r y I m p l . j a v a : 1 5 2 ) < b r / > a t c o m . b a s e . a c t i o n . u s e r . L o g i n U s e r A c t i o n . l o g i n T o u c h ( L o g i n U s e r A c t i o n . j a v a : 3 8 7 ) < b r / > a t s u n . r e f l e c t . G e n e r a t e d M e t h o d A c c e s s o r 1 7 5 3 . i n v o k e ( U n k n o w n S o u r c e ) < b r / > a t s u n . r e f l e c t . D e l e g a t i n g M e t h o d A c c e s s o r I m p l . i n v o k e ( U n k n o w n S o u r c e ) < b r / > a t j a v a . l a n g . r e f l e c t . M e t h o d . i n v o k e ( U n k n o w n S o u r c e ) < b r / > a t c o m . o p e n s y m p h o n y . x w o r k 2 . D e f a u l t A c t i o n I n v o c a t i o n . i n v o k e A c t i o n ( D e f a u l t A c t i o n I n v o c a t i o n . j a v a : 4 4 1 ) < b r / > a t c o m . o p e n s y m p h o n y . x w o r k 2 . D e f a u l t A c t i o n I n v o c a t i o n . i n v o k e A c t i o n O n l y ( D e f a u l t A c t i o n I n v o c a t i o n . j a v a : 2 8 0 ) < b r / > a t c o m . o p e n s y m p h o n y . x w o r k 2 . D e f a u l t A c t i o n I n v o c a t i o n . i n v o k e ( D e f a u l t A c t i o n I n v o c a t i o n . j a v a : 2 4 3 ) < b r / > a t c o m . o p e n s y m p h o n y . x w o r k 2 . i n t e r c e p t o r . D e f a u l t W o r k f l o w I n t e r c e p t o r . d o I n t e r c e p t ( D e f a u l t W o r k f l o w I n t e r c e p t o r . j a v a : 1 6 5 ) < b r / > a t c o m . o p e n s y m p h o n y . x w o r k 2 . i n t e r c e p t o r . M e t h o d F i l t e r I n t e r c e p t o r . i n t e r c e p t ( M e t h o d F i l t e r I n t e r c e p t o r . j a v a : 8 7 ) < b r / > a t c o m . o p e n s y m p h o n y . x w o r k 2 . D e f a u l t A c t i o n I n v o c a t i o n . i n v o k e ( D e f a u l t A c t i o n I n v o c a t i o n . j a v a : 2 3 7 ) < b r / > a t c o m . o p e n s y m p h o n y . x w o r k 2 . v a l i d a t o r . V a l i d a t i o n I n t e r c e p t o r . d o I n t e r c e p t ( V a l i d a t i o n I n t e r c e p t o r . j a v a : 2 5 2 ) < b r / > a t o r g . a p a c h e . s t r u t s 2 . i n t e r c e p t o r . v a l i d a t i o n . A n n o t a t i o n V a l i d a t i o n I n t e r c e p t o r . d o I n t e r c e p t ( A n n o t a t i o n V a l i d a t i o n I n t e r c e p t o r . j a v a : 6 8 ) < b r / > a t c o m . o p e n s y m p h o n y . x w o r k 2 . i n t e r c e p t o r . M e t h o d F i l t e r I n t e r c e p t o r . i n t e r c e p t ( M e t h o d F i l t e r I n t e r c e p t o r . j a v a : 8 7 ) < b r / > a t c o m . o p e n s y m p h o n y . x w o r k 2 . D e f a u l t A c t i o n I n v o c a t i o n . i n v o k e ( D e f a u l t A c t i o n I n v o c a t i o n . j a v a : 2 3 7 ) < b r / > a t c o m . o p e n s y m p h o n y . x w o r k 2 . i n t e r c e p t o r . C o n v e r s i o n E r r o r I n t e r c e p t o r . i n t e r c e p t ( C o n v e r s i o n E r r o r I n t e r c e p t o r . j a v a : 1 2 2 ) < b r / > a t c o m . o p e n s y m p h o n y . x w o r k 2 . D e f a u l t A c t i o n I n v o c a t i o n . i n v o k e ( D e f a u l t A c t i o n I n v o c a t i o n . j a v a : 2 3 7 ) < b r / > a t c o m . o p e n s y m p h o n y . x w o r k 2 . i n t e r c e p t o r . P a r a m e t e r s I n t e r c e p t o r . d o I n t e r c e p t ( P a r a m e t e r s I n t e r c e p t o r . j a v a : 1 9 5 ) < b r / > a t c o m . o p e n s y m p h o n y . x w o r k 2 . i n t e r c e p t o r . M e t h o d F i l t e r I n t e r c e p t o r . i n t e r c e p t ( M e t h o d F i l t e r I n t e r c e p t o r . j a v a : 8 7 ) < b r / > a t c o m . o p e n s y m p h o n y . x w o r k 2 . D e f a u l t A c t i o n I n v o c a t i o n . i n v o k e ( D e f a u l t A c t i o n I n v o c a t i o n . j a v a : 2 3 7 ) < b r / > a t c o m . o p e n s y m p h o n y . x w o r k 2 . i n t e r c e p t o r . P a r a m e t e r s I n t e r c e p t o r . d o I n t e r c e p t ( P a r a m e t e r s I n t e r c e p t o r . j a v a : 1 9 5 ) < b r / > a t c o m . o p e n s y m p h o n y . x w o r k 2 . i n t e r c e p t o r . M e t h o d F i l t e r I n t e r c e p t o r . i n t e r c e p t ( M e t h o d F i l t e r I n t e r c e p t o r . j a v a : 8 7 ) < br /> at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
at com.opensymphony.xwork2.interceptor.StaticParametersInterceptor.intercept(StaticParametersInterceptor.java:179)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
at org.apache.struts2.interceptor.MultiselectInterceptor.intercept(MultiselectInterceptor.java:75)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
at org.apache.struts2.interceptor.CheckboxInterceptor.intercept(CheckboxInterceptor.java:94)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
at org.apache.struts2.interceptor.FileUploadInterceptor.intercept(FileUploadInterceptor.java:235)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
at com.opensymphony.xwork2.interceptor.ModelDrivenInterceptor.intercept(ModelDrivenInterceptor.java:89)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
at com.opensymphony.xwork2.interceptor.ScopedModelDrivenInterceptor.intercept(ScopedModelDrivenInterceptor.java:130)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
at org.apache.struts2.interceptor.debugging.DebuggingInterceptor.intercept(DebuggingInterceptor.java:267)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
at com.opensymphony.xwork2.interceptor.ChainingInterceptor.intercept(ChainingInterceptor.java:126)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
at com.opensymphony.xwork2.interceptor.PrepareInterceptor.doIntercept(PrepareInterceptor.java:138)
at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
at com.opensymphony.xwork2.interceptor.I18nInterceptor.intercept(I18nInterceptor.java:165)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
at org.apache.struts2.interceptor.ServletConfigInterceptor.intercept(ServletConfigInterceptor.java:164)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
at com.opensymphony.xwork2.interceptor.AliasInterceptor.intercept(AliasInterceptor.java:179)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
at com.opensymphony.xwork2.interceptor.ExceptionMappingInterceptor.intercept(ExceptionMappingInterceptor.java:176)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
at org.apache.struts2.impl.StrutsActionProxy.execute(StrutsActionProxy.java:52)
at org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:488)
at org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:395)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:202)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:541)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:139)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)
at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:678)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343)
at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:367)
at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)
at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:860)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1598)
at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Unknown Source)
Caused by: java.sql.SQLRecoverableException: IO Error: Unknown host specified
at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:743)
at oracle.jdbc.driver.PhysicalConnection.connect(PhysicalConnection.java:666)
at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:32)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:566)
at java.sql.DriverManager.getConnection(Unknown Source)
at java.sql.DriverManager.getConnection(Unknown Source)
at org.springframework.jdbc.datasource.DriverManagerDataSource.getConnectionFromDriverManager(DriverManagerDataSource.java:283)
at org.springframework.jdbc.datasource.DriverManagerDataSource.getConnectionFromDriverManager(DriverManagerDataSource.java:271)
at org.springframework.jdbc.datasource.DriverManagerDataSource.getConnectionFromDriverManager(DriverManagerDataSource.java:255)
at org.springframework.jdbc.datasource.DriverManagerDataSource.getConnection(DriverManagerDataSource.java:236)
at org.springframework.orm.hibernate3.LocalDataSourceConnectionProvider.getConnection(LocalDataSourceConnectionProvider.java:81)
at org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.java:423)
... 85 more
Caused by: oracle.net.ns.NetException: Unknown host specified
at oracle.net.resolver.HostnameNamingAdapter.resolve(HostnameNamingAdapter.java:207)
at oracle.net.resolver.NameResolver.resolveName(NameResolver.java:131)
at oracle.net.resolver.AddrResolution.resolveAndExecute(AddrResolution.java:475)
at oracle.net.ns.NSProtocol.establishConnection(NSProtocol.java:595)
at oracle.net.ns.NSProtocol.connect(NSProtocol.java:230)
at oracle.jdbc.driver.T4CConnection.connect(T4CConnection.java:1452)
at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:496)
... 96 more
< /code>

Мы запускаем другое приложение сокета на том же сервере. Мы столкнулись с той же ошибкой, что и приложение. Вот журнал нашего второго приложения < /p>

2020-02-06 11:05:18,589 [pool-2-thread-4]
ERROR DbConnection : Db error
java.sql.SQLRecoverableException: IO Error: Unknown host specified
at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:743)
at oracle.jdbc.driver.PhysicalConnection.connect(PhysicalConnection.java:666)
at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:32)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:566)
at java.sql/java.sql.DriverManager.getConnection(DriverManager.java:677)
at java.sql/java.sql.DriverManager.getConnection(DriverManager.java:228)
at utils.DbConnection.getConnection(DbConnection.java:25)
at requestValidation.validatePcbEnd(PanaCIMRequestValidation.java:812)
at xmlConvert.ConvertReceivedXMLToObject.extractMaterialReqXmlToObjects(ConvertReceivedXMLToObject.java:73)
at clientapplication.SendResponseToClient.run(SendResponseToClient.java:68)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:835)
Caused by: oracle.net.ns.NetException: Unknown host specified
at oracle.net.resolver.HostnameNamingAdapter.resolve(HostnameNamingAdapter.java:207)
at oracle.net.resolver.NameResolver.resolveName(NameResolver.java:131)
at oracle.net.resolver.AddrResolution.resolveAndExecute(AddrResolution.java:475)
at oracle.net.ns.NSProtocol.establishConnection(NSProtocol.java:595)
at oracle.net.ns.NSProtocol.connect(NSProtocol.java:230)
at oracle.jdbc.driver.T4CConnection.connect(T4CConnection.java:1452)
at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:496)
... 12 more
< /code>

Но за это время мы можем установить соединение с базой данных с помощью разработчика SQL. < /p>

Что может быть здесь проблемой? Как мы можем этого избежать? : @Servername: 1521/test
jdbc: https://mvnrepository.com/artifact/com. ... 7/12.1.0.2

Подробнее здесь: https://stackoverflow.com/questions/601 ... tion-io-er
Реклама
Ответить Пред. темаСлед. тема

Быстрый ответ

Изменение регистра текста: 
Смайлики
:) :( :oops: :roll: :wink: :muza: :clever: :sorry: :angel: :read: *x)
Ещё смайлики…
   
К этому ответу прикреплено по крайней мере одно вложение.

Если вы не хотите добавлять вложения, оставьте поля пустыми.

Максимально разрешённый размер вложения: 15 МБ.

  • Похожие темы
    Ответы
    Просмотры
    Последнее сообщение

Вернуться в «JAVA»