Skip to main content

server works after restart for 10 seconds then nothing...

Comments

9 comments

  • oah
    Update-1, I was testing on php pages, so I made a sub-domain and installed "elinks, which is a terminal based browser" and placed a plain html page inside one of the websites and tried to open it with elinks and it is just showing "request sent". I checked apache and the service is up and running.... so any ideas on where to check ( i will keep posting as I do more tests) by the way this is the output when checking if apache is running: I find the line marked in red weird, any ideas on where to go next ?
    0
  • cPanelLauren
    Hello, Based on that screenshot all services are up and running. Do you have a firewall management software such as CSF installed? If not you might try temporarily flushing iptables and checking the sites once more. It's odd that you'd be able to reach cPanel/WHM in this instance but worth exploring. Do you have the sites on a different IP from cPanel/WHM?
    0
  • oah
    Hi @cPanelLauren You are right, AWS blocked the server from their firewall because of a page that seemed to be a "phishing" page on one of the domains. I clarified the issue with them, and they removed the block. Back to normal. @cPanelLauren U you can really help me in two things: 1- How can I start apache from command line and have it show in real time the requests as they come (if I knew how to do it then I would have easily figured out the requests were being blocked by AWS as nothing would have been delivered). 2- Can you guys please make a tutorial on how to change the Private IP address on AWS images that are restored from snapshots. Long story short: I have a snap-shot of the server from AWS but that snapshot has the private IP address from the old machine, when I boot that image into a new machine, AWS assigns a new IP address (private) and I get into a sea of troubles as the WHM is not working, I had to hire a free lancer twice to do that "IP thing". Note: I am not taking about the elastic IP in AWS as that one is easily transferable, I am talking about booting from an image which contains private IP address X while aws has assigned private IP Y to its LAN. By the way, the scenario that I am referring to results in: and I am not sure on where to start fixing it, shall I do it from 1- The NAT 2- change sites IP address 3- edit current IP address 4- DNS 5- do I have to rebuild apache with the new IP If you guys can clarify where the private IP address is "hard-coded' into the WHM in which sections that would be great. Thx :)
    0
  • cPanelLauren
    Hi @oah You can restart apache from the command line with the following: /scripts/restartsrv_httpd
    You can see the current requests and their status along with some other really useful information with the following: apachectl --status
    2- Can you guys please make a tutorial on how to change the Private IP address on AWS images that are restored from snapshots. Long story short: I have a snap-shot of the server from AWS but that snapshot has the private IP address from the old machine, when I boot that image into a new machine, AWS assigns a new IP address (private) and I get into a sea of troubles as the WHM is not working, I had to hire a free lancer twice to do that "IP thing". Note: I am not taking about the elastic IP in AWS as that one is easily transferable, I am talking about booting from an image which contains private IP address X while aws has assigned private IP Y to its LAN.

    I can definitely look into getting something like this up though I'm unsure how different the process would be than the instructions here: Launch an AWS AMI Instance - cPanel Knowledge Base - cPanel Documentation - were you able to ask the administrator that performed the work for the exact steps?
    0
  • oah
    Thx @cPanelLauren The commands are definitely what I need. As for the aforementioned tutorial that doesnot apply to my case for the following reason: The tutorial assumes you have a fresh image while in the scenario that I am mentioning you have the following: short-version: Assume you have a server which is working just fine with its WHM. the server is running behind a nat and it has a private IP address of 10.10.10.2, lets just assume you did restart the machine and the IT guy tells you ur new IP address is 10.10.10.3 while the WHM was installed when the private IP address was 10.10.10.2. what would you do in such case? Long-version: 1- A machine on AWS with WHM is running. 2- You take AWS-snap shot from that machine ==> great, but the snapshot has the private IP address of the current machine embedded into it. 3- When you create an Image from that snap-shot and LAUNCH that image into a machine, AWS will allocate a private IP address to the instance however, the WHM within the image is configured to the private IP address of the old machine. 4- As a result the WHM is accessible but none of the websites work. 5- Even after I re-assign the elastic IP from the old machine to the new one, I still have a private IP mis-match. 6- At this point I am lost as I look into my machine and see the old private IP address which was inhereted from the snap-shot all over the place, for starters I can see it in the NAT. 7- I have no clue on where to change it. 8- I can send you snap-shot pics for what is going on. 9- At this point if I don't hire a freelancer to fix the private IP address mismatch in my machine, the snap-shot image is worthless. 10- I was suggesting making a tutorial for that case. 11-THank you :)
    Hi @oah You can restart apache from the command line with the following: /scripts/restartsrv_httpd
    You can see the current requests and their status along with some other really useful information with the following: apachectl --status
    I can definitely look into getting something like this up though I'm unsure how different the process would be than the instructions here:
    0
  • oah
    Hi @cPanelLauren I checked the tutorial that you referred to " Launch an AWS AMI Instance - cPanel Knowledge Base - cPanel Documentation " but it doesn't cover my issue. The issue that arises with booting-up from an AWS snapshots is similar to the scenario below (if you answer the one below then you will solve the problem): Assume you have a server which is working just fine with its WHM. the server is running behind a nat and it has a private IP address of 10.10.10.2, lets just assume you did restart the machine and the IT guy tells you ur new IP address is 10.10.10.3 while the WHM was installed when the private IP address was 10.10.10.2. what would you do in such case? thx
    0
  • cPanelLauren
    Hi @oah Thanks! I will look into getting a tutorial for this, right now we don't have anything for your situation specifically and unfortunately, I'm not familiar enough with the intricacies of AWS to provide advice on this. I'll look into it further and update you with my findings as soon as I can. Thanks!
    0
  • oah
    Hi @oah Thanks! I will look into getting a tutorial for this, right now we don't have anything for your situation specifically and unfortunately, I'm not familiar enough with the intricacies of AWS to provide advice on this. I'll look into it further and update you with my findings as soon as I can. Thanks!

    Hi @cPanelLauren I am pretty familiar with AWS and I can approximate the scenario to the case in the image below (regardless of AWS, assume it is just a dedicated server). Assume I have a dedicated server running Centos along WHM. The server is running behind a NAT with a private IP address of 10.10.10.5, and lets just assume you did restart the machine and the IT guy tells you ur new IP address is 10.10.10.6 while the WHM was installed when the private IP address was 10.10.10.5. what should we/you do in such case? Note after restarting the server, it has the new private IP address which is 10.10.10.6 while the public IP attached to the NAT is still the same, so the WHM is accessible via TELNET as well as with the browser BUT NONE of the websites work as it shows the page below: If you provide such a tutorial, that will be awesome :) thx again.
    0
  • oah
    Hi @cPanelLauren Any news about the tutorial ? Thx :)
    0

Please sign in to leave a comment.