tro
10
2018-01-14 16:33:30.0
0
74

jeus 서버에서 gmail smtp 적용간 에러가 발생 합니다 ㅠ~ㅠ


안녕하세요 열랩중인 초보 개발자 입니다.

이번에 개발한 웹 어플리케이션을 jeus 로 올리게 되었는데

tomcat 에서는 문제 없이 돌아갔던 메일 로직이 jeus 에 올리면서 

에러가 납니다 ㅠㅠ


DEBUG SMTP: connected to host "smtp.gmail.com", port: 587


EHLO TMS-WEB1

250-smtp.gmail.com at your service, [61.80.91.77]

250-SIZE 35882577

250-8BITMIME

250-STARTTLS

250-ENHANCEDSTATUSCODES

250-PIPELINING

250-CHUNKING

250 SMTPUTF8

DEBUG SMTP: Found extension "SIZE", arg "35882577"

DEBUG SMTP: Found extension "8BITMIME", arg ""

DEBUG SMTP: Found extension "STARTTLS", arg ""

DEBUG SMTP: Found extension "ENHANCEDSTATUSCODES", arg ""

DEBUG SMTP: Found extension "PIPELINING", arg ""

DEBUG SMTP: Found extension "CHUNKING", arg ""

DEBUG SMTP: Found extension "SMTPUTF8", arg ""

STARTTLS

220 2.0.0 Ready to start TLS

org.springframework.mail.MailSendException: Mail server connection failed; nested exception is javax.mail.MessagingException: Could not convert socket to TLS;

  nested exception is:

        java.net.SocketException: java.security.NoSuchAlgorithmException: Error constructing implementation (algorithm: Default, provider: SunJSSE, class: sun.security.ssl.SSLContextImpl$DefaultSSLContext). Failed messages: javax.mail.MessagingException: Could not convert socket to TLS;

  nested exception is:

        java.net.SocketException: java.security.NoSuchAlgorithmException: Error constructing implementation (algorithm: Default, provider: SunJSSE, class: sun.security.ssl.SSLContextImpl$DefaultSSLContext); message exception details (1) are:

Failed message 1:

javax.mail.MessagingException: Could not convert socket to TLS;

  nested exception is:

        java.net.SocketException: java.security.NoSuchAlgorithmException: Error constructing implementation (algorithm: Default, provider: SunJSSE, class: sun.security.ssl.SSLContextImpl$DefaultSSLContext)

        at com.sun.mail.smtp.SMTPTransport.startTLS(SMTPTransport.java:1230)

        at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:378)

        at javax.mail.Service.connect(Service.java:275)

        at org.springframework.mail.javamail.JavaMailSenderImpl.connectTransport(JavaMailSenderImpl.java:486)

        at org.springframework.mail.javamail.JavaMailSenderImpl.doSend(JavaMailSenderImpl.java:406)

        at org.springframework.mail.javamail.JavaMailSenderImpl.send(JavaMailSenderImpl.java:345)

        at org.springframework.mail.javamail.JavaMailSenderImpl.send(JavaMailSenderImpl.java:340)

        at com.ibt.common.mail.EmailSender.do_sendmail(EmailSender.java:100)

        at com.ibt.common.mail.EmailSender$$FastClassBySpringCGLIB$$567ddf5d.invoke(<generated>)

        at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204)

        at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:649)

        at com.ibt.common.mail.EmailSender$$EnhancerBySpringCGLIB$$8edaf598.do_sendmail(<generated>)

        at com.ibt.client.onlile.OnlineController.test(OnlineController.java:3238)

        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)

        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

        at java.lang.reflect.Method.invoke(Method.java:483)

        at org.springframework.web.method.support.InvocableHandlerMethod.invoke(InvocableHandlerMethod.java:215)

        at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:132)

        at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:110)

        at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandleMethod(RequestMappingHandlerAdapter.java:781)

        at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:721)

        at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:83)

        at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:943)

        at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:877)

        at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:966)

        at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:857)

        at javax.servlet.http.HttpServlet.service(HttpServlet.java:734)

        at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:842)

        at javax.servlet.http.HttpServlet.service(HttpServlet.java:847)

        at jeus.servlet.engine.ServletWrapper.executeServlet(ServletWrapper.java:172)

        at jeus.servlet.filter.FilterChainImpl.internalDoFilter(FilterChainImpl.java:112)

        at jeus.servlet.filter.FilterChainImpl.doFilter(FilterChainImpl.java:86)

        at org.springframework.mobile.device.DeviceResolverRequestFilter.doFilterInternal(DeviceResolverRequestFilter.java:60)

        at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)

        at jeus.servlet.filter.FilterChainImpl.internalDoFilter(FilterChainImpl.java:98)

        at jeus.servlet.filter.FilterChainImpl.doFilter(FilterChainImpl.java:86)

        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)

        at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:118)

        at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:84)

        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)

        at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:113)

        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)

        at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:103)

        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)

        at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:113)

        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)

        at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:154)

        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)

        at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:45)

        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)

        at org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:199)

        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)

        at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:110)

        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)

        at org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:50)

        at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)

        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)

        at org.springframework.security.web.session.ConcurrentSessionFilter.doFilter(ConcurrentSessionFilter.java:125)

        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)

        at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:87)

        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)

        at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:192)

        at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:160)

        at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:344)

        at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:261)

        at jeus.servlet.filter.FilterChainImpl.internalDoFilter(FilterChainImpl.java:98)

        at jeus.servlet.filter.FilterChainImpl.doFilter(FilterChainImpl.java:86)

        at egovframework.rte.ptl.mvc.filter.HTMLTagFilter.doFilter(HTMLTagFilter.java:52)

        at jeus.servlet.filter.FilterChainImpl.internalDoFilter(FilterChainImpl.java:98)

        at jeus.servlet.filter.FilterChainImpl.doFilter(FilterChainImpl.java:86)

        at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)

        at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)

        at jeus.servlet.filter.FilterChainImpl.internalDoFilter(FilterChainImpl.java:98)

        at jeus.servlet.filter.FilterChainImpl.doFilter(FilterChainImpl.java:86)

        at jeus.servlet.engine.ServletWrapper.execute(ServletWrapper.java:147)

        at jeus.servlet.engine.RequestProcessor.run(RequestProcessor.java:211)

        at jeus.util.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:1211)

        at jeus.util.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:1261)

        at jeus.servlet.engine.WebThreadPoolExecutor$WebRequestWorker.run(WebThreadPoolExecutor.java:340)

        at java.lang.Thread.run(Thread.java:745)

Caused by: java.net.SocketException: java.security.NoSuchAlgorithmException: Error constructing implementation (algorithm: Default, provider: SunJSSE, class: sun.security.ssl.SSLContextImpl$DefaultSSLContext)

        at javax.net.ssl.DefaultSSLSocketFactory.throwException(SSLSocketFactory.java:248)

        at javax.net.ssl.DefaultSSLSocketFactory.createSocket(SSLSocketFactory.java:270)

        at com.sun.mail.util.SocketFetcher.startTLS(SocketFetcher.java:249)

        at com.sun.mail.smtp.SMTPTransport.startTLS(SMTPTransport.java:1226)

        ... 80 more

Caused by: java.security.NoSuchAlgorithmException: Error constructing implementation (algorithm: Default, provider: SunJSSE, class: sun.security.ssl.SSLContextImpl$DefaultSSLContext)

        at java.security.Provider$Service.newInstance(Provider.java:1617)

        at sun.security.jca.GetInstance.getInstance(GetInstance.java:236)

        at sun.security.jca.GetInstance.getInstance(GetInstance.java:164)

        at javax.net.ssl.SSLContext.getInstance(SSLContext.java:156)

        at javax.net.ssl.SSLContext.getDefault(SSLContext.java:96)

        at javax.net.ssl.SSLSocketFactory.getDefault(SSLSocketFactory.java:122)

        at com.sun.mail.util.SocketFetcher.startTLS(SocketFetcher.java:247)

        ... 81 more

Caused by: java.security.cert.CertificateParsingException: java.io.IOException: subject key, java.lang.NullPointerException

        at sun.security.x509.X509CertInfo.<init>(X509CertInfo.java:169)

        at sun.security.x509.X509CertImpl.parse(X509CertImpl.java:1806)

        at sun.security.x509.X509CertImpl.<init>(X509CertImpl.java:195)

        at sun.security.provider.X509Factory.engineGenerateCertificate(X509Factory.java:99)

        at java.security.cert.CertificateFactory.generateCertificate(CertificateFactory.java:339)

        at sun.security.provider.JavaKeyStore.engineLoad(JavaKeyStore.java:747)

        at sun.security.provider.JavaKeyStore$JKS.engineLoad(JavaKeyStore.java:55)

        at java.security.KeyStore.load(KeyStore.java:1433)

        at sun.security.ssl.TrustManagerFactoryImpl.getCacertsKeyStore(TrustManagerFactoryImpl.java:226)

        at sun.security.ssl.SSLContextImpl$DefaultSSLContext.getDefaultTrustManager(SSLContextImpl.java:767)

        at sun.security.ssl.SSLContextImpl$DefaultSSLContext.<init>(SSLContextImpl.java:733)

        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)

        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)

        at java.lang.reflect.Constructor.newInstance(Constructor.java:408)

        at java.security.Provider$Service.newInstance(Provider.java:1595)

        ... 87 more

Caused by: java.io.IOException: subject key, java.lang.NullPointerException

        at sun.security.x509.X509Key.parse(X509Key.java:174)

        at sun.security.x509.CertificateX509Key.<init>(CertificateX509Key.java:75)

        at sun.security.x509.X509CertInfo.parse(X509CertInfo.java:667)

        at sun.security.x509.X509CertInfo.<init>(X509CertInfo.java:167)

        ... 102 more

Caused by: java.security.InvalidKeyException: java.lang.NullPointerException

        at sun.security.x509.X509Key.buildX509Key(X509Key.java:227)

        at sun.security.x509.X509Key.parse(X509Key.java:170)

        ... 105 more

Caused by: java.security.spec.InvalidKeySpecException: java.lang.NullPointerException

        at com.tmax.jce.provider.JDKKeyFactory$EC.engineGeneratePublic(Unknown Source)

        at java.security.KeyFactory.generatePublic(KeyFactory.java:334)

        at sun.security.x509.X509Key.buildX509Key(X509Key.java:223)

        ... 106 more


혹시 제가 무얼 놓치고 있는지 고견을 여쭙니다 ㅠ

<prop key="mail.smtp.starttls.enable">true</prop>
<prop key="mail.smtp.connectiontimeout">300000</prop>
<prop key="mail.smtp.timeout">300000</prop>
<prop key="mail.smtp.writetimeout">300000</prop>
0
0
  • 답변 0

  • 로그인을 하시면 답변을 등록할 수 있습니다.