• Recent
    • Unsolved
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    Printer errors

    Scheduled Pinned Locked Moved Solved
    FOG Problems
    2
    16
    1.5k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • S
      Sebastian Roth Moderator
      last edited by

      @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.

      Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

      Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

      1 Reply Last reply Reply Quote 0
      • C
        chunter2
        last edited by

        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?

        1 Reply Last reply Reply Quote 1
        • S
          Sebastian Roth Moderator
          last edited by

          @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?

          Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

          Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

          1 Reply Last reply Reply Quote 0
          • C
            chunter2
            last edited by

            @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?

            1 Reply Last reply Reply Quote 0
            • S
              Sebastian Roth Moderator
              last edited by

              @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.

              Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

              Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

              1 Reply Last reply Reply Quote 0
              • C
                chunter2
                last edited by

                @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?

                1 Reply Last reply Reply Quote 0
                • S
                  Sebastian Roth Moderator
                  last edited by

                  @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.

                  Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

                  Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

                  1 Reply Last reply Reply Quote 0
                  • S
                    Sebastian Roth Moderator
                    last edited by Sebastian Roth

                    @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 to C:\Program Files (x86)\FOG\ and rename Modules.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.

                    Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

                    Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

                    1 Reply Last reply Reply Quote 0
                    • C
                      chunter2
                      last edited by chunter2

                      @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 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

                      So 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

                      1 Reply Last reply Reply Quote 0
                      • S
                        Sebastian Roth Moderator
                        last edited by Sebastian Roth

                        @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.

                        Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

                        Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

                        1 Reply Last reply Reply Quote 0
                        • 1 / 1
                        • First post
                          Last post

                        248

                        Online

                        12.0k

                        Users

                        17.3k

                        Topics

                        155.2k

                        Posts
                        Copyright © 2012-2024 FOG Project