Changing Vertica.log file location to other location

Dear Expertise,

I need to change the vertica.log file location .
How I can set the new location for this. ? in target location vertica process will write the logs.
Is it possible in vertica.?

Thanks in advance.
Mujeef

Answers

  • Jim_KnicelyJim_Knicely Administrator
    edited September 15

    The vertica.log file is "always" in the catalog path that you defined when you installed Vertica (-d or ‑‑data-dir option), or when you created the database (-c or --catalog_path options)

    https://www.vertica.com/docs/latest/HTML/Content/Authoring/AdministratorsGuide/AdminTools/WritingAdministrationToolsScripts.htm
    https://www.vertica.com/docs/latest/HTML/Content/Authoring/InstallationGuide/InstallingVertica/InstallVerticaScript.htm

    Although it is possible to change the catalog path for an existing DB, you will need to create a support case for that.

    Maybe a symbolic link will work for you?

    Example...

    [[email protected] v_verticademos_node0001_catalog]$ ls -lrt /home/dbadmin/verticademos/v_verticademos_node0001_catalog/vertica.log
    -rw------- 1 dbadmin verticadba 4156835 Sep 15 12:10 /home/dbadmin/verticademos/v_verticademos_node0001_catalog/vertica.log
    
    [[email protected] v_verticademos_node0001_catalog]$ admintools -t stop_db -d verticademos -F
    Info: no password specified, using none
    Database verticademos stopped successfully
    
    [[email protected] v_verticademos_node0001_catalog]$ mv /home/dbadmin/verticademos/v_verticademos_node0001_catalog/vertica.log /home/dbadmin/vertica.log
    
    [[email protected] v_verticademos_node0001_catalog]$ ln -s /home/dbadmin/vertica.log /home/dbadmin/verticademos/v_verticademos_node0001_catalog/vertica.log
    lrwxrwxrwx 1 dbadmin verticadba 25 Sep 15 12:12 vertica.log -> /home/dbadmin/vertica.log
    
    [[email protected] v_verticademos_node0001_catalog]$ ls -lrt /home/dbadmin/verticademos/v_verticademos_node0001_catalog/vertica.log
    lrwxrwxrwx 1 dbadmin verticadba 25 Sep 15 12:12 /home/dbadmin/verticademos/v_verticademos_node0001_catalog/vertica.log -> /home/dbadmin/vertica.log
    
    [[email protected] v_verticademos_node0001_catalog]$ admintools -t start_db -d verticademos
    Info: no password specified, using none
            Starting nodes:
                    v_verticademos_node0001 (74.208.207.36)
            Starting Vertica on all nodes. Please wait, databases with a large catalog may take a while to initialize.
            Node Status: v_verticademos_node0001: (DOWN)
            Node Status: v_verticademos_node0001: (DOWN)
            Node Status: v_verticademos_node0001: (DOWN)
            Node Status: v_verticademos_node0001: (DOWN)
            Node Status: v_verticademos_node0001: (UP)
    Database verticademos: Startup Succeeded.  All Nodes are UP
    
    [[email protected] v_verticademos_node0001_catalog]$ ls -lrt /home/dbadmin/vertica.log
    -rw------- 1 dbadmin verticadba 4415546 Sep 15 12:16 /home/dbadmin/vertica.log
    
    [[email protected] v_verticademos_node0001_catalog]$ tail /home/dbadmin/vertica.log
    2020-09-15 12:21:43.668 Init Session:0x7fe27dffb700 <LOG> @v_verticademos_node0001: 00000/2705: Connection received: host=127.0.0.1 port=39172 (connCnt 2)
    2020-09-15 12:21:43.668 Init Session:0x7fe27dffb700 <LOG> @v_verticademos_node0001: 00000/4540: Received SSL negotiation startup packet
    2020-09-15 12:21:43.668 Init Session:0x7fe27dffb700 <LOG> @v_verticademos_node0001: 00000/4691: Sending SSL negotiation response 'N'
    2020-09-15 12:21:43.668 Init Session:0x7fe27dffb700 <LOG> @v_verticademos_node0001: 08V01/4779: SSL negotiation failure
    2020-09-15 12:21:43.669 Init Session:0x7fe28dffc700 <LOG> @v_verticademos_node0001: 00000/2705: Connection received: host=127.0.0.1 port=39174 (connCnt 2)
    2020-09-15 12:21:43.669 Init Session:0x7fe28dffc700 <FATAL> @v_verticademos_node0001: {SessionRun} 57V03/5785: Cluster Status Request by 127.0.0.1:39174
            HINT:  Cluster State: verticademos
                    UP: 1 of 1 (v_verticademos_node0001)
                    ----
    
  • Hi Jim,
    Thank you very much for your detailed information on this.
    If could also provide little more information on below use case :
    1)It is possible to point vertica.log path to s3 storage, so Vertica process will right the logs direct into S3. ?
    2) What if we mount /s3 bucket on the vertica node itself ,still it will support ?
    3)Can it will also work for NFS ?
    can you please here ?
    Thanks for you time.
    Mujeef

Leave a Comment

BoldItalicStrikethroughOrdered listUnordered list
Emoji
Image
Align leftAlign centerAlign rightToggle HTML viewToggle full pageToggle lights
Drop image/file

Can't find what you're looking for? Search the Vertica Documentation, Knowledge Base, or Blog for more information.