# Ngnix fails to start on VM with IPv6 disabled

**URL:** <https://meta.discourse.org/t/ngnix-fails-to-start-on-vm-with-ipv6-disabled/112918>\
**Category:** Self-hosting\
**Tags:** unsupported-install\
**Created:** [March 29, 2019, 12:53pm UTC](https://meta.discourse.org/t/ngnix-fails-to-start-on-vm-with-ipv6-disabled/112918 "2019-03-29T12:53:59Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![chrisc](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/chrisc/32/119982_2.png) [@chrisc](https://meta.discourse.org/u/chrisc)\
**Post date:** [March 29, 2019, 1:09pm UTC](https://meta.discourse.org/t/ngnix-fails-to-start-on-vm-with-ipv6-disabled/112918/5 "2019-03-29T13:09:09Z")

</div>

The rebuild seems to go OK but then the container keep restarting and I can’t get a shell on the container because of this — I want to see if `/run` exists — the error logs above appear to be saying that this directory doesn’t exist…

After a rebuild with all the plugins disabled it looks OK to start with:

```bash
docker ps 
  CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
  5185f5987314 local_discourse/app "/sbin/boot" 11 seconds ago Up Less than a second 0.0.0.0:80->80/tcp, 0.0.0.0:443->443/tcp app

```

But then get’s stuck in a loop that looks like this:

```bash

docker ps 
  CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
  5185f5987314 local_discourse/app "/sbin/boot" About a minute ago Restarting (100) 39 seconds ago app

```

I’m tried another rebuild with this to the end of `containers/app.yml`:

```yml
## Any custom commands to run after building
run:
  - exec: echo "Beginning of custom commands"
  - exec: ls -lah /run
  - exec: df -h
  - exec: file /run/nginx.pid

```

The results of this were:

```plaintext
I, [2019-03-29T13:29:39.736562 #14] INFO -- : total 36K
drwxr-xr-x 1 root root 4.0K Mar 29 13:23 .
drwxr-xr-x 1 root root 4.0K Mar 29 13:23 ..
lrwxrwxrwx 1 root root 25 Feb 22 10:06 initctl -> /run/systemd/initctl/fifo
-rw-r--r-- 1 root root 0 Mar 21 00:43 init.upgraded
drwxrwxrwt 3 root root 4.0K Feb 22 10:06 lock
drwxr-xr-x 2 root root 4.0K Feb 22 10:06 log
drwxr-xr-x 2 root root 4.0K Feb 22 10:05 mount
lrwxrwxrwx 1 postgres postgres 20 Mar 29 13:23 postgresql -> /shared/postgres_run
drwxr-xr-x 2 root root 4.0K Feb 22 10:06 sendsigs.omit.d
lrwxrwxrwx 1 root root 8 Feb 22 10:06 shm -> /dev/shm
drwx--x--x 3 root root 4.0K Mar 21 00:42 sudo
drwxr-xr-x 1 root root 4.0K Mar 21 00:42 systemd
drwxr-xr-x 2 root root 4.0K Feb 22 10:06 user
-rw-rw-r-- 1 root utmp 0 Feb 22 10:05 utmp

I, [2019-03-29T13:29:39.737355 #14] INFO -- : > df -h
I, [2019-03-29T13:29:39.742286 #14] INFO -- : Filesystem Size Used Avail Use% Mounted on
overlay 64G 45G 16G 74% /
tmpfs 64M 0 64M 0% /dev
tmpfs 1.5G 0 1.5G 0% /sys/fs/cgroup
/dev/vda2 64G 45G 16G 74% /shared
shm 512M 8.0K 512M 1% /dev/shm
tmpfs 1.5G 0 1.5G 0% /proc/acpi
tmpfs 1.5G 0 1.5G 0% /sys/firmware

I, [2019-03-29T13:29:39.743254 #14] INFO -- : > file /run/nginx.pid
I, [2019-03-29T13:29:39.755033 #14] INFO -- : /run/nginx.pid: cannot open `/run/nginx.pid' (No such file or directory)

```

So the issue does appear to be that `/run/nginx.pid` doesn’t exist and I expect that cause of this is a problem with the Nginx config? So perhaps I’ll check that now…

---

_[View the full topic](https://meta.discourse.org/t/ngnix-fails-to-start-on-vm-with-ipv6-disabled/112918)._
