Having issue with connecting to MYSQL database



  • When I try connecting to fog using the web interface, I get the the following error.

    Unable to connect to database.

    I checked the connection and was able to connect by entering the root password. I’m not sure if I’m missing something, but could someone help me troubleshoot this issue?

    Thanks,
    Greg


  • Senior Developer

    Also, make sure rpcbind and nfs services are running. Through more searching, it sounds like it could be the NFS service isn’t running. Try running:

    /etc/init.d/nfs restart

    If it fails, check your rpcbind service and make sure it’s running.

    Your commands may vary differently based on the OS you’re running the fog server from.


  • Senior Developer

    Here’s something you could try as well. I never needed to do it, but while reviewing information within these forums, I came across an option for Windows XP maintaining Multiple Partition images. Maybe try using FOGprep on the master system, then re-upload and see if that helps you out. Otherwise, you could use the Single Partition, Resizable option as well.


  • Senior Developer

    For windows xp, try using the single partition resizable option. I never had luck with it writing with multiple partition single disk non-resizable on Xp machines.



  • When I ran the cd /images; ls -a command it did show me the .mntcheck file in the images folder. I’m still not able to deploy though, it just tells me there is no boot device available. Not sure what else to try. Maybe I’ll try imaging one of our Windows 7 pc’s here, then try to deploy it on a brand new computer. Maybe it’s just the hardware that I’m using. I have an Optiplex 780 that I took the image of XP from, then I was trying to deploy the XP image to an Optiplex GX620. Maybe there is just a conflict there? I don’t know at this point.


  • Senior Developer

    Are you good with Linux commands?

    I’d check the /images directory and make sure the .mntcheck files are in in both the /images and /images/dev folders. If their not there, type:

    touch /images/.mntcheck; touch /images/dev/.mntcheck; chmod -R 777 /images

    Then try again. See if that helps you out. To check if you have the files, you’ll need to type:

    cd /images; ls -a

    Then verify that you see the file. the files with a period in front -> . of the name are hidden otherwise.

    Also, just verify the permissions of the directory are 777. Though I’m sure we could refine this as necessary, for now, start small and simple. Just perform:

    chmod -R 777 /images just to make sure any system on the network can read and write to the directory. Normally the installation does this for you, but you never know.



  • I am trying to use an image that is on the server. I have verified the location of the image on the FOG server and it’s there. I associated that image with the client pc, then I reboot the client pc and it goes through a process and acts like it’s going to deploy the image, but everything happens really fast, then the pc reboots and comes up to a Windows Boot Manager screen saying “The boot selection failed because a required device is inaccessible.” I did remove the partitions on this pc. Not sure if that has anything to do with this or not. It’s pretty much just a blank hard drive right now.


  • Senior Developer

    If what you say is correct, do you have an uploaded image for the system you’re trying to image? If not, can you take an image that you’ve already uploaded and assign to the system you want to image and image it that way? This will let you know if it’s solely because you don’t have an actual image with the name you’re attempting to setup.

    Again, I’m sorry if I’m missing anything. Not being there to help kind of hinders the troubleshooting steps I can perform and suggest.



  • I believe I got part of the issue figured out. The image store issue was due to me not really having an image under the name I was trying to use. When I try to deploy (I have selected the debug option). A black screen comes up with some tasks that it verifies are “Done”. Under “Starting Image Push”, it does not have any completion status listed. Some other things that I note are I’m seeing a umount: can’t umount /ntfs: Invalid argument Done. It tells me the database is updated and says the task is complete, but when the PC boots up again, there is no OS that loads. I checked all the passwords that you mentioned above and everything looks good with that.


  • Senior Developer

    My best guess to this issue is that your file storage information is not correct. Go to the web portal and click Storage Management->All Storage Nodes->DefaultMember. Then near the bottom of the page, make sure the password and username are correct. You’ll probably notice a rather random password in the field, which is causing the issue. You’ll likely have to setup a password for the fog user on the system as well. For example: fog and password. in the password field you just type the plain text password of the user. Then you’ll do the same under fog settings tftp username and password. Then you’ll probably have it up and running. I hope. Not being at the site makes it difficult to trouble shoot the issue though. Hopefully this helps you out.



  • Okay, the newest error message that I’m receiving when trying to deploy an image is “unable to locate image store”. I’ve searched the forum on answers to this, but have not been able to get this resolved.



  • Alright, now I’ve inserted a drive the same size as the one that I’ve pulled the image from and I’m still not able to deploy to the machine. It gives me a "The third argument [/images/xp] must be a valid regular file or fifo (not a directory, a symlink, …). I’ve tried everything I can think of to get this image deployed. I went into the drive and completely wiped the partitions off of it so now it’s a clean drive. I still can’t get FOG to deploy the OS on the machine.



  • Kind of what I figured. I was working on this off and on all day today. I think I’ve got it down now, just need to find myself a large enough hard drive to test the image with. Thanks for all the help! :)


  • Senior Developer


  • Senior Developer

    Yep,

    You won’t be able to do it because the drive you’re having the issue with is smaller in disk size than the systems disk that you created the image from.

    Other than that I got nothing man~



  • Another thing happened with FOG that I’m trying to work through. I have my image stored on the server now, but when I try to deploy the image on another machine I get the following message “can’t have partition outside the disk”. It looks like FOG wiped the OS off the machine, but now there is no OS and I can’t get the image to load. Any ideas on this one?


  • Senior Developer

    No problem man, it’s what we’re all here to do. Learn, and make life easier.



  • [quote=“Tom Elliott, post: 14170, member: 7271”]Greg,

    Check your config.inc.php file. It is located typically in:
    /var/www/html/fog/commons (redhat base) or
    /var/www/fog/commons (debian/ubuntu)

    It sounds like the information you need is not in this file.

    Also, if you’re trying to access a separate mysql server you need to ensure your host can actually log in.

    So to test that, you would do:

    mysql -u root -p -h <hostname/IP>

    If you can connect this way, you know all is good.[/quote]

    Perfect!! It works now! Thanks for your help on this! I’m new to Linux and new to FOG as well, but looking forward to not having to manually install software on 47+ computers! :)


  • Senior Developer

    [quote=“Greg Martin, post: 14169, member: 10982”]When I try connecting to fog using the web interface, I get the the following error.

    Unable to connect to database.

    I checked the connection and was able to connect by entering the root password. I’m not sure if I’m missing something, but could someone help me troubleshoot this issue?

    Thanks,
    Greg[/quote]

    Greg,

    Check your config.inc.php file. It is located typically in:
    /var/www/html/fog/commons (redhat base) or
    /var/www/fog/commons (debian/ubuntu)

    It sounds like the information you need is not in this file.

    Also, if you’re trying to access a separate mysql server you need to ensure your host can actually log in.

    So to test that, you would do:

    mysql -u root -p -h <hostname/IP>

    If you can connect this way, you know all is good.


Log in to reply
 

364
Online

38982
Users

10712
Topics

101679
Posts

Looks like your connection to FOG Project was lost, please wait while we try to reconnect.