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

    Cannot Capture Image - Failed to open stream

    Scheduled Pinned Locked Moved
    FOG Problems
    3
    13
    985
    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.
    • george1421G
      george1421 Moderator @hummela
      last edited by george1421

      @hummela Ok then lets try the mechanics of this.

      I assume in /images/dev directory there is a botched upload. The directory will have the name of the mac address of this host.

      First lets confirm this directory exists /images/dev/7486e211bc42

      on a windows (or other computer) ftp to the fog server. Login as fogproject with the password found in the hidden file /opt/fog/.fogsettings

      from the ftp command prompt key in mv /images/dev/7486e211bc42 /images/Dell7090Staff That is the mechanics of what is going on behind the screen. What the error message is saying that it can’t access /images/dev/7486e211bc42 to move the file or /images/Dell7090Staff is blocked (maybe because of permissions) so it can’t moved the file

      Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG!

      H 1 Reply Last reply Reply Quote 0
      • H
        hummela @george1421
        last edited by

        @george1421

        Confirmed that there is a folder in /images/dev named 7486e211be88, which has the files in it.
        ls output

        FTP moving was interesting. An image had previously been uploaded using this folder name in /images (something the other tech failed to tell me). So this was actually the second capture attempt for the same image. My FTP rename was unsuccessful the first time until I realized there was already a directory with the same name in the /images folder. I deleted that directory and the rename was successful. It seems that it has to do more with overwriting an existing image with an updated one.
        ftp

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

          @hummela Seeing that you are using the very latest dev-branch version I am a bit worried this is something caused by the changes made to add PHP 8 support lately.

          I will look into this soon and report back.

          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
          • H
            hummela @hummela
            last edited by

            Just as a bit of an update -

            I manually deleted the /images/Dell7090Staff directory and had him try capturing the image again. This time, the image captured successfully. It definitely seems like an issue overwriting an existing image with a new one.

            george1421G 1 Reply Last reply Reply Quote 1
            • george1421G
              george1421 Moderator @hummela
              last edited by

              @hummela OK so from a truth table standpoint we think we see the error (good debugging by the way)

              So what we don’t know is with the now successful upload can he reupload without making any changes. In my mind we don’t know if the permissions on the previously uploaded directory were bad where someone might have changed the permissions for some reason (not shaming here, we simply don’t know), there was something else with a lock on that directory, or the updates to the fog programming to support php8 as Sebastian mentioned, caused this.

              Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG!

              H 1 Reply Last reply Reply Quote 0
              • H
                hummela @george1421
                last edited by

                @george1421

                I had him try to capture to the same image again and it failed in the same way - Failed to open stream.

                george1421G 1 Reply Last reply Reply Quote 0
                • george1421G
                  george1421 Moderator @hummela
                  last edited by george1421

                  @hummela ok then on the fog server would you run these two commands.

                  On the destination images
                  ls -la /images
                  ls -la /images/Dell7090Staff

                  and then on the captured directories
                  ls -la /images/dev
                  ls -la /images/dev/7486e211bc42

                  You can/should also purge that /images/dev/7486e211bc42 because its a botched upload. The files in Dell7090Staff are untouched so you should be able to deploy those without issue.

                  Good debugging steps here. We should get to the bottom of this issue with your help.

                  Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG!

                  H 1 Reply Last reply Reply Quote 0
                  • H
                    hummela @george1421
                    last edited by

                    @george1421 said in Cannot Capture Image - Failed to open stream:

                    @hummela ok then on the fog server would you run these two commands.

                    On the destination images
                    ls -la /images
                    ls -la /images/Dell7090Staff

                    alt text

                    and then on the captured directories
                    ls -la /images/dev
                    ls -la /images/dev/7486e211bc42

                    alt text

                    Ignore the fact that the mac address changed - he tried capturing again from a different host (bad troubleshooting there, I know). The capture still failed in the same way with this host.

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

                      @hummela I just reverted one of the changes I made when adding the PHP 8 support. Would you mind updating to 1.5.9.148 and trying again?

                      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

                      H 1 Reply Last reply Reply Quote 1
                      • H
                        hummela @Sebastian Roth
                        last edited by

                        @sebastian-roth

                        Updated and he has confirmed it worked. Captured from the same host twice just to make sure.

                        Thank you so much for looking into this!

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

                        150

                        Online

                        12.0k

                        Users

                        17.3k

                        Topics

                        155.2k

                        Posts
                        Copyright © 2012-2024 FOG Project