先总结:Flume配置文件后面,不能跟注释
报错代码:
[ERROR - org.apache.flume.SinkRunner$PollingRunner.run(SinkRunner.java:158)] Unable to deliver event. Exception follows.
org.apache.flume.EventDeliveryException: Failed to open file /opt/module/flume/jobs/case3/flume3outputdatas #è¿�个æ��件夹å¿�é¡»æ��å��å�å�¨/1711698243135-1 while delivering event
at org.apache.flume.sink.RollingFileSink.process(RollingFileSink.java:185) ~[flume-ng-core-1.10.1.jar:1.10.1]
at org.apache.flume.sink.DefaultSinkProcessor.process(DefaultSinkProcessor.java:39) ~[flume-ng-core-1.10.1.jar:1.10.1]
at org.apache.flume.SinkRunner$PollingRunner.run(SinkRunner.java:145) ~[flume-ng-core-1.10.1.jar:1.10.1]
at java.lang.Thread.run(Thread.java:748) ~[?:1.8.0_212]
Caused by: java.io.FileNotFoundException: /opt/module/flume/jobs/case3/flume3outputdatas #è¿�个æ��件夹å¿�é¡»æ��å��å�å�¨/1711698243135-1 (没有那个文件或目录)
at java.io.FileOutputStream.open0(Native Method) ~[?:1.8.0_212]
at java.io.FileOutputStream.open(FileOutputStream.java:270) ~[?:1.8.0_212]
at java.io.FileOutputStream.<init>(FileOutputStream.java:213) ~[?:1.8.0_212]
at java.io.FileOutputStream.<init>(FileOutputStream.java:162) ~[?:1.8.0_212]
at org.apache.flume.sink.RollingFileSink.process(RollingFileSink.java:176) ~[flume-ng-core-1.10.1.jar:1.10.1]
... 3 more
报错截图:
Failed to open file /opt/module/flume/jobs/case3/flume3outputdatas
说我这个文件打不开,我一查,后面有段注释,删了再跑?
哟,正常了,原来如此~
错误原因:(flume.conf配置文件后面不能跟注释)
删了注释后再试:
嘿嘿嘿~