質問編集履歴
6
書式の改善
title
CHANGED
File without changes
|
body
CHANGED
@@ -35,7 +35,8 @@
|
|
35
35
|
}
|
36
36
|
}
|
37
37
|
```
|
38
|
-
|
38
|
+
springboot
|
39
|
+
```
|
39
40
|
2018-06-27 04:40:03.457 INFO 3177 --- [ main] c.t.springboot.LineEventApplication : Starting LineEventApplication v0.0.1-SNAPSHOT on ip-155-155-20-206 with PID 3177 (/home/ec2-user/botapp/MyBootApp-0.0.1-SNAPSHOT.jar started by root in /home/ec2-user/botapp)
|
40
41
|
2018-06-27 04:40:03.474 INFO 3177 --- [ main] c.t.springboot.LineEventApplication : No active profile set, falling back to default profiles: default
|
41
42
|
2018-06-27 04:40:03.687 INFO 3177 --- [ main] ConfigServletWebServerApplicationContext : Refreshing org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext@3c679bde: startup date [Wed Jun 27 04:40:03 UTC 2018]; root of context hierarchy
|
@@ -65,7 +66,8 @@
|
|
65
66
|
2018-06-27 04:40:10.991 INFO 3177 --- [ main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat started on port(s): 443 (https) with context path ''
|
66
67
|
2018-06-27 04:40:10.997 INFO 3177 --- [ main] c.t.springboot.LineEventApplication : Started LineEventApplication in 8.608 seconds (JVM running for 9.585)
|
67
68
|
```
|
68
|
-
|
69
|
+
webhookの接続確認を押した後の/var/log/messages
|
70
|
+
```
|
69
71
|
Jun 27 04:26:09 ip-155-155-20-206 dhclient[2192]: XMT: Solicit on eth0, interval 113460ms.
|
70
72
|
Jun 27 04:28:03 ip-155-155-20-206 dhclient[2192]: XMT: Solicit on eth0, interval 131660ms.
|
71
73
|
Jun 27 04:30:15 ip-155-155-20-206 dhclient[2192]: XMT: Solicit on eth0, interval 129250ms.
|
5
ログの追記
title
CHANGED
File without changes
|
body
CHANGED
@@ -9,8 +9,87 @@
|
|
9
9
|
### 発生している問題・エラーメッセージ
|
10
10
|
ドメイン/callbackをwebhookに指定したところ以下のエラーが起こりました。
|
11
11
|
|
12
|
-
|
12
|
+

|
13
13
|
|
14
|
+
###ソースコード
|
15
|
+
```java
|
16
|
+
@SpringBootApplication
|
17
|
+
@LineMessageHandler
|
18
|
+
public class LineEventApplication {
|
19
|
+
|
20
|
+
public static void main(String[] args) {
|
21
|
+
SpringApplication.run(LineEventApplication.class, args);
|
22
|
+
}
|
23
|
+
|
24
|
+
@EventMapping
|
25
|
+
public TextMessage handleTextMessageEvent(MessageEvent<TextMessageContent> event) {
|
26
|
+
System.out.println("event: " + event);
|
27
|
+
System.out.println("LINEID: " + event.getSource().getUserId());
|
28
|
+
System.out.println("text: " + event.getMessage().getText());
|
29
|
+
return new TextMessage(event.getMessage().getText());
|
30
|
+
}
|
31
|
+
|
32
|
+
@EventMapping
|
33
|
+
public void handleDefaultMessageEvent(Event event) {
|
34
|
+
System.out.println("event: " + event);
|
35
|
+
}
|
36
|
+
}
|
37
|
+
```
|
38
|
+
```springboot
|
39
|
+
2018-06-27 04:40:03.457 INFO 3177 --- [ main] c.t.springboot.LineEventApplication : Starting LineEventApplication v0.0.1-SNAPSHOT on ip-155-155-20-206 with PID 3177 (/home/ec2-user/botapp/MyBootApp-0.0.1-SNAPSHOT.jar started by root in /home/ec2-user/botapp)
|
40
|
+
2018-06-27 04:40:03.474 INFO 3177 --- [ main] c.t.springboot.LineEventApplication : No active profile set, falling back to default profiles: default
|
41
|
+
2018-06-27 04:40:03.687 INFO 3177 --- [ main] ConfigServletWebServerApplicationContext : Refreshing org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext@3c679bde: startup date [Wed Jun 27 04:40:03 UTC 2018]; root of context hierarchy
|
42
|
+
2018-06-27 04:40:06.933 INFO 3177 --- [ main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat initialized with port(s): 443 (https)
|
43
|
+
2018-06-27 04:40:07.000 INFO 3177 --- [ main] o.apache.catalina.core.StandardService : Starting service [Tomcat]
|
44
|
+
2018-06-27 04:40:07.001 INFO 3177 --- [ main] org.apache.catalina.core.StandardEngine : Starting Servlet Engine: Apache Tomcat/8.5.31
|
45
|
+
2018-06-27 04:40:07.028 INFO 3177 --- [ost-startStop-1] o.a.catalina.core.AprLifecycleListener : The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: [/usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib]
|
46
|
+
2018-06-27 04:40:07.184 INFO 3177 --- [ost-startStop-1] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring embedded WebApplicationContext
|
47
|
+
2018-06-27 04:40:07.189 INFO 3177 --- [ost-startStop-1] o.s.web.context.ContextLoader : Root WebApplicationContext: initialization completed in 3527 ms
|
48
|
+
2018-06-27 04:40:07.467 INFO 3177 --- [ost-startStop-1] o.s.b.w.servlet.ServletRegistrationBean : Servlet dispatcherServlet mapped to [/]
|
49
|
+
2018-06-27 04:40:07.471 INFO 3177 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: 'characterEncodingFilter' to: [/*]
|
50
|
+
2018-06-27 04:40:07.475 INFO 3177 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: 'hiddenHttpMethodFilter' to: [/*]
|
51
|
+
2018-06-27 04:40:07.475 INFO 3177 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: 'httpPutFormContentFilter' to: [/*]
|
52
|
+
2018-06-27 04:40:07.475 INFO 3177 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: 'requestContextFilter' to: [/*]
|
53
|
+
2018-06-27 04:40:07.755 INFO 3177 --- [ main] o.s.w.s.handler.SimpleUrlHandlerMapping : Mapped URL path [/**/favicon.ico] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
|
54
|
+
2018-06-27 04:40:08.843 INFO 3177 --- [ main] s.w.s.m.m.a.RequestMappingHandlerAdapter : Looking for @ControllerAdvice: org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext@3c679bde: startup date [Wed Jun 27 04:40:03 UTC 2018]; root of context hierarchy
|
55
|
+
2018-06-27 04:40:08.988 INFO 3177 --- [ main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/hello]}" onto public java.lang.String com.taguchi.springboot.RequestController.index()
|
56
|
+
2018-06-27 04:40:08.999 INFO 3177 --- [ main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/error],produces=[text/html]}" onto public org.springframework.web.servlet.ModelAndView org.springframework.boot.autoconfigure.web.servlet.error.BasicErrorController.errorHtml(javax.servlet.http.HttpServletRequest,javax.servlet.http.HttpServletResponse)
|
57
|
+
2018-06-27 04:40:09.007 INFO 3177 --- [ main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/error]}" onto public org.springframework.http.ResponseEntity<java.util.Map<java.lang.String, java.lang.Object>> org.springframework.boot.autoconfigure.web.servlet.error.BasicErrorController.error(javax.servlet.http.HttpServletRequest)
|
58
|
+
2018-06-27 04:40:09.015 INFO 3177 --- [ main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/callback],methods=[POST]}" onto public void com.linecorp.bot.spring.boot.support.LineMessageHandlerSupport.callback(java.util.List<com.linecorp.bot.model.event.Event>)
|
59
|
+
2018-06-27 04:40:09.073 INFO 3177 --- [ main] o.s.w.s.handler.SimpleUrlHandlerMapping : Mapped URL path [/webjars/**] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
|
60
|
+
2018-06-27 04:40:09.073 INFO 3177 --- [ main] o.s.w.s.handler.SimpleUrlHandlerMapping : Mapped URL path [/**] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
|
61
|
+
2018-06-27 04:40:10.124 INFO 3177 --- [ main] o.s.j.e.a.AnnotationMBeanExporter : Registering beans for JMX exposure on startup
|
62
|
+
2018-06-27 04:40:10.168 INFO 3177 --- [ main] c.l.b.s.b.s.LineMessageHandlerSupport : Registered LINE Messaging API event handler: count = 2
|
63
|
+
2018-06-27 04:40:10.175 INFO 3177 --- [ main] c.l.b.s.b.s.LineMessageHandlerSupport : Mapped "[MessageEvent<TextMessageContent>]" onto public com.linecorp.bot.model.message.TextMessage com.taguchi.springboot.LineEventApplication.handleTextMessageEvent(com.linecorp.bot.model.event.MessageEvent<com.linecorp.bot.model.event.message.TextMessageContent>)
|
64
|
+
2018-06-27 04:40:10.175 INFO 3177 --- [ main] c.l.b.s.b.s.LineMessageHandlerSupport : Mapped "[Event]" onto public void com.taguchi.springboot.LineEventApplication.handleDefaultMessageEvent(com.linecorp.bot.model.event.Event)
|
65
|
+
2018-06-27 04:40:10.991 INFO 3177 --- [ main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat started on port(s): 443 (https) with context path ''
|
66
|
+
2018-06-27 04:40:10.997 INFO 3177 --- [ main] c.t.springboot.LineEventApplication : Started LineEventApplication in 8.608 seconds (JVM running for 9.585)
|
67
|
+
```
|
68
|
+
```webhookの接続確認を押した後の/var/log/messages
|
69
|
+
Jun 27 04:26:09 ip-155-155-20-206 dhclient[2192]: XMT: Solicit on eth0, interval 113460ms.
|
70
|
+
Jun 27 04:28:03 ip-155-155-20-206 dhclient[2192]: XMT: Solicit on eth0, interval 131660ms.
|
71
|
+
Jun 27 04:30:15 ip-155-155-20-206 dhclient[2192]: XMT: Solicit on eth0, interval 129250ms.
|
72
|
+
Jun 27 04:32:24 ip-155-155-20-206 dhclient[2192]: XMT: Solicit on eth0, interval 108340ms.
|
73
|
+
Jun 27 04:34:12 ip-155-155-20-206 dhclient[2192]: XMT: Solicit on eth0, interval 116950ms.
|
74
|
+
Jun 27 04:36:10 ip-155-155-20-206 dhclient[2192]: XMT: Solicit on eth0, interval 119560ms.
|
75
|
+
Jun 27 04:38:09 ip-155-155-20-206 dhclient[2192]: XMT: Solicit on eth0, interval 109390ms.
|
76
|
+
Jun 27 04:39:59 ip-155-155-20-206 dhclient[2192]: XMT: Solicit on eth0, interval 108960ms.
|
77
|
+
Jun 27 04:41:48 ip-155-155-20-206 dhclient[2192]: XMT: Solicit on eth0, interval 126880ms.
|
78
|
+
Jun 27 04:42:00 ip-155-155-20-206 dhclient[2094]: DHCPREQUEST on eth0 to 155.155.20.1 port 67 (xid=0x4a73ab14)
|
79
|
+
Jun 27 04:42:00 ip-155-155-20-206 dhclient[2094]: DHCPACK from 155.155.20.1 (xid=0x4a73ab14)
|
80
|
+
Jun 27 04:42:00 ip-155-155-20-206 dhclient[2094]: bound to 155.155.20.206 -- renewal in 1565 seconds.
|
81
|
+
Jun 27 04:42:00 ip-155-155-20-206 ec2net: [get_meta] Trying to get http://169.254.169.254/latest/meta-data/network/interfaces/macs/06:0d:5a:1b:73:64/local-ipv4s
|
82
|
+
Jun 27 04:42:00 ip-155-155-20-206 ec2net: [rewrite_aliases] Rewriting aliases of eth0
|
83
|
+
Jun 27 04:43:55 ip-155-155-20-206 dhclient[2192]: XMT: Solicit on eth0, interval 109190ms.
|
84
|
+
Jun 27 04:45:44 ip-155-155-20-206 dhclient[2192]: XMT: Solicit on eth0, interval 123840ms.
|
85
|
+
Jun 27 04:47:48 ip-155-155-20-206 dhclient[2192]: XMT: Solicit on eth0, interval 120610ms.
|
86
|
+
Jun 27 04:49:48 ip-155-155-20-206 dhclient[2192]: XMT: Solicit on eth0, interval 126740ms.
|
87
|
+
Jun 27 04:51:55 ip-155-155-20-206 dhclient[2192]: XMT: Solicit on eth0, interval 122680ms.
|
88
|
+
Jun 27 04:53:58 ip-155-155-20-206 dhclient[2192]: XMT: Solicit on eth0, interval 128890ms.
|
89
|
+
```
|
90
|
+
|
91
|
+
|
92
|
+
|
14
93
|
### 試したこと
|
15
94
|
|
16
95
|
アクセストークンの再発
|
@@ -21,4 +100,5 @@
|
|
21
100
|
|
22
101
|
javaのバージョンは8
|
23
102
|
ec2インスタンスはamazon linux
|
103
|
+
証明書情報
|
24
|
-
証明書
|
104
|
+

|
4
書式の改善
title
CHANGED
File without changes
|
body
CHANGED
@@ -4,7 +4,7 @@
|
|
4
4
|
ドメインをお名前.comで作成し、ネームサーバーをawsの方に変更しました。
|
5
5
|
ec2インスタンスにeipを設定し、rote53でドメインと結びつけました。
|
6
6
|
その後、以下の記事を参考にLet's Encryptで証明書を作成して配置しhttps(ポートは443)アクセスをできるようにしました。
|
7
|
-
[
|
7
|
+
[Spring bootでSSL(HTTPS)を有効にする~Let's Encrypt編~](https://qiita.com/keigohtr/items/faa1bd0c647df54d6594)
|
8
8
|
|
9
9
|
### 発生している問題・エラーメッセージ
|
10
10
|
ドメイン/callbackをwebhookに指定したところ以下のエラーが起こりました。
|
3
書式の改善
title
CHANGED
File without changes
|
body
CHANGED
@@ -4,7 +4,7 @@
|
|
4
4
|
ドメインをお名前.comで作成し、ネームサーバーをawsの方に変更しました。
|
5
5
|
ec2インスタンスにeipを設定し、rote53でドメインと結びつけました。
|
6
6
|
その後、以下の記事を参考にLet's Encryptで証明書を作成して配置しhttps(ポートは443)アクセスをできるようにしました。
|
7
|
-
https://qiita.com/keigohtr/items/faa1bd0c647df54d6594
|
7
|
+
[リンク内容](https://qiita.com/keigohtr/items/faa1bd0c647df54d6594)
|
8
8
|
|
9
9
|
### 発生している問題・エラーメッセージ
|
10
10
|
ドメイン/callbackをwebhookに指定したところ以下のエラーが起こりました。
|
2
文法の修正
title
CHANGED
@@ -1,1 +1,1 @@
|
|
1
|
-
Let's Encryptで作成した証明書を使い
|
1
|
+
Let's Encryptで作成した証明書を使いhttps化したサイトがwebhookに反応しない
|
body
CHANGED
File without changes
|
1
誤字
title
CHANGED
File without changes
|
body
CHANGED
@@ -7,7 +7,7 @@
|
|
7
7
|
https://qiita.com/keigohtr/items/faa1bd0c647df54d6594
|
8
8
|
|
9
9
|
### 発生している問題・エラーメッセージ
|
10
|
-
ドメイン/callbackをwebhookに指定したところ以下のエラーが起こりした。
|
10
|
+
ドメイン/callbackをwebhookに指定したところ以下のエラーが起こりました。
|
11
11
|
|
12
12
|
Webhook との通信でエラーが発生しました
|
13
13
|
|