Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unable to sudo on Chameleon Cloud Ubuntu Virtual Machine #246

Open
mmccombe opened this issue Oct 19, 2016 · 9 comments
Open

unable to sudo on Chameleon Cloud Ubuntu Virtual Machine #246

mmccombe opened this issue Oct 19, 2016 · 9 comments

Comments

@mmccombe
Copy link

SUMMARY

After booting Ubuntu-Server-14.04-LTS Virtual Machine on Chameleon Cloud using Cloudmesh client, associating a floating IP, and connecting via ssh, the following error message is returned when trying to run any sudo command. This issue may not be related to Cloudmesh itself, but Dr. von Laszewski asked me to write up the issue here so he could assign it to someone to research.

cc@mmccombe-021:~$ sudo ls
sudo: unable to resolve host mmccombe-021
(mmccombe-021 is the hostname of the machine.

STEPS TO REPRODUCE
  • Create virtual machine
  • Connect via ssh
  • Run any command with sudo.
@fugangwang
Copy link
Member

This appears to be an OS/image specific issue. Can you take a look at the files
/etc/hostname
/etc/hosts
and try to run ‘ping ’.
If the hostname appears in the two files, and ping also works, this should not happen. Otherwise, you may manually add the hostname to the ‘127.0.0.1’ line.

On Oct 18, 2016, at 9:44 PM, mmccombe [email protected] wrote:

SUMMARY

After booting Ubuntu-Server-14.04-LTS Virtual Machine on Chameleon Cloud using Cloudmesh client, associating a floating IP, and connecting via ssh, the following error message is returned when trying to run any sudo command. This issue may not be related to Cloudmesh itself, but Dr. von Laszewski asked me to write up the issue here so he could assign it to someone to research.

cc@mmccombe-021:~$ sudo ls
sudo: unable to resolve host mmccombe-021
(mmccombe-021 is the hostname of the machine.

STEPS TO REPRODUCE

Create virtual machine
Connect via ssh
Run any command with sudo.

You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub #246, or mute the thread https://github.com/notifications/unsubscribe-auth/ABS9UYPj3vCtR1X4ESrmGJo6Z8oAhQbbks5q1XX7gaJpZM4KaeQe.

@laszewsk
Copy link
Member

he cant add as sudo does not work ;-)

On Oct 19, 2016, at 11:05 AM, Fugang Wang [email protected] wrote:

This appears to be an OS/image specific issue. Can you take a look at the files
/etc/hostname
/etc/hosts
and try to run ‘ping ’.
If the hostname appears in the two files, and ping also works, this should not happen. Otherwise, you may manually add the hostname to the ‘127.0.0.1’ line.

On Oct 18, 2016, at 9:44 PM, mmccombe <[email protected] mailto:[email protected]> wrote:

SUMMARY

After booting Ubuntu-Server-14.04-LTS Virtual Machine on Chameleon Cloud using Cloudmesh client, associating a floating IP, and connecting via ssh, the following error message is returned when trying to run any sudo command. This issue may not be related to Cloudmesh itself, but Dr. von Laszewski asked me to write up the issue here so he could assign it to someone to research.

cc@mmccombe-021:~$ sudo ls
sudo: unable to resolve host mmccombe-021
(mmccombe-021 is the hostname of the machine.

STEPS TO REPRODUCE

Create virtual machine
Connect via ssh
Run any command with sudo.

You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub <#246 #246>, or mute the thread <https://github.com/notifications/unsubscribe-auth/ABS9UYPj3vCtR1X4ESrmGJo6Z8oAhQbbks5q1XX7gaJpZM4KaeQe https://github.com/notifications/unsubscribe-auth/ABS9UYPj3vCtR1X4ESrmGJo6Z8oAhQbbks5q1XX7gaJpZM4KaeQe>.


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub #246 (comment), or mute the thread https://github.com/notifications/unsubscribe-auth/AAZ8VR4QDCHqxGOPSDwppzPt8Vt_wkLkks5q1jG-gaJpZM4KaeQe.

@fugangwang
Copy link
Member

Despite the fact that sudo gives an error, it appears it actually still runs.
BTW I can totally replicate the same issue and fix it as such:

cc@vm-001:$ sudo ls
sudo: unable to resolve host vm-001
cc@vm-001:
$ cat /etc/hostname
vm-001
cc@vm-001:~$ cat /etc/hosts
127.0.0.1 localhost

The following lines are desirable for IPv6 capable hosts

::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts

cc@vm-001:$ sudo vi /etc/hosts
sudo: unable to resolve host vm-001
cc@vm-001:
$ sudo ls
cc@vm-001:~$ cat /etc/hosts
127.0.0.1 localhost vm-001

The following lines are desirable for IPv6 capable hosts

::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts

Please note this has nothing to do with the cloudmesh tool we are using.

On Oct 19, 2016, at 11:26 AM, Gregor von Laszewski [email protected] wrote:

he cant add as sudo does not work ;-)

On Oct 19, 2016, at 11:05 AM, Fugang Wang <[email protected] mailto:[email protected]> wrote:

This appears to be an OS/image specific issue. Can you take a look at the files
/etc/hostname
/etc/hosts
and try to run ‘ping ’.
If the hostname appears in the two files, and ping also works, this should not happen. Otherwise, you may manually add the hostname to the ‘127.0.0.1’ line.

On Oct 18, 2016, at 9:44 PM, mmccombe <[email protected] mailto:[email protected] <mailto:[email protected] mailto:[email protected]>> wrote:

SUMMARY

After booting Ubuntu-Server-14.04-LTS Virtual Machine on Chameleon Cloud using Cloudmesh client, associating a floating IP, and connecting via ssh, the following error message is returned when trying to run any sudo command. This issue may not be related to Cloudmesh itself, but Dr. von Laszewski asked me to write up the issue here so he could assign it to someone to research.

cc@mmccombe-021:~$ sudo ls
sudo: unable to resolve host mmccombe-021
(mmccombe-021 is the hostname of the machine.

STEPS TO REPRODUCE

Create virtual machine
Connect via ssh
Run any command with sudo.

You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub <#246 #246<#246 #246>>, or mute the thread <https://github.com/notifications/unsubscribe-auth/ABS9UYPj3vCtR1X4ESrmGJo6Z8oAhQbbks5q1XX7gaJpZM4KaeQe https://github.com/notifications/unsubscribe-auth/ABS9UYPj3vCtR1X4ESrmGJo6Z8oAhQbbks5q1XX7gaJpZM4KaeQe<https://github.com/notifications/unsubscribe-auth/ABS9UYPj3vCtR1X4ESrmGJo6Z8oAhQbbks5q1XX7gaJpZM4KaeQe https://github.com/notifications/unsubscribe-auth/ABS9UYPj3vCtR1X4ESrmGJo6Z8oAhQbbks5q1XX7gaJpZM4KaeQe>>.


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub <#246 (comment) #246 (comment)>, or mute the thread <https://github.com/notifications/unsubscribe-auth/AAZ8VR4QDCHqxGOPSDwppzPt8Vt_wkLkks5q1jG-gaJpZM4KaeQe https://github.com/notifications/unsubscribe-auth/AAZ8VR4QDCHqxGOPSDwppzPt8Vt_wkLkks5q1jG-gaJpZM4KaeQe>.


You are receiving this because you commented.
Reply to this email directly, view it on GitHub #246 (comment), or mute the thread https://github.com/notifications/unsubscribe-auth/ABS9Ue8EZcgCWyzG8fsmC1mSjuAjQ_Bsks5q1jaqgaJpZM4KaeQe.

@badmutex
Copy link
Contributor

@mmccombe does the sudo command actually run (despite the "unable to resolve host" error)?

@badmutex
Copy link
Contributor

I agree with @fugangwang this isn't a cloudmesh issue.

@laszewsk
Copy link
Member

I asked student to file it here as this is best way to reach experts ;-) We new it was not cloudmesh …

On Oct 19, 2016, at 11:39 AM, badi [email protected] wrote:

I agree with @fugangwang https://github.com/fugangwang this isn't a cloudmesh issue.


You are receiving this because you commented.
Reply to this email directly, view it on GitHub #246 (comment), or mute the thread https://github.com/notifications/unsubscribe-auth/AAZ8VaxOPc0poCUkNBol-I-TxRCYsghuks5q1jmqgaJpZM4KaeQe.

@badmutex
Copy link
Contributor

It is not really a problem, more an annoyance. If he wants the "unable to resolve host" message to go away, He should follow @fugangwang's comment above.

@laszewsk
Copy link
Member

I suggest we do a special add on in our class web page to document this, this will come up with lots of students and we will get lots of questions on this.

On Oct 19, 2016, at 11:47 AM, badi [email protected] wrote:

It is not really a problem, more an annoyance. If he wants the "unable to resolve host" message to go away, He should follow @fugangwang https://github.com/fugangwang's comment above.


You are receiving this because you commented.
Reply to this email directly, view it on GitHub #246 (comment), or mute the thread https://github.com/notifications/unsubscribe-auth/AAZ8VezcUs7UsJONhj8qdUEhgVVxchR3ks5q1juegaJpZM4KaeQe.

@mmccombe
Copy link
Author

Thank you. I was originally under the impression that sudo was failing
(what I tried to run using sudo failed for other reasons and the unable to
resolve host message confused me). As pointed out, sudo was actually
working. Also, adding the hostname to /etc/hosts as you directed did stop
the message from coming out for me as well.

Thanks again for your help.

Mark

On Wed, Oct 19, 2016 at 11:47 AM, badi [email protected] wrote:

It is not really a problem, more an annoyance. If he wants the "unable to
resolve host" message to go away, He should follow @fugangwang
https://github.com/fugangwang's comment above.


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#246 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AVklc9pgQLQiRqJ_nDAhwmB_PYde6_uYks5q1jufgaJpZM4KaeQe
.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants