td-agentでtemporarily failed to flush the buffer error="could not find a temporary directory" と言われたら
td-agentでログをS3にアップロードって、よくやりますよね。 でも、アップロードされないのです(TT)。
で、td-agentのログを調べたら、
temporarily failed to flush the buffer. next_retry=2016-11-11 07:26:34 +0000 error_class="ArgumentError" error="could not find a temporary directory"
なんて言われてる。バッファをフラッシュできないから、ログがS3に上がらないのは分かるけど、temporary directory
ってなんだろ?w
と思って調べたら、/tmp
の事らしい。
で、確認したら、この問題が起こったサーバだけパーミッションがおかしい。。。。。
ls -la / drwxrwxrwt. 12 root root 12288 Oct 10 06:01 tmp
こうなってて欲しいのに実際は、
ls -la drwxr-xr-x. 4 root root 4096 Oct 10 07:03 tmp
なので、パーミッションを直して、td-agentを再起動したら、無事にログがS3に送られるようになりました。