Fog Adding Multiple Instances of a Printer?



  • In the fog log on the client it shows :
    PrinterManager ERROR: Could not detect if printer exists.
    Attempting to add printer.

    Basically every time Fog checks back to see if anything needs to be done, it adds another copy of the printer.

    Printer
    Printer(Copy 1) and so forth.

    Anyone had this happen before or have any tips on what I should try?

    EDIT: This is happening with all (3) printers I have set up to install on the client.


  • Senior Developer

    v0.11 of the client will prevent duplicates. And if it detects duplicates exist, it will clean them up.



  • @Tom-Elliott Just trying to give as much information as possible in case it manages to pop up as in issue in the future for someone else. Thanks for all the help you guys provide!


  • Senior Developer

    @BStalker you didn’t do anything wrong. Just informing what I think the issue was.



  • @Jbob @Tom-Elliott
    As a note I made no changes to the Client PC.


  • Senior Developer

    @Jbob I can only guess from when the mode was sending null.


  • Senior Developer

    I have no idea why it’s fixed, or even why it was broken. @Tom-Elliott did you change anything?



  • Updated Fog Server today to 7829 and the issue is no longer occurring.



  • @Jbob

    Print Helper Tool ran without errors.

    0_1464048848293_Print Manager.png



  • @Jbob I have some other tasks I have to attend to first, but I should be done with those within the hour and can run the printhelper after. I will let you know the results.


  • Senior Developer

    @BStalker if you wouldn’t mind, can you download and run “PrinterManagerHelper.exe” from https://github.com/FOGProject/fog-client/releases/tag/0.10.6 on this problem machine? I need to know if it runs and shows all of your printers, or if it throws an error.


  • Senior Developer

    @BStalker this is definitely a computer configuration issue and not with the client (albeit, this does showcase a separate and rare issue with the client).

    I have very few ideas why the client is failing to query WMI properly (I may ask for your help to debug this when I have free time). However, believe this issue originates with the fact that your WMI query output does not contain the “original” printers (that is, with no “Copy X”). This tells me someone was manually adding the printers, and then didn’t remove it completely. The client performs a complete removal of printers, so I know it is not to blame. But if a person removed only part of the printer, the client would not see it in the “Printers we have” list, and add it. This in turn would result in the “Copy X” problem. Now the client isn’t built to handle “Copy X” because if the client was the only entity managing printers this would never happen. I can add the ability for the client to wildcard the name to filter Copy X, which should stop the endless adding of the same printer over and over.

    As for why WMI doesn’t work, it may be related to the incomplete printer removal I mentioned above. However, I would need to test further to be certain.



  • @Jbob any thoughts on this based on the output of that powershell? Its not a huge issue on this as it is just a machine I’m using to test this with. I can wipe it and start over, however, I would like to know if there is a solution in the event this happens with a deployed machine. Thanks!



  • @Jbob said in Fog Adding Multiple Instances of a Printer?:

    @Bstalker this means something is wrong with WMI. Open powershell as admin on the computer with the issue and run this command:
    Get-WmiObject -Query "select * from Win32_Printer" and post the output here.

    InPS C:\Users\Administrator> Get-WmiObject -Query "select * from Win32_Printer"
    
    
    Location      :
    Name          : IT Office Color Printer (Copy 25)
    PrinterState  : 0
    PrinterStatus : 3
    ShareName     :
    SystemName    : Windows10Test
    
    Location      :
    Name          : Mount Triumph (Copy 21)
    PrinterState  : 0
    PrinterStatus : 3
    ShareName     :
    SystemName    : Windows10Test
    
    Location      :
    Name          : Mount Achievement (Copy 24)
    PrinterState  : 0
    PrinterStatus : 3
    ShareName     :
    SystemName    : Windows10Test
    
    Location      :
    Name          : IT Office Color Printer (Copy 24)
    PrinterState  : 0
    PrinterStatus : 3
    ShareName     :
    SystemName    : Windows10Test
    
    Location      :
    Name          : Mount Triumph (Copy 20)
    PrinterState  : 0
    PrinterStatus : 3
    ShareName     :
    SystemName    : Windows10Test
    
    Location      :
    Name          : Mount Achievement (Copy 23)
    PrinterState  : 0
    PrinterStatus : 3
    ShareName     :
    SystemName    : Windows10Test
    
    Location      :
    Name          : IT Office Color Printer (Copy 23)
    PrinterState  : 0
    PrinterStatus : 3
    ShareName     :
    SystemName    : Windows10Test
    
    Location      :
    Name          : Mount Triumph (Copy 19)
    PrinterState  : 0
    PrinterStatus : 3
    ShareName     :
    SystemName    : Windows10Test
    
    Location      :
    Name          : Mount Achievement (Copy 22)
    PrinterState  : 0
    PrinterStatus : 3
    ShareName     :
    SystemName    : Windows10Test
    
    Location      :
    Name          : IT Office Color Printer (Copy 22)
    PrinterState  : 0
    PrinterStatus : 3
    ShareName     :
    SystemName    : Windows10Test
    
    Location      :
    Name          : Mount Triumph (Copy 18)
    PrinterState  : 0
    PrinterStatus : 3
    ShareName     :
    SystemName    : Windows10Test
    
    Location      :
    Name          : Mount Achievement (Copy 21)
    PrinterState  : 0
    PrinterStatus : 3
    ShareName     :
    SystemName    : Windows10Test
    
    Location      :
    Name          : IT Office Color Printer (Copy 21)
    PrinterState  : 0
    PrinterStatus : 3
    ShareName     :
    SystemName    : Windows10Test
    
    Location      :
    Name          : Mount Triumph (Copy 17)
    PrinterState  : 0
    PrinterStatus : 3
    ShareName     :
    SystemName    : Windows10Test
    
    Location      :
    Name          : Mount Achievement (Copy 20)
    PrinterState  : 0
    PrinterStatus : 3
    ShareName     :
    SystemName    : Windows10Test
    
    Location      :
    Name          : IT Office Color Printer (Copy 20)
    PrinterState  : 0
    PrinterStatus : 3
    ShareName     :
    SystemName    : Windows10Test
    
    Location      :
    Name          : Mount Triumph (Copy 16)
    PrinterState  : 0
    PrinterStatus : 3
    ShareName     :
    SystemName    : Windows10Test
    
    Location      :
    Name          : Mount Achievement (Copy 19)
    PrinterState  : 0
    PrinterStatus : 3
    ShareName     :
    SystemName    : Windows10Test
    
    Location      :
    Name          : IT Office Color Printer (Copy 19)
    PrinterState  : 0
    PrinterStatus : 3
    ShareName     :
    SystemName    : Windows10Test
    
    Location      :
    Name          : Mount Triumph (Copy 15)
    PrinterState  : 0
    PrinterStatus : 3
    ShareName     :
    SystemName    : Windows10Test
    
    Location      :
    Name          : Mount Achievement (Copy 18)
    PrinterState  : 0
    PrinterStatus : 3
    ShareName     :
    SystemName    : Windows10Test
    
    Location      :
    Name          : IT Office Color Printer (Copy 18)
    PrinterState  : 0
    PrinterStatus : 3
    ShareName     :
    SystemName    : Windows10Test
    
    Location      :
    Name          : Mount Triumph (Copy 14)
    PrinterState  : 0
    PrinterStatus : 3
    ShareName     :
    SystemName    : Windows10Test
    
    Location      :
    Name          : Mount Achievement (Copy 17)
    PrinterState  : 0
    PrinterStatus : 3
    ShareName     :
    SystemName    : Windows10Test
    
    Location      :
    Name          : IT Office Color Printer (Copy 17)
    PrinterState  : 0
    PrinterStatus : 3
    ShareName     :
    SystemName    : Windows10Test
    
    Location      :
    Name          : Mount Triumph (Copy 13)
    PrinterState  : 0
    PrinterStatus : 3
    ShareName     :
    SystemName    : Windows10Test
    
    Location      :
    Name          : Mount Achievement (Copy 16)
    PrinterState  : 0
    PrinterStatus : 3
    ShareName     :
    SystemName    : Windows10Test
    
    Location      :
    Name          : IT Office Color Printer (Copy 16)
    PrinterState  : 0
    PrinterStatus : 3
    ShareName     :
    SystemName    : Windows10Test
    
    Location      :
    Name          : Mount Triumph (Copy 12)
    PrinterState  : 0
    PrinterStatus : 3
    ShareName     :
    SystemName    : Windows10Test
    
    Location      :
    Name          : Mount Achievement (Copy 15)
    PrinterState  : 0
    PrinterStatus : 3
    ShareName     :
    SystemName    : Windows10Test
    
    Location      :
    Name          : IT Office Color Printer (Copy 15)
    PrinterState  : 0
    PrinterStatus : 3
    ShareName     :
    SystemName    : Windows10Test
    
    Location      :
    Name          : Mount Triumph (Copy 11)
    PrinterState  : 0
    PrinterStatus : 3
    ShareName     :
    SystemName    : Windows10Test
    
    Location      :
    Name          : Mount Achievement (Copy 14)
    PrinterState  : 0
    PrinterStatus : 3
    ShareName     :
    SystemName    : Windows10Test
    
    Location      :
    Name          : IT Office Color Printer (Copy 14)
    PrinterState  : 0
    PrinterStatus : 3
    ShareName     :
    SystemName    : Windows10Test
    
    Location      :
    Name          : Mount Triumph (Copy 10)
    PrinterState  : 0
    PrinterStatus : 3
    ShareName     :
    SystemName    : Windows10Test
    
    Location      :
    Name          : Mount Achievement (Copy 13)
    PrinterState  : 0
    PrinterStatus : 3
    ShareName     :
    SystemName    : Windows10Test
    
    Location      :
    Name          : IT Office Color Printer (Copy 13)
    PrinterState  : 0
    PrinterStatus : 3
    ShareName     :
    SystemName    : Windows10Test
    
    Location      :
    Name          : Mount Triumph (Copy 9)
    PrinterState  : 0
    PrinterStatus : 3
    ShareName     :
    SystemName    : Windows10Test
    
    Location      :
    Name          : Mount Achievement (Copy 12)
    PrinterState  : 0
    PrinterStatus : 3
    ShareName     :
    SystemName    : Windows10Test
    
    Location      :
    Name          : IT Office Color Printer (Copy 12)
    PrinterState  : 0
    PrinterStatus : 3
    ShareName     :
    SystemName    : Windows10Test
    
    Location      :
    Name          : Mount Triumph (Copy 8)
    PrinterState  : 0
    PrinterStatus : 3
    ShareName     :
    SystemName    : Windows10Test
    
    Location      :
    Name          : Mount Achievement (Copy 11)
    PrinterState  : 0
    PrinterStatus : 3
    ShareName     :
    SystemName    : Windows10Test
    
    Location      :
    Name          : IT Office Color Printer (Copy 11)
    PrinterState  : 0
    PrinterStatus : 3
    ShareName     :
    SystemName    : Windows10Test
    
    Location      :
    Name          : Mount Triumph (Copy 7)
    PrinterState  : 0
    PrinterStatus : 3
    ShareName     :
    SystemName    : Windows10Test
    
    Location      :
    Name          : Mount Achievement (Copy 10)
    PrinterState  : 0
    PrinterStatus : 3
    ShareName     :
    SystemName    : Windows10Test
    
    Location      :
    Name          : IT Office Color Printer (Copy 10)
    PrinterState  : 0
    PrinterStatus : 3
    ShareName     :
    SystemName    : Windows10Test
    
    Location      :
    Name          : Mount Achievement (Copy 9)
    PrinterState  : 0
    PrinterStatus : 3
    ShareName     :
    SystemName    : Windows10Test
    
    Location      :
    Name          : IT Office Color Printer (Copy 9)
    PrinterState  : 0
    PrinterStatus : 3
    ShareName     :
    SystemName    : Windows10Test
    
    Location      :
    Name          : Mount Achievement (Copy 8)
    PrinterState  : 0
    PrinterStatus : 3
    ShareName     :
    SystemName    : Windows10Test
    
    Location      :
    Name          : IT Office Color Printer (Copy 8)
    PrinterState  : 0
    PrinterStatus : 3
    ShareName     :
    SystemName    : Windows10Test
    
    Location      :
    Name          : Mount Achievement (Copy 7)
    PrinterState  : 0
    PrinterStatus : 3
    ShareName     :
    SystemName    : Windows10Test
    
    Location      :
    Name          : IT Office Color Printer (Copy 7)
    PrinterState  : 0
    PrinterStatus : 3
    ShareName     :
    SystemName    : Windows10Test
    
    Location      :
    Name          : Mount Triumph (Copy 6)
    PrinterState  : 0
    PrinterStatus : 3
    ShareName     :
    SystemName    : Windows10Test
    
    Location      :
    Name          : Mount Achievement (Copy 6)
    PrinterState  : 0
    PrinterStatus : 3
    ShareName     :
    SystemName    : Windows10Test
    
    Location      :
    Name          : IT Office Color Printer (Copy 6)
    PrinterState  : 0
    PrinterStatus : 3
    ShareName     :
    SystemName    : Windows10Test
    
    Location      :
    Name          : Mount Triumph (Copy 5)
    PrinterState  : 0
    PrinterStatus : 3
    ShareName     :
    SystemName    : Windows10Test
    
    Location      :
    Name          : Mount Achievement (Copy 5)
    PrinterState  : 0
    PrinterStatus : 3
    ShareName     :
    SystemName    : Windows10Test
    
    Location      :
    Name          : IT Office Color Printer (Copy 5)
    PrinterState  : 0
    PrinterStatus : 3
    ShareName     :
    SystemName    : Windows10Test
    
    Location      :
    Name          : Mount Triumph (Copy 4)
    PrinterState  : 0
    PrinterStatus : 3
    ShareName     :
    SystemName    : Windows10Test
    
    Location      :
    Name          : Mount Achievement (Copy 4)
    PrinterState  : 0
    PrinterStatus : 3
    ShareName     :
    SystemName    : Windows10Test
    
    Location      :
    Name          : IT Office Color Printer (Copy 4)
    PrinterState  : 0
    PrinterStatus : 3
    ShareName     :
    SystemName    : Windows10Test
    
    Location      :
    Name          : Mount Triumph (Copy 3)
    PrinterState  : 0
    PrinterStatus : 3
    ShareName     :
    SystemName    : Windows10Test
    
    Location      :
    Name          : Mount Achievement (Copy 3)
    PrinterState  : 0
    PrinterStatus : 3
    ShareName     :
    SystemName    : Windows10Test
    
    Location      :
    Name          : IT Office Color Printer (Copy 3)
    PrinterState  : 0
    PrinterStatus : 3
    ShareName     :
    SystemName    : Windows10Test
    
    Location      :
    Name          : Mount Triumph (Copy 2)
    PrinterState  : 0
    PrinterStatus : 3
    ShareName     :
    SystemName    : Windows10Test
    
    Location      :
    Name          : Mount Achievement (Copy 2)
    PrinterState  : 0
    PrinterStatus : 3
    ShareName     :
    SystemName    : Windows10Test
    
    Location      :
    Name          : IT Office Color Printer (Copy 2)
    PrinterState  : 0
    PrinterStatus : 3
    ShareName     :
    SystemName    : Windows10Test
    
    Location      :
    Name          : Mount Triumph (Copy 1)
    PrinterState  : 0
    PrinterStatus : 3
    ShareName     :
    SystemName    : Windows10Test
    
    Location      :
    Name          : Mount Achievement (Copy 1)
    PrinterState  : 0
    PrinterStatus : 3
    ShareName     :
    SystemName    : Windows10Test
    
    Location      :
    Name          : IT Office Color Printer (Copy 1)
    PrinterState  : 0
    PrinterStatus : 3
    ShareName     :
    SystemName    : Windows10Test
    
    Get-WmiObject :
    At line:1 char:1
    + Get-WmiObject -Query "select * from Win32_Printer"
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : InvalidOperation: (:) [Get-WmiObject], COMException
        + FullyQualifiedErrorId : GetWMICOMException,Microsoft.PowerShell.Commands.GetWmiObjectCommand`

  • Senior Developer

    @Bstalker this means something is wrong with WMI. Open powershell as admin on the computer with the issue and run this command:
    Get-WmiObject -Query "select * from Win32_Printer" and post the output here.



  • Here is a screenshot of the printers added, as well as the FOG log file.

    0_1463771087366_Printers.png

    ------------------------------------------------------------------------------
    --------------------------------PrinterManager--------------------------------
    ------------------------------------------------------------------------------
     5/20/2016 11:36 AM Client-Info Client Version: 0.10.6
     5/20/2016 11:36 AM Client-Info Client OS:      Windows
     5/20/2016 11:36 AM Client-Info Server Version: 7723
     5/20/2016 11:36 AM Middleware::Response Success
     5/20/2016 11:36 AM PrinterManager Adding printers
     5/20/2016 11:36 AM PrinterManager ERROR: Could not detect if printer exists
     5/20/2016 11:36 AM PrinterManager ERROR: 
     5/20/2016 11:36 AM Printer Attempting to add printer:
     5/20/2016 11:36 AM Printer --> Name = IT Office Color Printer
     5/20/2016 11:36 AM Printer --> IP = 10.1.21.224
     5/20/2016 11:36 AM Printer --> Port = IP_10.1.21.224
     5/20/2016 11:36 AM Printer --> File = \\gmc-fs-01\bentesting$\Y12E_C1-hostm-1150/32_64/broch12a.inf
     5/20/2016 11:36 AM Printer --> Config = \\gmc-fs-01\bentesting$\Printer_Config_Files\IT_Printer.dat
     5/20/2016 11:36 AM Printer --> Model = Brother HL-3170CDW series
     5/20/2016 11:36 AM PrinterManager ERROR: Could not detect if printer exists
     5/20/2016 11:36 AM PrinterManager ERROR: 
     5/20/2016 11:36 AM Printer Attempting to add printer:
     5/20/2016 11:36 AM Printer --> Name = Mount Achievement
     5/20/2016 11:36 AM Printer --> IP = 10.1.21.220
     5/20/2016 11:36 AM Printer --> Port = IP_10.1.21.220
     5/20/2016 11:36 AM Printer --> File = \\gmc-fs-01\bentesting$\Kx630909_UPD_en\64bit\XP and newer\OEMSETUP.INF
     5/20/2016 11:36 AM Printer --> Config = \\gmc-fs-01\bentesting$\Printer_Config_Files\Achievement.dat
     5/20/2016 11:36 AM Printer --> Model = Kyocera KM-5050 KX
     5/20/2016 11:36 AM PrinterManager ERROR: Could not detect if printer exists
     5/20/2016 11:36 AM PrinterManager ERROR: 
     5/20/2016 11:36 AM Printer Attempting to add printer:
     5/20/2016 11:36 AM Printer --> Name = Mount Triumph
     5/20/2016 11:36 AM Printer --> IP = 10.1.21.221
     5/20/2016 11:36 AM Printer --> Port = IP_10.1.1.221
     5/20/2016 11:36 AM Printer --> File = \\gmc-fs-01\bentesting$\Kx630909_UPD_en\64bit\XP and newer\OEMSETUP.INF
     5/20/2016 11:36 AM Printer --> Config = \\gmc-fs-01\bentesting$\Printer_Config_Files\Triumph.dat
     5/20/2016 11:36 AM Printer --> Model = Kyocera Mita KM-5035 KX
    ------------------------------------------------------------------------------```


  • Yes it was added with an admin account. When I say I removed the printer, it was via Fog, not manually. Let me know if there is any more info I can provide.


  • Senior Developer

    It handles them, currently, by adding/removing them as expected. If you manually remove the printer, it may have issues re-installing them. To see the changes take effect, you need to reboot the system. As for constant removing/re-adding/multiples I’ve not seen this. Was the FOG client installed using an Administrator account?



  • Just to add a little more info. I have now tested this on a fresh install of windows as well with the same results.



  • Issue still present after the update to latest fog versions. Not sure what other information would be useful to provide here so just ask if I’m leaving something out.


Log in to reply
 

Looks like your connection to FOG Project was lost, please wait while we try to reconnect.