CentOS 5 Server :: Hosts File And Resolv.conf Conflict CentOS 5.5?
Apr 11, 2011
I am running an application that requires use of my /etc/hosts file. In it, I have my machine name and its LAN ip address. The program creates a service on a specific port, then attempts to connect to it based on the host name. So my hosts file has to be correct.I added the nameservers to resolv.conf and now my application will not run. My guess is that the computer is checking the name servers first, timing out then checking the hosts file.Is there a way I can tell the system to check the hosts file first, then DNS. I thought it should behave that way by default, but it does not appear to.
I'm trying to get the options for rotate timeout to work and it does not.Timeout always seems to defaults to 1 sec no mater what value I set it to, which is fine but still the option does not work.I'm setting these according to the manpage for resolv.conf, please Let me know if I'm missing somethingHere is my resolv.conf file
When my CentOS virtual machine boots it uses DHCP to get an IP address. It also overwrites resolv.conf with the DNS settings provided by the DHCP server. The DHCP server doesn't supply any search domains so I would like to get dhclient to put in a list of search domains when it writes it. How can I configure dhclient to do this?
I have a number of CentOS servers with latest 5.xI have 3 nameservers in the resolv.conf files. All 3 nameservers test out fine when checking for domain lookups.I'm having some trouble with ns1 and shut it down.l None of the CentOS machines fail over to the ns2 & ns3 entries. Basically everything stops resolving even though the other 2 nameservers are alive and well.
I've setup my server by following a ton of goods, and it seems to work ok, but I need to start using my server for email in order to receive orders placed via my website. I've followed this guide - [URL] I followed the steps above, and tested the mail server via telnet, and all seemed to be ok. I tried sending an email via Squirrelmail, from cs@thinclientwarehouse.co.uk TO my working email simon@c1systems.co.uk, but the server returned with the following message:
<simon@c1systems.co.uk>: host mail.c1systems.co.uk[95.128.128.129] said: 550-Verification failed for <cs@localhost.thinclientwarehouse.co.uk> 550-The mail server could not deliver mail to cs@localhost.thinclientwarehouse.co.uk. The account or domain may not exist, they may be blacklisted, or missing the proper dns entries. 550 Sender verify failed (in reply to RCPT TO command)
I've been scanning the apache2 docs for the past few days and have not come up with an answer my following issue:
In my httpd.conf file, at the very end, I have the line
Include conf/vhosts/vhost_*.conf
However, when I run apache checkconfig or try to start apache, it gives me the error:
httpd: Syntax error on line 993 of /etc/httpd/conf/httpd.conf: Could not open configuration file /etc/httpd/conf/vhosts/vhost_1.conf: Permission denied
It appears as if the Include line is correct - in terms of it grabbing the first virtual host conf file. However, I'm confused on the permissions. the /etc/httpd folder is owned by root:root, as are the subfolders. As a test, I chown'd the conf/vhost folder combination and all the vhost files to apache:apache to see if that made a difference, and it appeared to make no difference at all. The log files don't contain anything (assumed because apache isn't starting). If I place the contents of the vhosts in a singular vhosts.conf it works - with the permissions set to root:root. I'd like to avoid having to use one vhosts conf for the configuration I'm trying to achieve - as it would make my life a lot easier.
I tried to setup a dyndns, and ever since I tried to get that setup, I can't access my webmin, or access /etc/hosts/resolv.conf. But I can still access my samba shares I had created before this happened.
I am trying to edit my /etc/resolv.conf file while under root. After saving the changes and reboot my computer, file has not changed. I read a thread on chattr and lsattr on this fourm.(see link below) I ran in terminal lsattr /etc/resolv.conf and got the following results:-----------------e- /etc/resolv.confWhat does the dashes and e mean? I thought I would get ----ia------------ /etc/resolv.conf instead, as shown in the link. What am I doing wrong?
I am having a situation where I do not have DNS server (the person who has that is not me) for a few websites which are running on a reverse proxy. I recently after having a long trouble shooting hours found that my proxy pass entries look as follows
I'll preface this by saying i'm by no means an expert on Linux. A competant beginner at most.We have a dedicated server, the 'resolv.conf' was changed, specifically the domain that was listed (this is the primary domain).I only became aware of this change, when we get into work on Friday and all our sites were down - I attributed this to DNS fault as if I changed my host file (I work on a windows machine) and specifically routed to the domains to the correct IP address, the websites were served fine.I tracked down the resolv.conf change by quizzing a collegue. I then switched the resolv.conf file back to it's original state - luckily a backup was made so I am 100% sure that the current resolv.conf is the correct one.
change was made Friday morning, around 9.30am (UK time). It is now 5.05pm (UK time). The original change was made sometime on Weds afternoon, and the sites stopped serving between Thursday night and Friday morning.Does anyone have any idea how long it should take for the fix to be picked up? Will it be picked up? I just started to think that the change can't be picked up due to some DNS related voodoo.
I need a script but i am not good at programming soWhat script have to do:- Every 1 minute is checking if ip address is available (ping)- if ip answers nothing happens- if ip does not answers: * file /etc/hosts is changed by one stored in /home/user/hosts* notification by xterm to restart some programIf finally ip answers file /etc/hosts is changed by one stored in /home/user2/hosts
I can't seem to get the X server to allow access from clients on other hosts. (I know, not exactly a network problem, but. I made the change in /usr/share/gdm/defaults.conf to be : DisallowTCP=false
and this worked on another CentOS system, but it hasn't fixed it on this one. What other things could prevent other clients from connecting to the X server? From the local host, I get :
Warning: Tried to connect to session manager, Authentication Rejected, reason : None of the authentication protocols specified are supported and host-based authentication failed although the client DOES actually create the window and work! So, maybe this message is a clue.
From the remote host, I get : Error: Can't open display: 10.10.1.20:0.0 Which is not terribly informative. Is there a log somewhere which details why a connect request was denied? The files in /var/log/gdm are not very informative.
I am researching the CentOS Cluster Setup. Does anyone know of a guide on this or have a thread linked that I can look at? I want to build a small cluster and then be able to add to it as it grows. Mainly I want to have web hosts, data, and mail behind it. The DNS will probably be on there own.
I have a fairly simple iSCSI setup using two devices, but they have swapped names on different machines. running CentOs 5.3 ia64, and using iscsi-initiator-utils-6.2.0.868-0.18.el5
vm1: [root@vm1 ~]# fdisk -l Disk /dev/xvda: 4194 MB, 4194304000 bytes 255 heads, 63 sectors/track, 509 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes
[Code].....
Any way to get iSCSI to mount the devices as consistent device names ?
I am trying to run two web servers (Virtual Hosts) on a single Linux Centos 5.5 box with a single IP address 192.168.0.182. I did all the pre-installation requirements such yum install mysql, yum install mysqladmin, service httpd start, service mysqld start etc etc.In /var/www/html directory, I have two folder called server1 and server2. These two folders have the necessary web server php script files and folders. I opened the browser and managed to install the script on one web server successfully. When I put the IP address 192.168.0.182 on the browser address bar, the page loads without any problem. Now I would like to be able to install the other web server script and I don't know how to?Here is my httpd configuration;
I have just installed sendmailanalyzer to my centos 6 by using rpm package. But before, i tried to install it by perl.There is no problem now everything works but when i want to configure i see that there are lots of conf file. How can i see a conf file of service "sendmailanalyzer" what is the command ?
I have managed to delete my yum.conf file and do not have a backup. I have tried reinstalling yum and it does complete but when I try and run yum I get cannot find any conf file. Is there a standard conf file I can download? I am running centos 5.3.
On a production Centos 5.3 system, I want to raise the hard & soft limits of open file handles from 1024 -> 8192 (not a "biggie", I'd think) Right now, "sysctl -a | grep file" shows fs.file-max=463144 (a default, I'd guess) I'm guessing file-max is the maximum number of open file handles on the system, vs the per-user limits seen with "ulimit -Hn" and "ulimit -Sn". Right? If so, I shouldn't think I'd have to touch this on a server with few users.
Also, after doing a lot of reading, I still don't understand the mentions of needing to also add: "session required pam_limits.so" to /etc/pam.d/loginor adding "session required /lib/security/$ISA/pam_limits.so" to /etc/pam.d/system-auth Maybe I've gotten off into the deep weeds in goggling about raising file handle limits.
For use on a test LAN, ie. security is not an issue, I need to install the most basic FTP server available just so we can share files back and forth between test hosts : launch FTPd, have it share a directory through either "anonymous" or a single, shared login/password?
accidentally I do something wrong with my server and the httpd folder missing and I need it to setup my mail server and anyone can help me what can I do without reinstalling my Cent OS? Here is the error msg :
[root@mydomain etc]# service httpd stop Stopping httpd: [FAILED] [root@mydomain etc]# service httpd restart
What i want to be able to do is create a custom kickstart for my centOS 5 server. I want to create a bootable cd that I can pop in my server and basically walk away for 45 minutes and I come back and its fully installed. All the directions I have read so far tell me that I have to create a seperate ks.cfg and then I need my original centos cd to get it booted. Then the cd will ask for where the ks.cfg file is and I have to type the location. I just want to pop the CD in and type in linux_clean or something and have it perform a custom install based on the information and specification in my ks.cfg. How can I go about doing this?
OS CentOS 5.4 I have a DNS server that is logging all named and dns requests to the chrooted named directory. By default named logs to /var/log/messages but I want to isolate all the dns queries and requests to separate files. I know I can add entries to /etc/syslog.conf to "roll" the logs and logrotate should pick them up but fuzzy as to the syntax. I don't know what "tag" to use in the first fieild. for example
# Log anything (except mail) of level info or higher. # Don't log private authentication messages! *.info;mail.none;authpriv.none;cron.none/var/log/messages
I've been trying to make install apache 2.1.8 and php 5.2.3 and work on them. After updating and installing some dependence files, apache and php could both be installed.
Then I tried to configure them. I added the following content to the end of Apache httpd.conf:
Code:
Then I run /path/to/apachectl start, and saw the message:
Quote:
Invalid command 'RewriteEngine', perhaps misspelled or defined by a module not included in the server configuration
Then I remembered that I didn't include the rewrite module while making install apache. So I removed the 2 lines I just added to httpd.conf.
But, after running /path/to/apachectl stop and start again, I could still see:
Code:
When I use firefox to open http://host_ip:8080/, I could see "It works!". But when I open http://host_ip:8080/hello.php (the file is already under htdocs), firefox said Quote:
Failed to Connect
Why and how to solve it?
I noticed that for some stupid reason, the conf file wasn't updated at all and the 2 erroneous lines were still there.
I was particulary suprised to have nothing in my logs regarding an IP address conflict in Linux compared to the windows and its popup !Did I miss something in the logs ? Or is there someting to configure to have it ?Otherwise can I do something to have the date in the dmesg log file ?Here my story about this problem :My linux machine was monitored by Nagios so i've seen some Up/down/up/down phenomene when I came to work this morning. I tried to figured out what's wrong browsing the logs (messages & dmesg & mail/root)... but nothing usefull so far...Then I hearded that a collegue booted a old Windows machine the day before. I checked this machine and there was the classic windows popup regarding a IP address conflict! So that was the problem, the Windows machine have the same IP than de Linux box.I was particulary suprised to have nothing in my logs regarding an IP address conflict in Linux compared to the windows and its popup !Did I miss something in the logs ? Or is there someting to configure to have it ?Otherwise can I do something to have the date in the dmesg log file ?Linux : CentOS 5.4 64bitsWindows : Windows server 2003 32 bits
What happen if we assign a static IP address to both linux and windows host?Consider host A is a ubuntu machine and host B is a windows machine. I first set a static IP for host A (W.X.Y.Z) and connect to it through ssh. Then I duplicate that IP for host B (W.X.Y.Z).The result was that I could no longer connect to the ubuntu machine!
Centos version: 2.6.18-92.el5 Processor:Intel Xeon L5420 Quad-Core Guest OS:Windows Server 2008 Web
KVM is istalled using these instructions: [URL] When I run qemu-kvm to boot a VM off the Windows Install .iso with the -no-acpi parameter the VM displays the following:
Windows Boot Manager Windows failed to start... Status 0xc0000225 Info: Windows failed to load because the firmware (BIOS) is not ACPI compatible
Without the -no-acpi parameter, the Windows Server 2008 guest shows a blue screen with "stop: 0x000000A5" meaning "The ACPI Bios in this system is not fully compliant to the specification." [URL] 386/32bit and x86/64bit versions of CentOs both exhibit the problem. IT WORKS after I compiled and installed the latest versions of the Kernel (2.6.28.7) and KVM (84) (Using these instructions: [URL] Following advice [URL] I really don't want to run a custom kernel. I compiled various KVM versions with the 2.6.18 kernel but still get the ACPI problem or compiler errors or "Hypervisor too old: KVM_CAP_USER_MEMORY extension not supported" How to get a Windows Server 2008 guest running in KVM on Centos?