{"id":505,"date":"2010-02-06T09:02:19","date_gmt":"2010-02-06T13:02:19","guid":{"rendered":"http:\/\/linuxhostingsupport.net\/blog\/?p=505"},"modified":"2013-03-20T08:42:24","modified_gmt":"2013-03-20T12:42:24","slug":"unable-to-get-tty-name-bad-file-descriptor","status":"publish","type":"post","link":"https:\/\/linuxhostingsupport.net\/blog\/unable-to-get-tty-name-bad-file-descriptor","title":{"rendered":"Unable to get tty name: Bad file descriptor"},"content":{"rendered":"<p>You may receive an error as <strong>&#8220;Unable to get tty name: Bad file descriptor&#8221;<\/strong> while accessing a VPS from the host server. The problem occur when some files from \/lib directory of the VPS goes missing. See example below:<\/p>\n<blockquote><p><span style=\"color: #0000ff;\"><strong>root@hostserver:\/# vzctl enter VEID<br \/>\nentered into CT VEID<br \/>\nUnable to get tty name: <\/strong><\/span><span style=\"color: #0000ff;\"><strong>Bad file descriptor<\/strong><\/span><br \/>\n<span style=\"color: #0000ff;\"><strong> root@VEID:\/#<\/strong><\/span><\/p><\/blockquote>\n<p>In this case, you will either have to copy the \/lib directory from a different VPS of the same template<\/p>\n<blockquote><p><span style=\"color: #0000ff;\"><strong># cp -R \/vz\/root\/VEID1\/lib\u00a0 \/vz\/root\/VEID\/<\/strong><\/span><\/p><\/blockquote>\n<p>(where, VEID1 is the VPS ID of a different VPS using the same OS template)<\/p>\n<p>OR extract the respective OS template and copy the \/lib directory from it:<\/p>\n<blockquote><p><span style=\"color: #0000ff;\"><strong># tar -zxf \/vz\/template\/cache\/os_template.tar.gz<br \/>\n# cp -R \/vz\/template\/cache\/lib \/vz\/root\/VEID\/<\/strong><\/span><\/p><\/blockquote>\n<p>Reboot the VPS<\/p>\n<blockquote><p><span style=\"color: #0000ff;\"><strong># vzctl restart VEID<\/strong><\/span><\/p><\/blockquote>\n","protected":false},"excerpt":{"rendered":"<p>You may receive an error as &#8220;Unable to get tty name: Bad file descriptor&#8221; while accessing a VPS from the host server. The problem occur when some files from \/lib directory of the VPS goes missing. See example below:<br \/>\nroot@hostserver:\/# vzctl enter VEID<br \/>\nentered into CT VEID<br \/>\nUnable to get tty name: Bad file descriptor<br \/>\n root@VEID:\/#<br \/>\nIn this case, you will either have to copy the \/lib directory from a different VPS of the same template<br \/>\n# cp -R \/vz\/root\/VEID1\/lib\u00a0 \/vz\/root\/VEID\/<br \/>\n(where, VEID1 is the VPS ID of a different VPS using the same [&#8230;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[680,683,682,679,681],"_links":{"self":[{"href":"https:\/\/linuxhostingsupport.net\/blog\/wp-json\/wp\/v2\/posts\/505"}],"collection":[{"href":"https:\/\/linuxhostingsupport.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/linuxhostingsupport.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/linuxhostingsupport.net\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/linuxhostingsupport.net\/blog\/wp-json\/wp\/v2\/comments?post=505"}],"version-history":[{"count":4,"href":"https:\/\/linuxhostingsupport.net\/blog\/wp-json\/wp\/v2\/posts\/505\/revisions"}],"predecessor-version":[{"id":2187,"href":"https:\/\/linuxhostingsupport.net\/blog\/wp-json\/wp\/v2\/posts\/505\/revisions\/2187"}],"wp:attachment":[{"href":"https:\/\/linuxhostingsupport.net\/blog\/wp-json\/wp\/v2\/media?parent=505"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/linuxhostingsupport.net\/blog\/wp-json\/wp\/v2\/categories?post=505"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/linuxhostingsupport.net\/blog\/wp-json\/wp\/v2\/tags?post=505"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}