Portal Home > Knowledgebase > Articles Database > hostname: Unknown host


hostname: Unknown host




Posted by Daniel B, 08-08-2013, 04:09 PM
So...I'm trying to learn how to manage my own dedicated server since I'm just going to be running my own sites now... I've installed centos6, installed openvz, and then installed the ovz web panel. My issue is it's saying "hostname: Unknown host" at the end of the install for ovz web panel. I've googled all over the place and I can't seem to figure out why it's doing this The issue is resulting in a panel url of http://:3000 instead of http://myip:3000...so I'm guessing there is an IP setting on the server somewhere that might be missing? Last edited by Daniel B; 08-08-2013 at 04:15 PM.

Posted by server26ms, 08-08-2013, 05:06 PM
vi /etc/sysconfig/network

Posted by Server Management, 08-08-2013, 05:34 PM
Is your hostname outputting correctly?

Posted by Daniel B, 08-08-2013, 06:09 PM
etc/sysconfig/network is showing NETWORKING=yes HOSTNAME=server.domain.com GATEWAY=111.1.11.111 so it looks like that's configured correctly to me. if I do # hostname, it shows up as server.domain.com just fine.

Posted by server26ms, 08-08-2013, 06:23 PM
Check apache make sure you have a servername for the virtual server

Posted by serve-you, 08-08-2013, 06:23 PM
Is the hostname properly defined in /etc/hosts as well? Is it also in DNS?

Posted by server26ms, 08-08-2013, 06:24 PM
Does it work when you type in the ip in the browser?

Posted by Daniel B, 08-08-2013, 06:31 PM
apache is not installed, it's using the webrick server that comes standard with ovz web panel. I'm going to guess that no, the hostname is not setup correct in etc/hosts. Looking at the file...it looks...strange http://i1071.photobucket.com/albums/...pseb675c89.png I'm completely new to setting a server up. I've been in SSH over the years, but only messing with things that are already setup. The steps for where I am right now were literally taken from provisioning step 1: get server from provisioning with OS installed step 2: install openvz and requirements step 3: install ovz web panel and requirements I haven't messed with anything else, been having a hard time finding a guide for everything I should be doing (plenty of security guides, but can't find an actual "from scratch" guide).

Posted by Daniel B, 08-08-2013, 06:38 PM
ok, so I can't even connect with the direct IP (though I can ping it), so I'm guessing there are some steps I need to be taking still to get the server setup in the first place. Anyone happen to have a link to a good guide on steps for a new dedicated server? (not just security steps...there's plenty of those around). What should I be doing after I install the OS, to get to a working OpenVZ VPS node (I'm just trying to learn, everything on this server is mine, I'm not selling VPSs...so don't worry about that, lol )

Posted by Vudoo, 08-08-2013, 06:41 PM
Add a line in the /etc/hosts file on the bottom with something like or

Posted by Daniel B, 08-08-2013, 06:46 PM
should all those other ones be in there? the multiple localhosts? never seen that before.

Posted by Daniel B, 08-08-2013, 06:54 PM
I added IP and hostname to the /etc/hosts file, now it shows the hostname:3000 during ovz panel install which is a start. I'm going to assume the other issue is this: the 0.0.0.0

Posted by Vudoo, 08-08-2013, 07:41 PM
Yeah you can leave those. This is not really a problem either as this just usually means it is listening on all bound IPs.

Posted by HostUS - Alexander, 08-08-2013, 07:45 PM
Change the web server listening IP address, Alexander

Posted by Daniel B, 08-08-2013, 08:22 PM
not sure how to do this, googling it returns a lot of apache instructions, but this is using Webrick (and should work by default). After some reading it says that 0.0.0.0 should work for all IPs, so might not be the problem just to make sure before I try to find the instructions on how to do it with webrick, I should be setting the listening IP to the server IP?

Posted by serve-you, 08-08-2013, 08:25 PM
As vudoo stated, it shouldn't be an issue. Is it working when you go to the hostname and IP?

Posted by server26ms, 08-08-2013, 08:26 PM
I would try to use apache

Posted by serve-you, 08-08-2013, 08:31 PM
You can't use apache with owp.

Posted by Daniel B, 08-08-2013, 08:39 PM
no, so I'm guessing there is something I didn't do yet that I should have done with initial server setup (this is my first time...still learning)

Posted by serve-you, 08-08-2013, 08:42 PM
Is there a firewall running?

Posted by Daniel B, 08-09-2013, 05:26 AM
Chain INPUT (policy ACCEPT) target prot opt source destination ACCEPT all -- 0.0.0.0/0 0.0.0.0/0 state RELATED,ESTABLISHED ACCEPT icmp -- 0.0.0.0/0 0.0.0.0/0 ACCEPT all -- 0.0.0.0/0 0.0.0.0/0 ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 state NEW tcp dpt:22 REJECT all -- 0.0.0.0/0 0.0.0.0/0 reject-with icmp-host-prohibited Chain FORWARD (policy ACCEPT) target prot opt source destination REJECT all -- 0.0.0.0/0 0.0.0.0/0 reject-with icmp-host-prohibited Chain OUTPUT (policy ACCEPT) target prot opt source destination

Posted by serve-you, 08-09-2013, 08:35 AM
That's your problem. You are only allowing port 22 (SSH). Try adding a rule to allow access to port 3000. If that works then simply save the rules:

Posted by Daniel B, 08-09-2013, 08:56 AM
That added, but still can't get to it (even just using the IP itself without the port it coming up as "Oops! Google Chrome could not connect to IP" oh, and I really appreciate all the help Still trying to hopefully find a guide for setting up a new server from start to finish and seems inpossible to find.

Posted by serve-you, 08-09-2013, 09:02 AM
You can try disabling the firewall altogether just to test. If you can get in then, at least you know for sure what you are dealing with. Feel free to PM me if you'd like me. I'm not super busy today, so I could help you sort this out real quick.



Was this answer helpful?

Add to Favourites Add to Favourites    Print this Article Print this Article

Also Read
CPnginx or Nginx Admin (Views: 641)

Language: