none
LOGMAN in Windows Server 2019 RRS feed

  • Question

  • Hello!

    1) Suppose there are two user-defined data-collector sets: SQL and SQL-MEMORY. If I use

    logman start/stop SQL or logman start/stop SQL_MEMORY

    - both commands succeed.

    2) If I export, for example, SQL data collector set to the xml file, delete the SQL from Performance Monitor, import it back by 

    logman import SQL -xml C:\Distr\SQLServer2019\COUNTERS\SQL.xml

    and try to start using the same command  (logman start/stop SQL ) the following error arises:

    The same error arises when starting SQL in GUI.

    This error does NOT arise if the SQL data collector set (its xml file) is imported manually!

    It means no data collector sets can be started after being imported by logman import command ... why???

    Regards,
    Michael

    Friday, July 12, 2019 2:35 PM

All replies

  • Hi,

    It works fine on windows version 1903.

    This problem may occur when you run CPU-intensive programs and processes that generate stress on your system.
    https://support.microsoft.com/en-ph/help/872959/cannot-create-a-file-when-that-file-already-exists-error-message-when
    However, the hotfix is no longer available and suggest you to upgrade to Windows 10 and get the most up-to-date security and other features built right in.

    Best regards,

    Drake


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Monday, July 15, 2019 5:43 AM
    Moderator
  • Hi Drake_Wu,

    No any CPU-intesive programs run on my server so... it just does not work in 2019.

    Monday, July 15, 2019 9:46 AM
  • "This error does NOT arise if the SQL data collector set (its xml file) is imported manually!" - that was not true - the error can appear in any case (either DCS was imported manually or by logman).

    One more issue:

    After logman start SQL I see this:

    logman stop SQL - hangs indefinetly:

    Monday, July 15, 2019 10:55 AM
  • It's a bug in Windows Server 2019 and Windows Server 2016. Steps to reproduce:

    1) Create a data collector set with any counter(s) and save it as a template
    2) Make sure you can start/stop it manually and/or by logman, for example:

    3) Delete the DCS (either manually or by logman)
    4) Make sure the DCS has really been deleted by running logman query
    5) Either import the DCS with the SAME name or create it from scratch but with the same name
    6) Try to start it:

    One more issue: I had no problems on Windows Server 2019 Performance Monitor with importing and using my old DCS templates created mainly on my Windows Server 2016 servers but was really puzzled by inability to import a template created on one server with Windows Server 2019 into another:

    The two OS versions are exactly the same:

    Regards,
    Michael


    • Edited by MF47 Tuesday, July 16, 2019 10:05 AM picture is not visible
    Tuesday, July 16, 2019 10:04 AM
  • Hi,

    First issue:

    Please check the output log mode in Performance Monitor, make sure you have select the "Overwrite" or "Append mode". If you select neither, Then this error will be reported when it starts and generates the log file.

    Second issue:

    You need to assign sufficient privileges to the user in server 2, Right-click on the Counter Set on the left > Propertities > Security.

    Or edit the xml file in Notepad and clearing all the text between the <Security> and </Security> tags according to this answer.

    Best regards,

    Drake


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Wednesday, July 17, 2019 7:20 AM
    Moderator
  • Hi Drake_Wu,

    Thank you for your help!

    The second issue has gone - there was no target folder on the destination server (say C:\perflogs) as was defined in the template.

    Regarding the first one: selecting the "Overwrite" log mode did help but it's nevertheless not normal: I have plenty of DCSs accross all my servers and ALL of them have their log mode not defined: each data collector set saves its log files into a separate folder and I do NOT need to overwrite them. By now there's only one DCS (SQL) that raises this error after the second run - for example I can successfully run the SQL DCS for the first time AFTER empting its log folder (C:\PERFORMANCE)

    ...but after stopping/starting it the error arises:

    and this DCS can't be stopped anymore - only server restart can bring it to the stopped state:

    Here's the example of the two DCSs that log to the same folder simultaneously (with the default log mode - not defined):

    What makes that data collector set created from the SQL.xml template crash at the second run... ???


    • Edited by MF47 Thursday, July 18, 2019 11:21 AM
    Wednesday, July 17, 2019 3:46 PM
  • Is the separate folder(SQL1_17072019) created manually or automatically generated? If manually, is your log "File name format" option 'none'? if so, try to use a different file name format, to generated a different file name.

    Best regards,

    Drake


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Friday, July 19, 2019 2:13 AM
    Moderator
  • "Is the separate folder(SQL1_17072019) created manually or automatically generated?" - automatically, and it is the folder's name that produces this error: if the folder's name does not contain the serial number (NNNN) then each time the DCS starts it must create the folder with the same name. As it's not possible to have duplicate names the error arises. Obviously, the error will appear only when a DCS is started more than once per day (e.g. when multiple schedules configured). If having only one log file is tolerable the issue can be resolved by Overwrite/Append log mode as you pointed out, if not - just add the serial number here:

    Thank you once again for your help!

    Regards,
    Michael

    Friday, July 19, 2019 3:14 PM