Couldn't resolve host 'bucket.s3.amazonaws.com' on virtual machine - dns

Serving static pdfs from S3. Have a production environment on AWS and a development environment on my local Vagrant Virtual Machine. Everything was working fine until today.
When I try to access S3 files from my Vagrant development environment, I get
Couldn't resolve host 'bucket.s3.amazonaws.com'
I can still access the files as normal in my AWS production environment. The code to access is the exact same.
Other notes that may or may not be relevant
The VM was reset this morning. It has not worked since.
I've tried to flush the DNS -> ipconfig /flushdns
I've cleared the browser cache
Thanks for any help.

What do you mean by "the VM was reset" ? I've run into problems when I forget to put the VM into suspend and then change networks on the host machine. I won't be able to resolve anything after that. To fix I just did a vagrant suspend && vagrant up to have it refresh its network.

I faced a similar issue when tried to fetch S3 files using vagrant on openstack, solved it by configuring DNS on my openstack subnet.
(meaning the DNS issue wasn't related to the vagrant vm configuration, it was related to the openstack configuration, you can verify it by running: cat /etc/resolv.conf from your vagrant vm)

Related

When I use visual studio remote linux to connect to connect to a linux virtual machine, the connection is instability

I use visual studio remote linux to connect to connect to a linux virtual machine(On VMware).
I can always ping virtual machine's host name succesfule.But when I try to test this connection ,somtime it success,sometime it fail.
Got to your remote machine
ps -fux
type above command you will see list of processes
kill the one's running .vscode-se***
and try connecting again it will work
I have solved this problem,but I don't know why.
At the time I find this problem, I connect to virtual machine by it's hostname (getted by linux command hostname).just like this image.
But when I change to connect to virtual machine by it's ip address,this problem is solved.

DNS problem when creating VM from deprovisioned Linux VM image in DevTest Lab

I tried many times. It looks like a bug in Azure DevTest Labs.
Here is the steps to reproduce the problem:
Create a VM from Ubuntu Linux 18.04 LTS
Create custom image from this VM with Run deprovision on virtual machine..
Create a new VM from this new image.
SSH to this VM.
Run host www.google.com will fail.
Are these steps wrong?
There is no step wrong which you have done. But the reason that you fail running host www.google.com is the second step. The deprovision will do some things when you execute the command waagent -deprovision+user:
When you create a VM from the deprovision custom image, there is no resolv.conf file in it. So you fail in running host www.google.com. The solution is that create a resolv.conf file in the directory /etc/.
The content of file resolv.conf will be different for the VM in the different locations. For example, the file resolv.conf will be like this if your VM in the location Japan East:
nameserver 127.0.0.53
search bbuuanmggeiengfg01a443drie.lx.internal.cloudapp.net

Intershop server in docker

I'm trying to setup a local development environment on a linux machine. The ideal setup would be using a docker container spinning up the server with a shared directory to push code changes.
The question is if this is an accepted approach to use? Any tips appreciated.
There is
a public guide how to setup an environment on ICM 7.9 , https://support.intershop.com/kb/index.php/Display/28K663, and
a sample linux VM on ICM 7.5.5. provided in case you have got a support login - https://support.intershop.com/static/Customer-Support-offers-a-Linux-VM-as-an-example--development-environment-for-Intershop-7.5.html
but both of them are not related to a docker container, however it may help you with settung up a development environment in there.

Issue on stoping and starting aws Ec2 wordpress(centos 6.9) vm

I have configured wordpress in a lamp setup in centos 6.9 server.
It's an aws ec2 instance. When i stop the vm and start it again database connectivity of wordpress is lost.How do i resolve this?
I tested by rebooting from inside vm. At that time everything is working fine. But not when i stop and start from aws dashbord.. any solution?
I think the issue might be with your mysql service , after rebooting if you have not specified that it should run at start of server it would not run.
Also Make sure you have connection string as localhost and Elastic (Static) IP assigned to it.
If that is the case you can resolve it by adding the service to run every time instance start by this command:
sudo chkconfig mysqld on

cygwin/sshd and Virtualbox

I'm using vagrant/VirtualBox on my Window (8.1) Laptop to start up a linux-test-vm from a Cygwin terminal... vagrant up, vagrant ssh, everything is working fine.
Now I want to work on that environment remotely from my main Linux-Workstation, so I've set up sshd in Cygwin and I can successfully ssh into my Windows-Box (same user as logged in locally in windows).
But when I cd'ed (via my remote ssh connection to windows-laptop) in my working directory and ran vagrant ssh, it tells me:
VM must be created before running this command. Run 'vagrant up' first
But I see the VM is running in VirtualBox GUI on Windows.
From this point on even locally on the Windows machine I can no longer interact with the running vagrant vm and the .vagrant (sub)directory has not files inside.
Same happens vice versa:
I stopped/deleted the VM in VirtualBox GUI
ran vagrant up via my ssh connection ... worked
ran vagrant ssh via my ssh connection ... works
but I do not see the VM in VirtualBox GUI on Windows
trying vagrant ssh locally on Windows ... same error again and .vagrant directory gets cleared
So I assume the Cygwin/sshd connection creates some sort of different Sessions that do not share the same "instance" of VirtualBox.
Is there any chance to share VirtualBox/vagrant environment between the local Windows and remote ssh session ???
WORKAROUND:
export ssh-config on the windows host: vagrant ssh-config > ssh_config
from the cygwin/ssh jump into the VM: ssh -F ssh_config default
never run any vagrant command from the cygwin/ssh connection
Vagrant has a built-in solution since the 1.7.x versions called vagrant share which also allows you to remote into a box directly (bypassing the Windows host abstraction). It is generally used for the HTTP feature (eg. to show clients or others on a project the current state of work) but there is the ability to connect to any service running on any port. From the docs:
Just call vagrant share. This will automatically share as many ports
as possible for remote connections. If the Vagrant environment has a
static IP or DNS address, then every port will be available.
Otherwise, Vagrant will only expose forwarded ports on the machine.
Note the share name at the end of calling vagrant share, and give this
to the person who wants to connect to your machine. They simply have
to call vagrant connect NAME. This will give them a static IP they can
use to access your Vagrant environment.
Note to use vagrant share you need a (free) account with hashicorp.

Resources