xaecbd/KCenter

配置了email服务 但是好像不行

chengzhengheng opened this issue · 4 comments

能给一个配置邮件服务器的例子吗

@chengzhengheng

spring.mail.host=
spring.mail.username=KafkaCenter@xaecbd.com
spring.mail.password=xxxix

请提供报错日志

spring.mail.hosta=smtp.qq.com:465
spring.mail.username=@qq.com
spring.mail.password=

@郑正恒

spring.mail.host=
spring.mail.username=KafkaCenter@xaecbd.com
spring.mail.password=xxxix

请提供报错日志
2021-05-26 09:55:20,237 ERROR [pool-2-thread-4] AlertaService: get virtual-email-groups has error.
java.lang.IllegalArgumentException: URI is not absolute
at java.net.URI.toURL(URI.java:1088)
at org.springframework.http.client.SimpleClientHttpRequestFactory.createRequest(SimpleClientHttpRequestFactory.java:145)
at org.springframework.http.client.support.HttpAccessor.createRequest(HttpAccessor.java:124)
at org.springframework.web.client.RestTemplate.doExecute(RestTemplate.java:735)
at org.springframework.web.client.RestTemplate.execute(RestTemplate.java:674)
at org.springframework.web.client.RestTemplate.getForObject(RestTemplate.java:315)
at org.nesc.ec.bigdata.service.AlertaService.getAlarmGroupMap(AlertaService.java:75)
at org.nesc.ec.bigdata.job.CollectConsumerLagJob.watchAlert(CollectConsumerLagJob.java:121)
at org.nesc.ec.bigdata.job.CollectConsumerLagJob.collectConsumerLag(CollectConsumerLagJob.java:83)
at org.nesc.ec.bigdata.job.InitRunJob.lambda$runCollectConsumerLagJob$0(InitRunJob.java:69)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
2021-05-26 09:55:20,238 ERROR [Thread-2] AlertaService: generateToAlertaError Cluster:[test-kafka] Topic:[appicdmp_device_log] Group:[g_appicdmp_device_log_metaId_combine]
java.lang.IllegalArgumentException: URI is not absolute
at java.net.URI.toURL(URI.java:1088)
at org.springframework.http.client.SimpleClientHttpRequestFactory.createRequest(SimpleClientHttpRequestFactory.java:145)
at org.springframework.http.client.support.HttpAccessor.createRequest(HttpAccessor.java:124)
at org.springframework.web.client.RestTemplate.doExecute(RestTemplate.java:735)
at org.springframework.web.client.RestTemplate.execute(RestTemplate.java:674)
at org.springframework.web.client.RestTemplate.postForEntity(RestTemplate.java:449)
at org.nesc.ec.bigdata.service.AlertaService.generateSendToAlterService(AlertaService.java:150)
at org.nesc.ec.bigdata.service.AlertaService.sendToAlerta(AlertaService.java:64)
at org.nesc.ec.bigdata.job.NoticeJob.notice(NoticeJob.java:102)
at org.nesc.ec.bigdata.job.NoticeJob.lambda$runNoticeJob$0(NoticeJob.java:83)
at java.lang.Thread.run(Thread.java:748)
2021-05-26 09:55:20,310 ERROR [pool-2-thread-4] AlertaService: get virtual-email-groups has error.
java.lang.IllegalArgumentException: URI is not absolute
at java.net.URI.toURL(URI.java:1088)
at org.springframework.http.client.SimpleClientHttpRequestFactory.createRequest(SimpleClientHttpRequestFactory.java:145)
at org.springframework.http.client.support.HttpAccessor.createRequest(HttpAccessor.java:124)
at org.springframework.web.client.RestTemplate.doExecute(RestTemplate.java:735)
at org.springframework.web.client.RestTemplate.execute(RestTemplate.java:674)
at org.springframework.web.client.RestTemplate.getForObject(RestTemplate.java:315)
at org.nesc.ec.bigdata.service.AlertaService.getAlarmGroupMap(AlertaService.java:75)
at org.nesc.ec.bigdata.job.CollectConsumerLagJob.watchAlert(CollectConsumerLagJob.java:121)
at org.nesc.ec.bigdata.job.CollectConsumerLagJob.collectConsumerLag(CollectConsumerLagJob.java:83)
at org.nesc.ec.bigdata.job.InitRunJob.lambda$runCollectConsumerLagJob$0(InitRunJob.java:69)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
2021-05-26 09:55:20,310 ERROR [Thread-2] AlertaService: generateToAlertaError Cluster:[new_kafka] Topic:[appicdmp_event_adx_transit] Group:[appicdmp_event_adx_transit_group]
java.lang.IllegalArgumentException: URI is not absolute
at java.net.URI.toURL(URI.java:1088)
at org.springframework.http.client.SimpleClientHttpRequestFactory.createRequest(SimpleClientHttpRequestFactory.java:145)
at org.springframework.http.client.support.HttpAccessor.createRequest(HttpAccessor.java:124)
at org.springframework.web.client.RestTemplate.doExecute(RestTemplate.java:735)
at org.springframework.web.client.RestTemplate.execute(RestTemplate.java:674)
at org.springframework.web.client.RestTemplate.postForEntity(RestTemplate.java:449)
at org.nesc.ec.bigdata.service.AlertaService.generateSendToAlterService(AlertaService.java:150)
at org.nesc.ec.bigdata.service.AlertaService.sendToAlerta(AlertaService.java:64)
at org.nesc.ec.bigdata.job.NoticeJob.notice(NoticeJob.java:102)
at org.nesc.ec.bigdata.job.NoticeJob.lambda$runNoticeJob$0(NoticeJob.java:83)
at java.lang.Thread.run(Thread.java:748)

该报错信息已经修复