Jump to content

If the Server Name has a space.... HOSTS file help


zzsprade

Recommended Posts

Posted

When I originally built my first Unraid I made the critical mistake of making the server name two words with a space. Talk about good practice coming back to bite you!

 

As such I would like to know if it is possible to access the Unraid Main Menu with a server name that is two words (inc. space), rather than just the IP. Can it be typed in and what is the format?

 

I hope that upon learning how it can be accessed as a two word server name with a space that I can then edit that format into my hosts file to simplify things.

 

Any ideas?

 

-Alex

Posted

Thanks Kizer! I will give that a go.

 

I wish I could bring myself to just do that.

 

Unfortunately everything has been set up as such: 20+ backups, syncs with schedules, mapped network drives and just general settings. The loss is greater than the gain.

 

 

Posted

You are using an invalid hostname.

Since many files use a space or tab as a delimiter it's going to give you grief all the time.

You can make an alias which points to the hostname while you transition. (and I do recommend you change it).

 

So you can have both a hostname as you have now and one without the spaces all defined to the same IP if needed.

 

 

Restrictions on valid host names

Hostnames are composed of series of labels concatenated with dots, as are all domain names. For example, "en.wikipedia.org" is a hostname. Each label must be between 1 and 63 characters long,[1] and the entire hostname (including the delimiting dots) has a maximum of 255 characters.

 

The Internet standards (Request for Comments) for protocols mandate that component hostname labels may contain only the ASCII letters 'a' through 'z' (in a case-insensitive manner), the digits '0' through '9', and the hyphen ('-'). The original specification of hostnames in RFC 952, mandated that labels could not start with a digit or with a hyphen, and must not end with a hyphen. However, a subsequent specification (RFC 1123) permitted hostname labels to start with digits. No other symbols, punctuation characters, or white space are permitted.

 

While a hostname may not contain other characters, such as the underscore character (_), other DNS names may contain the underscore.[2] Systems such as DomainKeys and service records use the underscore as a means to assure that their special character is not confused with hostnames. For example, _http._sctp.www.example.com specifies a service pointer for an SCTP capable webserver host (www) in the domain example.com.

 

A notable example of non-compliance with this specification, Microsoft Windows systems often use underscores in hostnames. Since some systems will reject invalid hostnames while others will not, the use of invalid hostname characters may cause subtle problems in systems that connect to standards-based services. For example, RFC-compliant mail servers will refuse to deliver mail for MS Windows computers with names containing underscores. Android smartphones also use underscores in their hostnames.

Posted

I was in the middle of typing that you really need to change your host name and lost my post..

 

for a servers network host name, you only want to  use a-z and 1-0. (in most cases, a dash is ok)

 

underscores can screw with some dns servers. even though Microsoft like underscores, I would avoid it. even in an all windows network (if there is  such a thing), the second you attach some appliances or server that are not Microsoft, they can have issues.

 

Spaces in a network/servername cause major grief, some apps that all unc paths will blow-up with a space in the name. in addition, dns usually truncates the name in the database and then you cant find the server.

 

you should keep your server names to 15 characters or less. although AD can support 16byte names, some devices are still old school..

 

also you should not name a server anything that can translate in hex.. some servers or network appliances might think that is in hex and then cause issues..

 

 

 

 

 

Posted

Wow, it is always a pleasure having such knowledgeable individuals willing to provide such answers. Thank you. I feel I have learnt a trick or two this afternoon.

 

You can make an alias which points to the hostname while you transition. (and I do recommend you change it).

 

So you can have both a hostname as you have now and one without the spaces all defined to the same IP if needed.

 

 

 

 

 

WeeboTech - As an interim measure how would I establish such an alias to the same IP, so that both are accessible. I am at a loss as to what the process may be called to do a search.  Any insight to point me in the right direction?

 

 

 

 

Posted

Wow, it is always a pleasure having such knowledgeable individuals willing to provide such answers. Thank you. I feel I have learnt a trick or two this afternoon.

 

You can make an alias which points to the hostname while you transition. (and I do recommend you change it).

 

So you can have both a hostname as you have now and one without the spaces all defined to the same IP if needed.

WeeboTech - As an interim measure how would I establish such an alias to the same IP, so that both are accessible. I am at a loss as to what the process may be called to do a search.  Any insight to point me in the right direction?

 

How is your network set up?

Do you have a DNS server or something defined in a router that provides hostname resolution?

That's where you would define two hosts one to an ip, then an alias to the other one.

 

Other then that I suppose you could update the local hosts file.

I'm sorta baffled in how you were able to use a hostname with a space in it to begin with.

Posted

Also, correct me if I'm wrong, the first level directories for unRAID shares also should not have any spaces in the name. Second level and beyond is ok to have spaces.

Someplace in the docs I saw that...just can't remember where.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...