Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


can't connect to openvz container
New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

can't connect to openvz container

niceboyniceboy Veteran
edited October 2013 in Help

Hi,

I bought a 1gb kvm vps from lunanode for learning openvz.

I followed the tutor at http://www.howtoforge.com/installing-and-using-openvz-on-centos-6.0 which went perfectly..

I created a test vps and assigned it an ip, root password etc..

I have started the container..

Now,

  1. I can't connect to the container ip thru ssh.

  2. Also, I tried entering into the container and tested ping google.com which did not work(all packets lost).

  3. I tried stopping iptables in my kvm vps after exiting the container and still it fails ssh.

Could some please help on this..

Thanked by 1jake

Comments

  • 1) You need to reboot your KVM VPS to make sure that the openvz kernel is used.

    2) Make sure you have additional IP's to assign to the Openvz VPS you created.

    3) Put resolvers in /etc/resolv.conf such as;
    nameserver 208.67.222.222
    nameserver 208.67.220.220

    Thanked by 1niceboy
  • smansman Member
    edited October 2013

    A shot in the dark based on the most likely causes.

    Connected from Console:

    setenforce 0

    If that works then

    nano /etc/selinux/conf
    and set
    SELINUX=disabled
    to make change permanent

    If that doesn't work then try

    iptables -P INPUT ACCEPT

    iptables -F

    If that works then

    service iptables save to make permanent then reconfigure iptables as necessary.

    Thanked by 1niceboy
  • rskrsk Member, Patron Provider

    Try doing an IP ping from the container instead of google.com. If an IP ping works fine it means the issue was with /etc/resolv.conf files. Otherwise it is with IPs and i'd suggest you check ip forwarding or iptables.

    :)

    Thanked by 1niceboy
  • agentmishraagentmishra Member, Host Rep

    you post your problem.

    people reply

    you do not reply, as to which suggestion worked out for you, where things went wrong, etc....

    HABITS

  • @agentmishra,

    Mind your own business.. If you don't have something to contribute, no need to comment on me and my habits here..

    Did you see my previous thread? When I request for help, I thank each and everyone who suggest something helpful(whether it actually helps me or not).

    I did not comment/reply what worked for me here, because I was asleep when I got these reply's.

    Btw, thanks all others, I'll update the thread on the status once I try your suggestions.

  • agentmishraagentmishra Member, Host Rep

    @niceboy said:
    agentmishra,

    Mind your own business.. If you don't have something to contribute, no need to comment on me and my habits here..

    Did you see my previous thread? When I request for help, I thank each and everyone who suggest something helpful(whether it actually helps me or not).

    I did not comment/reply what worked for me here, because I was asleep when I got these reply's.

    Btw, thanks all others, I'll update the thread on the status once I try your suggestions.

    its none of my business if you thanks people or not, i had some answer, and my suggestion wont work till you have not implemented one of the suggestion as suggested by some other active member.

    i was just eager to know, if it worked out than fine else i would suggest my tweak/work-around

    any ways you could just had commented that you were sleeping, but seems like you were more than hurt and disappointed by my words, and you went on to guide me to mind my own business...

    and yes that's correct, these are HABITS!!!

  • @agentmishra

    Sorry If I did hurt you with my comment. I'm always open to suggestions and constructive criticism.

    But, your first comment just seems to be so childish and out of context.

    LET is a forum where people from every corner of world participate from different time zones. I suggest you to remember it before posting a comment like that(without even knowing the person).

    I probably can suggest you to correct your HABIT of commenting something of no use with something which may help people.

    I understood that you wanted to help me with a suggestion. Why not suggest it first and ask if everything went right? As you can see on the thread, you are the only person who is so worried on me not replying back with updates(And mentioning it as a habit).

  • agentmishraagentmishra Member, Host Rep

    dear @niceboy

    i have seen this in many a thread, where people start the thread and do not reply to the posts, it a normal habit in general.

    any ways even i am sorry

    so your problem is you cannot connect to the vps...

    if you are able to connect via the server node, kindly post the dump of your node iptables, the dump of your vps iptables

    Thanked by 1niceboy
  • @agentmishra .. Backseat mod much.. You had nothing to contribute but the lack of spelling.

    I'm fairly new to virtualization I've got a box at home setup using KVM, I had to setup a bridged connection on the host, I'm not sure if that's the same for openvz?

    Thanked by 2niceboy Magiobiwan
  • Thank you all.. I'm trying again from scratch(re installed my vm).. update you all again..

  • seriesnseriesn Member
    edited October 2013

    AgentWhatever, grow a pair and mind your own business please.

    @niceboy, check your iptables rules and ping to your node from the container and see if it pings.

    Thanked by 1niceboy
  • SpeedBusSpeedBus Member, Host Rep

    Most of the time I've seen this happen is because of Iptables, turn off iptables on the hostnode for a minute or so then vzctl enter into the VPS and have a try at ping/ssh into the box

    Thanked by 1niceboy
  • agentmishraagentmishra Member, Host Rep

    @ATHK said:
    agentmishra .. Backseat mod much.. You had nothing to contribute but the lack of spelling.

    I'm fairly new to virtualization I've got a box at home setup using KVM, I had to setup a bridged connection on the host, I'm not sure if that's the same for openvz?

    FO

  • agentmishraagentmishra Member, Host Rep

    @seriesn said:
    AgentWhatever, grow a pair and mind your own business please.

    niceboy, check your iptables rules and ping to your node from the container and see if it pings.

    to you too.

  • agentmishraagentmishra Member, Host Rep

    here was some body asking for support, and people do not understand simple things..

    any ways, since its not my thread, i shouldnt pork in my head much

  • Here is an update..

    I tried many times re installing my lunanode vps and different type of tutors on net. Everytime I got the same problem. Tried disabling iptables on both kvm vps and inside openvz vps, still the same issue..

    Tried contacting the lunanode on probable iptables issue on host node.. and, they basically said they can't do anything on node and every thing is fine as far as node iptables are concerned..

    Finally, I signed upto another kvm vps from HardCloud and tried the same steps.. Now.. BOOM! It worked..!

    I concluded that it was the fault with the iptables on lunanode vps node and not any of my steps.

    I'm about to cancell my lunanode vps now..

    Hope this helps anyone considering lunanode for openvz experimentation.

    And.. Thank you all the community friends who actively suggested and helped me to move in the right direction.

  • DroidzoneDroidzone Member
    edited October 2013

    @agentmishra said:
    here was some body

    No it wasnt any disembodied spirit.

    any ways, since its not my thread, i shouldnt pork in my head much

    LOLWUT?

  • agentmishraagentmishra Member, Host Rep

    @joelgm said:
    LOLWUT?

    ouch!!!

  • hbjlee17hbjlee17 Member, Host Rep
    edited October 2013

    I am not experienced with openvz, but as we said in response to your ticket, nothing on the host node needed to be done to enable networking to your openvz containers.

    I setup a centos 6.4 32bit kvm VPS on one of the very same node that your service is on, followed the steps as outlined in http://www.howtoforge.com/installing-and-using-openvz-on-centos-6.0 and had my openvz container up and running within 10 mins from following the tutorial.

    One thing I had to do, that was not part of the tutorial, was to make sure that ifcfg-eth0-range0 was deleted, and network restarted to reflect that, so that openvz node is not also using the rest of the 4 IP addresses out of the 5 assigned to your VPS. ( I am not sure if this step was needed as explained before that I am not familiar with openvz virtualization, but I did it because it seemed common sense to me that you wouldnt want the same IP address assigned to your openvz container, and the openvz node itself, hence duplicating IP assignments )

    Anyway, here are the result to proof that I am able to communicate to and from the newly created openvz container.

    VPS IP assignment.
    96.127.135.58 - 62 ( 5 IPv4 address included with every KVM vps purchased )

    96.127.135.58 <-- assigned to the openvz node itself.

    96.127.135.59 <-- assigned to vmid 101

    ping from my computer.

    C:\Users\jason>ping 96.127.135.59
    
    Pinging 96.127.135.59 with 32 bytes of data:
    Reply from 96.127.135.59: bytes=32 time=56ms TTL=53
    Reply from 96.127.135.59: bytes=32 time=56ms TTL=53
    Reply from 96.127.135.59: bytes=32 time=57ms TTL=53
    Reply from 96.127.135.59: bytes=32 time=56ms TTL=53
    
    Ping statistics for 96.127.135.59:
        Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
    Approximate round trip times in milli-seconds:
        Minimum = 56ms, Maximum = 57ms, Average = 56ms
    

    ssh into the openvz container.

    % ssh [email protected]
    The authenticity of host '96.127.135.59 (96.127.135.59)' can't be established.
    RSA key fingerprint is e0:15:a7:b8:28:cc:d3:47:5d:c5:a9:2c:1e:d7:d4:cf.
    Are you sure you want to continue connecting (yes/no)? yes
    Warning: Permanently added '96.127.135.59' (RSA) to the list of known hosts.
    [email protected]'s password:
    [root@openvz1 ~]#
    

    pinging from within the openvz container to yahoo.com

    [root@openvz1 ~]# ping yahoo.com PING yahoo.com (98.139.183.24) 56(84) bytes of data. 64 bytes from ir2.fp.vip.bf1.yahoo.com (98.139.183.24): icmp_seq=1 ttl=50 time=25.6 ms 64 bytes from ir2.fp.vip.bf1.yahoo.com (98.139.183.24): icmp_seq=2 ttl=50 time=25.7 ms 64 bytes from ir2.fp.vip.bf1.yahoo.com (98.139.183.24): icmp_seq=3 ttl=50 time=35.0 ms 64 bytes from ir2.fp.vip.bf1.yahoo.com (98.139.183.24): icmp_seq=4 ttl=50 time=25.5 ms ^C --- yahoo.com ping statistics --- 4 packets transmitted, 4 received, 0% packet loss, time 3004ms rtt min/avg/max/mdev = 25.517/27.988/35.008/4.057 ms [root@openvz1 ~]#

    I am writing to respond to your conclusion in which you stated that the reason for not being able to setup openvz container networking properly on the KVM VPS you purchased from us was due to iptables misconfiguration on our part. As previously indicated to you via support ticket, as well as seen from above, that it was not related to iptables configuration, at all. Perhaps you needed some more tweaking on the network settings of your KVM node.

    Best regards.

    @niceboy said:
    Here is an update..

    I tried many times re installing my lunanode vps and different type of tutors on net. Everytime I got the same problem. Tried disabling iptables on both kvm vps and inside openvz vps, still the same issue..

    Tried contacting the lunanode on probable iptables issue on host node.. and, they basically said they can't do anything on node and every thing is fine as far as node iptables are concerned..

    Finally, I signed upto another kvm vps from HardCloud and tried the same steps.. Now.. BOOM! It worked..!

    I concluded that it was the fault with the iptables on lunanode vps node and not any of my steps.

    I'm about to cancell my lunanode vps now..

    Hope this helps anyone considering lunanode for openvz experimentation.

    And.. Thank you all the community friends who actively suggested and helped me to move in the right direction.

    Thanked by 1niceboy
  • @hbjlee17 said:
    [...] make sure that ifcfg-eth0-range0 was deleted [...]

    This could have been the issue. Made the same mistake first time installing OpenVZ. I hit 'reconfigure networking' in SolusVM, which assigned all IPs to the KVM VPS, thus accessing secondary IP was pointed to the KVM instead of the container.

  • hbjlee17hbjlee17 Member, Host Rep

    Ya, it was not me that responded to niceboy's ticket with regards to the network issue that he was having trying to setup his openvz container, but I believe perennate (who responded to niceboy's ticket ) probably would of assumed just the same, namely not to assign the IP address to both the openvz node, and the container and cause IP conflict.

  • perennateperennate Member, Host Rep
    edited October 2013

    @niceboy said:
    I concluded that it was the fault with the iptables on lunanode vps node and not any of my steps.

    I'm about to cancell my lunanode vps now..

    Hope this helps anyone considering lunanode for openvz experimentation.

    We provide unmanaged VPS hosting. As I said in ticket, if your VPS has networking but an OpenVZ container inside your VPS does not (but it boots properly), then the issue is within your VPS (which it turned out to be). You're lucky that @hbjlee17 decided to spend time to fix your OpenVZ setup despite the unmanaged hosting.

  • @niceboy said:
    Here is an update..

    I tried many times re installing my lunanode vps and different type of tutors on net. Everytime I got the same problem. Tried disabling iptables on both kvm vps and inside openvz vps, still the same issue..

    Tried contacting the lunanode on probable iptables issue on host node.. and, they basically said they can't do anything on node and every thing is fine as far as node iptables are concerned..

    Finally, I signed upto another kvm vps from HardCloud and tried the same steps.. Now.. BOOM! It worked..!

    I concluded that it was the fault with the iptables on lunanode vps node and not any of my steps.

    I'm about to cancell my lunanode vps now..

    Hope this helps anyone considering lunanode for openvz experimentation.

    And.. Thank you all the community friends who actively suggested and helped me to move in the right direction.

    Seems that LunaNode has fixed your problem.

  • An update.

    Yes. There is no issue now with my openvz install after deleting ifcfg-eth0-range0 and restarting the network.

    But, what I could not understand is, I never did this deletion step( and never mentioned in any of the tutors on the net) on my hardcloud kvm vps. It just worked out of the box.

    Any way, It is a nice learning experience and I have no further issue now with lunanode vps.

  • hbjlee17hbjlee17 Member, Host Rep

    The probable reason that you were not required to delete ifcfg-eth0-range0 from other provider may be that the extra IPs are not already enabled on the vps itself. Meaning that the are assigned to you but not being used.

    The provisioning of our virtual machines in the budget product line will enable the 5 assigned IP addresses right after it provisions the node. so if you tried to assign the already used IP on the vps node to a openvz container, it will cause IP conflict and will not work.

    Glad that you are able to get everything working.

    Thanked by 1niceboy
Sign In or Register to comment.