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

    Failed to open stream

    Scheduled Pinned Locked Moved Solved
    FOG Problems
    3
    23
    4.7k
    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.
    • I
      isaac
      last edited by

      Server
      • FOG Version: 1.3.5
      • OS: Ubuntu 14.04 LTS
      Client
      • Service Version:
      • OS:
      Description

      I have recently installed FOG and have it set up that the images are stored on an external drive.
      My hosts boot to FOG and the capture proceeds to 100% but then fails when tries to write to the drive with the following error:

      0_1493234761107_error small.JPG

      I assume it has to do with permissions, but being new to this not sure exactly what to do with it.
      Thanks,

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

        @isaac said in Failed to open stream:

        set up that the images are stored on an external drive.

        This may be your issue. FOG is not designed to do this.

        But with this said, I can tell you how fog works. FOG uses nfs to upload captured images to the FOG server. The images are saved in /images/dev/<mac_address> then the pxe booting computer connects back to the FOG server using ftp to move the file pointers from /images/dev/<mac_name> to /images/<image_name>. The target computer connects back to the FOG server using the user name and password defined in the storage node configuration on the fog server.

        If this was a typical fog server setup I would say the user ID and password defined for the fog server fog doesn’t match the linux user account fog defined in the OS. Don’t confuse the linux user fog with the web gui administrator called fog too. They are different accounts used for different purposes.

        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!

        1 Reply Last reply Reply Quote 0
        • I
          isaac
          last edited by isaac

          @george1421
          That was the first place I went, and yes I just confirmed that the username and password in storage management matches the fog user account in the OS.

          I need to be able to store the images on an external drive because the Ubuntu OS that houses the FOG server is a VM inside WIN 7 and I did not leave enough room in the VM for more than one image. Is it worth it for me to pursue storing images externally? or is it impossible?

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

            @isaac Is it possible, yes.

            Tell me a bit more about this “external” drive. What is it and what hosts it?

            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!

            I 1 Reply Last reply Reply Quote 0
            • I
              isaac @george1421
              last edited by

              @george1421
              It is just a 2TB USB drive with lots of space for storing images. Formatted Ext4 and mounted. Completely empty.

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

                @isaac How is that connected to your VM?

                From your fog server linux console can you post the results of this command df -h

                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!

                I 1 Reply Last reply Reply Quote 0
                • I
                  isaac @george1421
                  last edited by

                  @george1421
                  Not sure what exactly you mean, I am using Virtual Box and any USB automatically gets picked up when plugged in.

                  george1421G I 2 Replies Last reply Reply Quote 0
                  • george1421G
                    george1421 Moderator @isaac
                    last edited by george1421

                    @isaac said in Failed to open stream:

                    Virtual Box and any USB automatically gets picked up when plugged in

                    Ah more bits of the puzzle are divulged.

                    Then lets start with the df -h command and then showmount -e 127.0.0.1 and finally lsblk

                    If you use putty to connect to your fog server you can copy and paste pretty easy. Or use a screen snipping tool to grab a picture of the console since you are using VB,

                    You have an interesting FOG server setup. I want to see if all of the bits are in place for this to work.

                    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!

                    1 Reply Last reply Reply Quote 0
                    • I
                      isaac @isaac
                      last edited by isaac

                      @george1421
                      0_1493240182949_IMG_0424.JPG
                      Better quality in a minute. I am taking photos, because my host is offline right now.

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

                        @isaac The showmount command will tell me more. I see what you are doing so far and we could make this work.

                        as well as the output of ls -la /media/fossie/FOG that will show the structure of the images directory

                        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!

                        I george1421G 2 Replies Last reply Reply Quote 0
                        • I
                          isaac @george1421
                          last edited by

                          @george1421
                          Okay I will be back tomorrow, thank you!!

                          1 Reply Last reply Reply Quote 0
                          • Tom ElliottT
                            Tom Elliott
                            last edited by

                            Maybe I’m under thinking here, but is /media/fossie/FOG/images owned by the fog server’s FOG user?

                            It almost looks like it’s not and because of this it’s not allowed to move the data (hence the Permission Denied).

                            So maybe you can start with:

                            chown -R fog:root /media/fossie/FOG/images
                            chmod -R 777 /media/fossie/FOG/images
                            

                            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! Get in contact with me (chat bubble in the top right corner) if you want to join in.

                            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

                            I 1 Reply Last reply Reply Quote 0
                            • I
                              isaac @Tom Elliott
                              last edited by

                              @george1421
                              I did what Tom Elliott suggested to no avail, coming up with the same error after capture.
                              0_1493395923446_Selection_003.png

                              Besides the images folder is there any other place that needs fog permissions?

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

                                @george1421 said in Failed to open stream:

                                @isaac The showmount command will tell me more. I see what you are doing so far and we could make this work.

                                as well as the output of ls -la /media/fossie/FOG that will show the structure of the images directory

                                How about this info

                                edit: I did see in your post, but I need the whole command showmount -e 127.0.0.1

                                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!

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

                                  @isaac Sorry I should have asked for one level deeper on the file structure.

                                  ls -la /media/fossie/FOG/images

                                  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!

                                  I 1 Reply Last reply Reply Quote 0
                                  • I
                                    isaac @george1421
                                    last edited by

                                    @george1421
                                    0_1493397449378_Selection_004.png

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

                                      @isaac Excellent!

                                      first thing I noticed is that the hidden file .mntcheck is missing from …/images I’ll also assume its missing from …/images/dev. You can fix by:

                                      touch /media/fossie/FOG/images/.mntcheck
                                      touch /media/fossie/FOG/images/dev/.mntcheck

                                      Your nfs shares appear to be configured correctly setup.

                                      The next thing I need a screen shot of is how your storage is configured for this fog server. It will be accessed by the web management gui.

                                      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!

                                      I 1 Reply Last reply Reply Quote 0
                                      • I
                                        isaac @george1421
                                        last edited by isaac

                                        @george1421
                                        That is odd, it was in the dev folder but not in images. I created it. 0_1493398171834_Edit: External drive - Storage Management - FOG - Open Source Computer Cloning Solution - Mozilla Firefox_005.png

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

                                          @isaac OK we are almost done with the checks.

                                          On that web page. Down at the bottom. There is a user ID and a password. If you click on the little eye you can see what the password is and copy it out.

                                          I want you to do this next part from a windows computer.
                                          User FTP and connect to your fog server using the user account on the web page and password.

                                          once you get logged in then do a cd /media/fossie/FOG/images if you have a small file in the current directory on your windows server you can test the right permissions to …/images with put something.txt If it uploads the file then that completes this part of the test.

                                          Lastly inspect the contents of the fog configuration file in /opt/fog/.fogsettings

                                          Make sure the user ID there and password matches the web interface also make sure the storage path matches the one where your files will be on the external drive.

                                          If everything looks good run through the FOG installer one more time. The installer will correct any remaining settings that are not in line.

                                          But from what I see your setup should be working. There is more testing we can do, but lets see if this gets you back on track.

                                          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!

                                          I 1 Reply Last reply Reply Quote 0
                                          • I
                                            isaac @george1421
                                            last edited by

                                            @george1421
                                            It worked! Captured Successfully.
                                            It ended up being the permissions to the external drive, your post paved the way.
                                            Thanks:)

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

                                            182

                                            Online

                                            12.0k

                                            Users

                                            17.3k

                                            Topics

                                            155.2k

                                            Posts
                                            Copyright © 2012-2024 FOG Project