[GH-ISSUE #416] Debug level messages do not print/log #220

Closed
opened 2026-03-04 01:43:22 +03:00 by kerem · 4 comments
Owner

Originally created by @fstuff on GitHub (May 14, 2016).
Original GitHub issue: https://github.com/s3fs-fuse/s3fs-fuse/issues/416

Hello,

It seems to me that debug level messages are not being printed/logged even when the debug log level is set to "debug".

Steps to view/reproduce:

  • Using version 1.79

    s3fs --version
    Amazon Simple Storage Service File System V1.79(commit:d16d616) with OpenSSL
    Copyright (C) 2010 Randy Rizun rrizun@gmail.com
    License GPL2: GNU GPL version 2 http://gnu.org/licenses/gpl.html
    This is free software: you are free to change and redistribute it.
    There is NO WARRANTY, to the extent permitted by law.

  • Start s3fs

sudo /usr/local/bin/s3fs $mybucket $mypath \
-o use_cache="/tmp/" \
-o storage_class="standard_ia" \
-o url="https://s3.amazonaws.com" \
-o endpoint="us-west-2" \
-o ensure_diskfree="1000" \
-o allow_other \
-o dbglevel="debug"

  • The following log is displayed:

May 13 23:02:30 ip-10-0-0-215 s3fs[11950]: s3fs.cpp:set_s3fs_log_level(253): change debug level from [CRT] to [DBG]
May 13 23:02:30 ip-10-0-0-215 s3fs[11950]: PROC(uid=0, gid=0) - MountPoint(uid=497, gid=497, mode=40755)
[ec2-user@ip-10-0-0-215 gallery]$ May 13 23:02:30 ip-10-0-0-215 s3fs[11951]: s3fs.cpp:s3fs_init(3334): init v1.79(commit:d16d616) with OpenSSL
May 13 23:02:30 ip-10-0-0-215 s3fs[11951]: check services.
May 13 23:02:30 ip-10-0-0-215 s3fs[11951]: check a bucket.
May 13 23:02:30 ip-10-0-0-215 s3fs[11951]: URL is https://s3.amazonaws.com/$mybucket/
May 13 23:02:30 ip-10-0-0-215 s3fs[11951]: URL changed is https://$mybucket.s3.amazonaws.com/
May 13 23:02:30 ip-10-0-0-215 s3fs[11951]: computing signature [GET] [/] [] []
May 13 23:02:30 ip-10-0-0-215 s3fs[11951]: url is https://s3.amazonaws.com
May 13 23:02:30 ip-10-0-0-215 s3fs[11951]: HTTP response code 200

  • Attempt to create file in $mypath

cp robots.txt $mypath

  • The following is the end portion of the log:

May 13 23:02:42 ip-10-0-0-215 s3fs[11951]: [path=/robots.txt][mode=100644]
May 13 23:02:42 ip-10-0-0-215 s3fs[11951]: [tpath=/robots.txt]
May 13 23:02:42 ip-10-0-0-215 s3fs[11951]: create zero byte file object.
May 13 23:02:42 ip-10-0-0-215 s3fs[11951]: URL is https://s3.amazonaws.com/$mybucket/robots.txt
May 13 23:02:42 ip-10-0-0-215 s3fs[11951]: URL changed is https://$mybucket.s3.amazonaws.com/robots.txt
May 13 23:02:42 ip-10-0-0-215 s3fs[11951]: computing signature [PUT] [/robots.txt] [] []
May 13 23:02:42 ip-10-0-0-215 s3fs[11951]: url is https://s3.amazonaws.com
May 13 23:02:42 ip-10-0-0-215 s3fs[11951]: uploading... [path=/robots.txt][fd=-1][size=0]
May 13 23:02:42 ip-10-0-0-215 s3fs[11951]: HTTP response code 403 was returned, returning EPERM
May 13 23:02:42 ip-10-0-0-215 s3fs[11951]: delete stat cache entry[path=/robots.txt]

  • The bolded log line from the prior snippet appears to come from a call to S3fsCurl::RequestPerform(), curl.cpp, lines 1956-1959:

case 403:
S3FS_PRN_INFO3("HTTP response code 403 was returned, returning EPERM");
S3FS_PRN_DBG("Body Text: %s", (bodydata ? bodydata->str() : ""));
return -EPERM;

As shown in the log printout above, however, the debug line is not logged. As far as I can tell, no debug printouts are displaying at all.

Originally created by @fstuff on GitHub (May 14, 2016). Original GitHub issue: https://github.com/s3fs-fuse/s3fs-fuse/issues/416 Hello, It seems to me that debug level messages are not being printed/logged even when the debug log level is set to "debug". Steps to view/reproduce: - Using version 1.79 > s3fs --version > Amazon Simple Storage Service File System V1.79(commit:d16d616) with OpenSSL > Copyright (C) 2010 Randy Rizun rrizun@gmail.com > License GPL2: GNU GPL version 2 http://gnu.org/licenses/gpl.html > This is free software: you are free to change and redistribute it. > There is NO WARRANTY, to the extent permitted by law. - Start s3fs `sudo /usr/local/bin/s3fs $mybucket $mypath \ ` `-o use_cache="/tmp/" \ ` `-o storage_class="standard_ia" \ ` `-o url="https://s3.amazonaws.com" \ ` `-o endpoint="us-west-2" \ ` `-o ensure_diskfree="1000" \ ` `-o allow_other \ ` `-o dbglevel="debug"` - The following log is displayed: > May 13 23:02:30 ip-10-0-0-215 s3fs[11950]: s3fs.cpp:set_s3fs_log_level(253): **change debug level from [CRT] to [DBG]** > May 13 23:02:30 ip-10-0-0-215 s3fs[11950]: PROC(uid=0, gid=0) - MountPoint(uid=497, gid=497, mode=40755) > [ec2-user@ip-10-0-0-215 gallery]$ May 13 23:02:30 ip-10-0-0-215 s3fs[11951]: s3fs.cpp:s3fs_init(3334): init v1.79(commit:d16d616) with OpenSSL > May 13 23:02:30 ip-10-0-0-215 s3fs[11951]: check services. > May 13 23:02:30 ip-10-0-0-215 s3fs[11951]: check a bucket. > May 13 23:02:30 ip-10-0-0-215 s3fs[11951]: URL is https://s3.amazonaws.com/$mybucket/ > May 13 23:02:30 ip-10-0-0-215 s3fs[11951]: URL changed is https://$mybucket.s3.amazonaws.com/ > May 13 23:02:30 ip-10-0-0-215 s3fs[11951]: computing signature [GET] [/] [] [] > May 13 23:02:30 ip-10-0-0-215 s3fs[11951]: url is https://s3.amazonaws.com > May 13 23:02:30 ip-10-0-0-215 s3fs[11951]: HTTP response code 200 - Attempt to create file in $mypath `cp robots.txt $mypath` - The following is the end portion of the log: > May 13 23:02:42 ip-10-0-0-215 s3fs[11951]: [path=/robots.txt][mode=100644] > May 13 23:02:42 ip-10-0-0-215 s3fs[11951]: [tpath=/robots.txt] > May 13 23:02:42 ip-10-0-0-215 s3fs[11951]: create zero byte file object. > May 13 23:02:42 ip-10-0-0-215 s3fs[11951]: URL is https://s3.amazonaws.com/$mybucket/robots.txt > May 13 23:02:42 ip-10-0-0-215 s3fs[11951]: URL changed is https://$mybucket.s3.amazonaws.com/robots.txt > May 13 23:02:42 ip-10-0-0-215 s3fs[11951]: computing signature [PUT] [/robots.txt] [] [] > May 13 23:02:42 ip-10-0-0-215 s3fs[11951]: url is https://s3.amazonaws.com > May 13 23:02:42 ip-10-0-0-215 s3fs[11951]: uploading... [path=/robots.txt][fd=-1][size=0] > May 13 23:02:42 ip-10-0-0-215 s3fs[11951]: **HTTP response code 403 was returned, returning EPERM** > May 13 23:02:42 ip-10-0-0-215 s3fs[11951]: delete stat cache entry[path=/robots.txt] - The bolded log line from the prior snippet appears to come from a call to S3fsCurl::RequestPerform(), [curl.cpp, lines 1956-1959](https://github.com/s3fs-fuse/s3fs-fuse/blob/master/src/curl.cpp#L1956): `case 403: ` `S3FS_PRN_INFO3("HTTP response code 403 was returned, returning EPERM"); ` `S3FS_PRN_DBG("Body Text: %s", (bodydata ? bodydata->str() : "")); ` `return -EPERM;` As shown in the log printout above, however, the debug line is not logged. As far as I can tell, no debug printouts are displaying at all.
kerem closed this issue 2026-03-04 01:43:22 +03:00
Author
Owner

@ggtakec commented on GitHub (May 15, 2016):

@fstuff
You are running s3fs as background process, then s3fs's message puts syslog(/var/messages etc) now.
S3FS_PRN_DBG function(macro) puts messages as LOG_DEBUG level of syslog messages.
Then you can change syslog.conf for putting LOG_DEBUG level log, or run s3fs as forground process.
If you run s3fs foreground, you can catch LOG_DEBUG message on stdout.

Thanks in advance for your assistance.

<!-- gh-comment-id:219268537 --> @ggtakec commented on GitHub (May 15, 2016): @fstuff You are running s3fs as background process, then s3fs's message puts syslog(/var/messages etc) now. S3FS_PRN_DBG function(macro) puts messages as LOG_DEBUG level of syslog messages. Then you can change syslog.conf for putting LOG_DEBUG level log, or run s3fs as forground process. If you run s3fs foreground, you can catch LOG_DEBUG message on stdout. Thanks in advance for your assistance.
Author
Owner

@fstuff commented on GitHub (May 15, 2016):

Ok thank you for your helpful response. I ran s3fs in the foreground and confirmed that debug messages are printed to the console. Looks like there is some issue with my syslog configuration. Closing this issue, thanks again.

<!-- gh-comment-id:219294676 --> @fstuff commented on GitHub (May 15, 2016): Ok thank you for your helpful response. I ran s3fs in the foreground and confirmed that debug messages are printed to the console. Looks like there is some issue with my syslog configuration. Closing this issue, thanks again.
Author
Owner

@SachitNayak commented on GitHub (Jul 15, 2022):

to run s3fs as foreground process use -f, example: s3fs -f .......

<!-- gh-comment-id:1185661003 --> @SachitNayak commented on GitHub (Jul 15, 2022): to run s3fs as foreground process use -f, example: s3fs -f .......
Author
Owner

@vijayscsa commented on GitHub (Dec 29, 2023):

Hi Team, which is the log file or folders to be checked for debug as my s3fs mounted fs in Redhat linux 8 disconnects frequently.. Also how shall i find out how many minutes the file system was mounted/up and running.. Thanks

<!-- gh-comment-id:1871692684 --> @vijayscsa commented on GitHub (Dec 29, 2023): Hi Team, which is the log file or folders to be checked for debug as my s3fs mounted fs in Redhat linux 8 disconnects frequently.. Also how shall i find out how many minutes the file system was mounted/up and running.. Thanks
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/s3fs-fuse#220
No description provided.