Proxy in production: running headless?

90 views
Skip to first unread message

James Lampert

unread,
Apr 10, 2018, 2:22:45 PM4/10/18
to Google Cloud SQL discuss
I've gotten to the point where I've got my Tomcat-based webapp talking to MySQL via the Proxy, and accessing a storage bucket via GCSFUSE. But at present, I'm GCSFUSEing the bucket and launching the proxy manually, from a terminal session.

It seems fairly simple to automate the GCSFUSE mount for headless operation, because it doesn't produce any ongoing console output, but what about a headless proxy? As presently launched, it spits out a line every time a connection gets opened or closed. I could, of course, redirect STDOUT and STDERR to a file, but under heavy use, that file could get very big, very fast.

Dinesh (Google Platform Support)

unread,
Apr 11, 2018, 9:14:34 AM4/11/18
to Google Cloud SQL discuss
You may want to try reducing cloud proxy output by using -verbose or -quiet flags as described in this documentation[1]. 

 -verbose
    When explicitly set to false, disable log messages that are not errors nor first-time startup messages (e.g. when new connections are established).

 -quiet
    Disable log messages (e.g. when new connections are established).
    WARNING: this option disables ALL logging output (including connection errors), which will likely make debugging difficult. The -quiet flag takes precedence over the -verbose flag.

Other than that, there are some ways in Linux to sending the process into the background so that you don't have to worry about the text output. Here are some examples[2][3]


James Lampert

unread,
Apr 13, 2018, 6:14:40 PM4/13/18
to Google Cloud SQL discuss
I ended up (as noted in a thread on "gce-discussion") (1) launching the Proxy right in the /etc/init-d/tomcat8 script itself (checking first, to make sure it isn't already active), (2) setting verbose to false, and (3) directing the output to a log file.
Reply all
Reply to author
Forward
0 new messages