Snapin server not found 503 error

  • I am new to using FOG and Linux. I successfully pulled and pushed an image and now I am experimenting with snapins. I think I am creating my first snapin correctly, but it seems that it’s not being executed correctly on the host machine. I created the snapin following the instructions, from user “jeffsays” from this post:

    I have the install.cmd and the .exe file in the zip file. I know the install.cmd file works correctly because I tested it out on my computer by double clicking and it installed the program silently and correctly. I created the snapin with these options:

    template: batch file
    snapin pack file: cmd.exe
    snapin pack arguments: /c “[FOG_SNAPIN_PATH]\install.cmd”

    I successfully upload my .zip file to the fog server, I know this because the web manager says it was uploaded successfully and the .zip is located at /opt/fog/snapins directory on the server. I associate the snapin to the host and create the task. The task goes into queue and the .zip file shows up in the temp folder for the FOG client on the host machine (see pic 1).
    link text

    Again, I am new to this but I think what is supposed to happen here is that the .zip is downloaded to the temp folder, extracted and the install.cmd is run. But the .zip size stays at 0 kb size. I go to the log file and an error is occurring (see pic 2).
    link text

    This is where I am stuck at. I tried searching the FOG forums and using my google-fu but no helpful results came up, unless I missed something.

    Host Machine: Windows 10 Local administrator account
    FOG version: 1.5.5
    Server: CentOS linux 7


  • @Sebastian-Roth
    Ok, Thank you for the help. I will have to research snapins some more. It seems the issue for this post has been resolved. So I will mark that post as the answer. If I have anymore problems I will make a new post.

  • Developer

    @xburnerx00 Maybe try the 7-Zip example here:

    I know the examples are not really up to date with 1.5.5 but the basics should still be valid I hope.

  • @Sebastian-Roth
    This seems to have worked but the snapin did not execute correctly. The notification from the fog client popped up on the lower right corner of the host saying the task is happening and then it completed, but neither the application was installed and the internet shortcut on the desktop was not placed. I more than likely created the snapins incorrectly, since this is my first time creating them. Can you offer some guidance on that?

  • Developer

    @xburnerx00 Let’s see if increasing the timeout values will help you here. Edit /etc/httpd/conf.d/fog.conf and add the following three lines:

        <Proxy "fcgi://">
            ProxySet timeout=300

    To make it look like this:

    <VirtualHost *:80>
        <Proxy "fcgi://">
            ProxySet timeout=300
        <FilesMatch "\.php$">
            SetHandler "proxy:fcgi://"
        KeepAlive Off

    Then systemctl restart httpd to make the change go live.

  • @Sebastian-Roth I went to check the file size of the snapin and that opened a new set of issues. First, I checked on the FOG server itself at /opt/fog/snapins and to my surprise the zip file was at 0 mb size. Then I went to the web interface and checked the properties of the snapin under the ‘info’ tab and it also showed a filesize of 0 also. So, it seems the .zip file never uploaded correctly and I never noticed it.

    So, I created a new snap in. In the pics (link text) it shows the program I want and the batch command to execute to install the program. Also included the snapin set up in the FOG web interface. After creating the snapin, I check that there is now a snapin on the server with 48.3 file size and on the web interface it has 46.08 filesize. I try pushing the snapin to the host again, and it still has the same problems. I checked error logs and it’s same errors I posted earlier.

    I then did your idea of creating a smaller snapin. I created a ‘install internet shortcut on desktop’. But it still came back with the same error of the previous logs sent.

  • Developer

    @xburnerx00 Just got an idea. What size is that ZIP file? Possibly it’s “too big” for the server to handle in a certain amount of time and so it quits the connection. Have you tried a normal snapin (not pack) with let’s ay a one mega byte small executable to deploy to a client via snapin? See if that works.

  • @Sebastian-Roth
    I created a new snapin and ran the command to see the log files live. Only one update to the log came through and I was pressing Enter the whole time.
    link text

    The task seemed to take a bit longer than before, but eventually the host machine did pick up the .zip file, but did not download the contents.

  • Developer

    @xburnerx00 Hmm, the logs show some interesting things but from what I see I don’t thinks this will lead us to what is causing this.

    First let’s try to tackle this from a different angle. Can you please create another snapin but use a simple one this time - not snapin pack. Just to see if that makes a difference. I kind of doubt it, but let’s see.

    As well please try following the log files while the client is trying to pull the snapin, just to see if you get any messages in the logs while this is happening. For that have your client ready and use the command to watch the log files on your FOG server: tail -f /var/log/httpd/error_log /var/log/php-fpm/*.log (now hit ENTER a couple of times so you see when new lines of logging come in and schedule a snapin task for the client - check the client logs as well so you know when it happens)

  • @Sebastian-Roth
    These are the four error logs that were found in/var/log/php-fpm directory:
    link text

    Linux OS:
    CentOS Linux release 7.6.1810 (Core)

    I do not know if it matters, but this machine is on real hardware, it is not a virtual machine. Hardware is a standard HP Pro 3500 series.

  • Developer

    @xburnerx00 Thanks for posting the log file picture. The line about hostname can be ignored. But there are a couple of important lines like “Error dispatching request to”. This is a real issue. It’s strange you seem to be able to use the web UI! On first sight of this errors I’d have expected the PHP-FPM process to be dead. But it’s probably not.

    What kind of Linux OS do you have? Please see if you have any kind of /var/log/php*-fpm.log and post contents or picture of that here.

    Also, I do not know if it’s relevant but I have a red circle with a white ‘!’ on the host management list in the web gui saying “No such device or address”.

    Not related and not an issue. Just means that FOG is not able to contact that client via port 445 (Windows stuff). This online check was added in FOG long time ago and is often failing because of Windows firewall or other means of port blocks.

  • @Sebastian-Roth

    Thanks for the reply

    I checked the log files that were in your signature. httpd error log was showing this:
    link text

    I noticed at the 14:12:29 time stamp that the FQDN on the server could not be determined. I added servername to the httpd.conf file, and that error seems to have gone away. I then tried again running snapin at 14:50:00 and the pic posted shows the error at 14:51:51. The FOG log file on the host machine is the same error, that I posted in my original post, just different timestamps. My snapin is still not being downloaded to the host machine.

    Also, I do not know if it’s relevant but I have a red circle with a white ‘!’ on the host management list in the web gui saying “No such device or address”. I looked in to other posts for a fix on this but the replies made it sound like the red circle is not important to the over all function of FOG.

  • Developer

    @xburnerx00 While I am not exactly sure what’s going wrong I might suggest you have a look at the apache and php log files (see my signature) to hopefully get a better idea of why it returns a HTTP 503 error.

    You can also try to open that exact same URL in your normal browser to see if it leads to the same error.

Log in to reply