Printer errors
-
@Sebastian-Roth Here’s a full cycle from that host. I did just notice that when I click on the first printer that host has listed in fog I get a blank screen. If I click on the second printer I see all the details like printer type, printer name, ip address…
9/2/2019 7:18 PM Middleware::Communication URL: http://xxx.xxx.xxx.xxx/fog/management/index.php?sub=requestClientInfo&configure&newService&json 9/2/2019 7:18 PM Middleware::Response Success 9/2/2019 7:18 PM Middleware::Communication URL: http://xxx.xxx.xxx.xxx/fog/management/index.php?sub=requestClientInfo&mac=xx:xx:xx:xx:xx:xx||00:00:00:00:00:00:00:E0&newService&json 9/2/2019 7:18 PM Middleware::Response Success 9/2/2019 7:18 PM Middleware::Communication URL: http://xxx.xxx.xxx.xxx/fog/service/getversion.php?clientver&newService&json 9/2/2019 7:18 PM Middleware::Communication URL: http://xxx.xxx.xxx.xxx/fog/service/getversion.php?newService&json 9/2/2019 7:18 PM Service Creating user agent cache 9/2/2019 7:18 PM Middleware::Response Invalid time 9/2/2019 7:18 PM Middleware::Response Success 9/2/2019 7:18 PM Middleware::Response Module is disabled globally on the FOG server ------------------------------------------------------------------------------ ---------------------------------ClientUpdater-------------------------------- ------------------------------------------------------------------------------ 9/2/2019 7:18 PM Client-Info Client Version: 0.11.16 9/2/2019 7:18 PM Client-Info Client OS: Windows 9/2/2019 7:18 PM Client-Info Server Version: 1.5.6 9/2/2019 7:18 PM Middleware::Response Success ------------------------------------------------------------------------------ ------------------------------------------------------------------------------ ----------------------------------TaskReboot---------------------------------- ------------------------------------------------------------------------------ 9/2/2019 7:18 PM Client-Info Client Version: 0.11.16 9/2/2019 7:18 PM Client-Info Client OS: Windows 9/2/2019 7:18 PM Client-Info Server Version: 1.5.6 9/2/2019 7:18 PM Middleware::Response Success ------------------------------------------------------------------------------ ------------------------------------------------------------------------------ --------------------------------HostnameChanger------------------------------- ------------------------------------------------------------------------------ 9/2/2019 7:18 PM Client-Info Client Version: 0.11.16 9/2/2019 7:18 PM Client-Info Client OS: Windows 9/2/2019 7:18 PM Client-Info Server Version: 1.5.6 9/2/2019 7:18 PM Middleware::Response Success 9/2/2019 7:18 PM HostnameChanger Checking Hostname 9/2/2019 7:18 PM HostnameChanger Hostname is correct ------------------------------------------------------------------------------ ------------------------------------------------------------------------------ ---------------------------------SnapinClient--------------------------------- ------------------------------------------------------------------------------ 9/2/2019 7:18 PM Client-Info Client Version: 0.11.16 9/2/2019 7:18 PM Client-Info Client OS: Windows 9/2/2019 7:18 PM Client-Info Server Version: 1.5.6 9/2/2019 7:18 PM Middleware::Response No snapins ------------------------------------------------------------------------------ ------------------------------------------------------------------------------ --------------------------------PrinterManager-------------------------------- ------------------------------------------------------------------------------ 9/2/2019 7:18 PM Client-Info Client Version: 0.11.16 9/2/2019 7:18 PM Client-Info Client OS: Windows 9/2/2019 7:18 PM Client-Info Server Version: 1.5.6 9/2/2019 7:18 PM Middleware::Response Success 9/2/2019 7:18 PM PrinterManager ERROR: Data conversion using the DataContract FOG.Modules.DataContracts.PrinterManager failed 9/2/2019 7:18 PM PrinterManager ERROR: Error converting value "" to type 'FOG.Modules.PrinterManager.Printer+PrinterType'. Path 'printers[0].type'. ------------------------------------------------------------------------------ ------------------------------------------------------------------------------ --------------------------------PowerManagement------------------------------- ------------------------------------------------------------------------------ 9/2/2019 7:18 PM Client-Info Client Version: 0.11.16 9/2/2019 7:18 PM Client-Info Client OS: Windows 9/2/2019 7:18 PM Client-Info Server Version: 1.5.6 9/2/2019 7:18 PM Middleware::Response Success 9/2/2019 7:18 PM PowerManagement Calculating tasks to unschedule 9/2/2019 7:18 PM PowerManagement Calculating tasks to schedule ------------------------------------------------------------------------------ ------------------------------------------------------------------------------ ----------------------------------UserTracker--------------------------------- ------------------------------------------------------------------------------ 9/2/2019 7:18 PM Client-Info Client Version: 0.11.16 9/2/2019 7:18 PM Client-Info Client OS: Windows 9/2/2019 7:18 PM Client-Info Server Version: 1.5.6 9/2/2019 7:18 PM Middleware::Response Success ------------------------------------------------------------------------------ 9/2/2019 7:18 PM Service Sleeping for 91 seconds
-
@Sebastian-Roth I just took a look at the fog database itself and for the printers that seem to work their pConfig column is set to Local and their pDesc column is set to nothing. For the rest that don’t seem to work their pConfig is blank and their pDesc is set to NULL. The rest of the columns for all printers table seem fine. Is it safe to change those columns or are there more tables that could be affected?
Thanks
-
@chunter2 Good catch. I was thinking about asking you to take a look at the tables and I was also wondering about how the settings look like in the web UI? Can you post a picture of all the printer settings in the web UI?
-
@Sebastian-Roth So I ended up changing the pConfig in the database and the printer installed. So I don’t have a screenshot that I can post. This host is supposed to have two printers but only one seems to install. I see this in the log.
9/3/2019 6:36 PM PrinterManager Adding printers
9/3/2019 6:36 PM PrinterManager Upstairs Printer_64-bit already exists
9/3/2019 6:36 PM PrinterManager Workroom Copier_64bit has already been configuredSo the first one (Upstairs Printer_64-bit) installs correctly but the second one (Workroom Copier_64bit) doesn’t seem to be installed. Is there any meaning with the different log messages? “has already been configured”?
Thanks
-
@chunter2 The fog-client software keeps a list of the printers it manages. So if it had installed/created/configured one it won’t do it on subsequent loop of the printer module again. If you stop the FOGService (Windows services), remove the printers in printer manager and start FOGService again it should re-create both printers for you.
I am still wondering why the setting type missed in the database. There is a chance those settings were different in 1.2.0 and did not get updated when upgrading properly.
-
My guess is the database upgrade from 1.2.0 didn’t go as smoothly as I had thought. I probably should have checked some of the tables just to see. Setting the pConfig to “Local” in the database filled in “TCP/IP” in the Printer Type column when clicking on List all printers.
I just fixed my “second” printer issue. There was an & sign in the path to the inf file and the fog gui was showing
&
for some reason. I removed that from the gui and removed the & from the server path and the printer installed correctly. Strange how there was no error in the fog log but I’m guessing that’s not something you can query? -
@chunter2 said in Printer errors:
Strange how there was no error in the fog log but I’m guessing that’s not something you can query?
Yeah interesting, unfortunately the rundll PrintUI call used within Windows to manage printers is not that great. I don’t think we can do much about this. Maybe we could add a normal file check before the call. What do you think? Would you test an updated DLL if I’d compile one with checks?
-
@Sebastian-Roth Sure, I can test an updated DLL. Do you know why I was getting the message “has already been configured” instead of “already exists”? Or is that what I’d be testing with the updated DLL?
-
@chunter2 said in Printer errors:
Do you know why I was getting the message “has already been configured” instead of “already exists”?
It’s impossible to say without having the full logs here and even then I’d need to try and replicate the problem to figure out why that is.
As you see in the code there are two internal lists handling if printers are installed and configured already.
-
@Sebastian-Roth Can you try adding a printer with a bad path to the inf file? I think that’s my error. Maybe that log message just needs to have “but not installed” added on. I’m assuming you don’t want to keep trying to install over and over if the path is wrong. And that’s the reason for two lists?
-
@chunter2 said in Printer errors:
Can you try adding a printer with a bad path to the inf file? I think that’s my error. Maybe that log message just needs to have “but not installed” added on. And that’s the reason for two lists?
Wasn’t me who came up with the printer management / the fog-client. I am just trying to take over from the original developer and help people to make things work and fix things as needed. I guess (not knowing!) that his idea was to use two lists, one for printers being installed (as in “created”) and one for printers being configured (as in “settings applied”) but I am not sure. I have dug through that part of the code a couple of times but I am still not sure I understand his logic. On the other hand I know he is/was a pretty good programmer and did things for a good reason. So I don’t want to rush in and change things too quickly.
I’m assuming you don’t want to keep trying to install over and over if the path is wrong.
Well the fog-client polls the settings every time and I think it’s good to try again as settings might have changed on the next loop cycle.
-
@chunter2 I just added a check (File.Exists…) and compiled a fresh DLL: https://github.com/FOGProject/fog-client/releases/download/0.11.16/Modules_printer_check_INF.dll
Stop
FOGService
(Windows services.msc), then go toC:\Program Files (x86)\FOG\
and renameModules.dll
. Now download the one from above and put in place of the original one. Start the service and watch the log file.Hope you didn’t get me wrong. I am not saying that printer management in the fog-client is perfect and we shouldn’t change it. It’s just that I don’t have a lot of time and wouldn’t be able to rework this all from scratch in a rush. If there is a good reason to change the whole logic and we can work together on this I am more than happy to go ahead.
-
@Sebastian-Roth Just tried out the dll. I set a bad path on the first of two printers. I get the following first in the log which I think is good.
05/09/2019 7:45 PM PrinterManager Adding printers
05/09/2019 7:45 PM Printer Adding: Computer Lab x64
05/09/2019 7:45 PM PrinterManager Could not read printer INF file: bad path
05/09/2019 7:45 PM Printer Adding: Workroom Copier_64bit
05/09/2019 7:45 PM PrinterManager PrintUI return code = 0
05/09/2019 7:45 PM PrinterManager Restarting spoolerAnd then this the second and subsequent times through.
05/09/2019 7:47 PM PrinterManager Adding printers
05/09/2019 7:47 PM PrinterManager Computer Lab x64 has already been configured
05/09/2019 7:47 PM PrinterManager Workroom Copier_64bit already existsSo the second printer gets added now which is good but I don’t think it tries the first one again until you restart the service. I think I’m fine with that. I think my confusion was the “already been configured” message. I just assumed that was good.
I do understand this is an opensource project so no need to feel bad for not having the time. I can wait. I hope I’m coming across as a help and not demanding.
Thanks
-
@chunter2 said:
05/09/2019 7:45 PM PrinterManager Adding printers 05/09/2019 7:45 PM Printer Adding: Computer Lab x64 05/09/2019 7:45 PM PrinterManager Could not read printer INF file: bad path 05/09/2019 7:45 PM Printer Adding: Workroom Copier_64bit 05/09/2019 7:45 PM PrinterManager PrintUI return code = 0 05/09/2019 7:45 PM PrinterManager Restarting spooler
And then this the second and subsequent times through.
05/09/2019 7:47 PM PrinterManager Adding printers 05/09/2019 7:47 PM PrinterManager Computer Lab x64 has already been configured 05/09/2019 7:47 PM PrinterManager Workroom Copier_64bit already exists
I might have misunderstood that part wrong when you mentioned this first. It’s not easy to keep up with dozens of requests in the forums and see it all clearly when things are a bit hidden between the lines or messages. I hope to get some more time to dig through that part of the code and see if I can find out why it was programed the way it is (or find a loop hole in it).
I do understand this is an opensource project so no need to feel bad for not having the time. I can wait. I hope I’m coming across as a help and not demanding.
Thanks for mentioning! Good to hear that we are on the same line here.