Does anyone rotate -verbose snowflake logs?

Can anyone tell me how they do it.

I realize this is not a snowflake proxy problem. I used the golang way to build the proxy so I followed their instructions to the letter. All those efforts are posted in the thread “A follow up question about Snowflake”.

Doing this using an independent logrotate configuration outside of the /etc/logrotate.conf system.

I use -verbose because I like to see what is going on like where are all the clients from, use time, durations, etc. I have an idea that they are mostly rucnir.

My first attempt resulted in a new file being created (snowflake.log) but the proxy kept writing to the rotated snowflake.1 file while the new one stayed at 0 Kib. Reading the docs again, I realized I needed copytruncate as an option. Reset and boot.

A few hours later, at midnight, it resulted in a new file with as many starting NULLs in it as the original file it replaced followed by entries starting at 00:01:40 UTC. At 00:55 I kill the proxy and restart. It seems the proxy retains the pointer to the next writing position in the file.

A bit of digging and deduction tells me their instructions may be wrong and the command to create a log file:
nohup ./proxy >snowflake.log 2>&1 &
should be append to file:
nohup ./proxy >> snowflake.log 2>&1 &

Midnight will tell me if I am right.

I also had to change their @reboot statement
from:
@reboot nohup /home/snowflake/snowflake/proxy/proxy > /home/snowflake/snowflake/proxy/snowflake.log 2>&1 &
to:
@reboot sleep 180 && nohup /home/snowflake/snowflake/proxy/proxy >> /home/snowflake/snowflake/proxy/snowflake.log 2>&1 &
Their way the proxy process starts too early and the system is not fully up so it cannot find the peer broker since DNS is not ready yet.

My logrotate file:
copytruncate

“/home/bob/snowflake.log” {
daily
rotate 15
missingok
notifempty
}

I guess nobody is doing -verbose.
At midnight it now rotated properly. Looks like I guessed correctly.

Now I can get reports like sessions opened but not closed:
2024/08/27 04:11:47 19b55bc10e339ffa-824638893702 open ip X.X.X.X
2024/08/27 08:23:11 6188a41d2aa55b49-824639769014 open ip X.X.X.X
tcpdump confirms these

and duration reports like:
Duration: 000h 08m 25s open 2024/08/28 08:02:56 ip X.X.X.X 53ce14554eeca71a-824641046682 close 2024/08/28 08:11:21
Duration: 000h 04m 11s open 2024/08/28 08:24:58 ip X.X.X.X a820c71ada1e7af8-824636400214 close 2024/08/28 08:29:09
Duration: 001h 42m 30s open 2024/08/28 08:27:56 ip X.X.X.X 8d1dd51e2822de37-824640798214 close 2024/08/28 10:10:26

Any way to get them to make corrections to that instruction page(s)?

You can go to the page and click “Edit this page”.

OK.

I will mark this thread as solved since I answered my own question

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.