ref
lonely + -ness
loneliness (n.)
1580s, "condition of being solitary," from lonely + -ness. Meaning "feeling of being dejected from want of companionship or sympathy" is from 1814.