Link to home
Start Free TrialLog in
Avatar of Masato Maeyama
Masato MaeyamaFlag for Japan

asked on

WordPress site does not run on Bitnami WordPress

Hi,

I am in trouble running a WordPress site on Bitnami WordPress on ec2 instance.

It seems that apache is running, but no http response from the server.
Port 80 is not listened by any service.

bitnami@ip-:~$ lsof -i # no output
bitnami@ip-:~$ 

Open in new window


Apache seems to be runnning.
bitnami@ip-172-31-33-101:~$ ps aux | grep apache
root      1910  0.0  2.9 203384 30288 ?        Ss   07:35   0:00 /opt/bitnami/apache2/bin/httpd.bin -f /opt/bitnami/apache2/conf/httpd.conf
daemon    1915  0.0  1.5 812444 15968 ?        Sl   07:35   0:00 /opt/bitnami/apache2/bin/httpd.bin -f /opt/bitnami/apache2/conf/httpd.conf
daemon    1916  0.0  1.5 812444 15892 ?        Sl   07:35   0:00 /opt/bitnami/apache2/bin/httpd.bin -f /opt/bitnami/apache2/conf/httpd.conf
bitnami   2996  0.0  0.1  14224  1084 pts/1    S+   07:37   0:00 grep --color=auto apache

Open in new window


I restarted apache, mysql, php as follows.
bitnami@ip-172-31-33-101:~$ sudo /opt/bitnami/ctlscript.sh start
/opt/bitnami/mysql/scripts/ctl.sh : mysql  started at port 3306
/opt/bitnami/php/scripts/ctl.sh : php-fpm started
Syntax OK
/opt/bitnami/apache2/scripts/ctl.sh : httpd started at port 80

Open in new window


But no response.

bitnami@ip-172-31-33-101:~$ curl localhost:80

Open in new window


Any advise would be very appreciated.

Thanks!
Avatar of David Favor
David Favor
Flag of United States of America image

Provide output from following commands...

ifconfig

netstat -pluten

ps auxwww

Open in new window

Avatar of Masato Maeyama

ASKER

Hello David,

Please find below outputs.

Output of `ifconfig`:

$ ifconfig
eth0      Link encap:Ethernet  HWaddr 06:74:4b:50:b7:4e
          inet addr:172.31.33.101  Bcast:172.31.47.255  Mask:255.255.240.0
          inet6 addr: fe80::474:4bff:fe50:b74e/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:9001  Metric:1
          RX packets:43805 errors:0 dropped:0 overruns:0 frame:0
          TX packets:31525 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:20419731 (20.4 MB)  TX bytes:16798140 (16.7 MB)

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:1606 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1606 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1
          RX bytes:872339 (872.3 KB)  TX bytes:872339 (872.3 KB)

Open in new window


Output of `netstat -pluten`:
$ netstat -pluten
(Not all processes could be identified, non-owned process info
 will not be shown, you would have to be root to see it all.)
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       User       Inode       PID/Program name
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      0          16784       -
tcp        0      0 127.0.0.1:3306          0.0.0.0:*               LISTEN      1001       26799       -
tcp6       0      0 :::22                   :::*                    LISTEN      0          16793       -
tcp6       0      0 :::443                  :::*                    LISTEN      0          26867       -
tcp6       0      0 :::33060                :::*                    LISTEN      1001       26802       -
tcp6       0      0 :::80                   :::*                    LISTEN      0          26857       -
udp        0      0 0.0.0.0:68              0.0.0.0:*                           0          13600       -

Open in new window


Output of `ps auxwww`:
$ ps auxwww
USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
root         1  0.0  0.4 185148  4740 ?        Ss   Apr17   0:04 /lib/systemd/systemd --system --deserialize 25
root         2  0.0  0.0      0     0 ?        S    Apr17   0:00 [kthreadd]
root         3  0.0  0.0      0     0 ?        S    Apr17   0:00 [ksoftirqd/0]
root         5  0.0  0.0      0     0 ?        S<   Apr17   0:00 [kworker/0:0H]
root         6  0.0  0.0      0     0 ?        S    Apr17   0:00 [kworker/u30:0]
root         7  0.0  0.0      0     0 ?        S    Apr17   0:00 [rcu_sched]
root         8  0.0  0.0      0     0 ?        S    Apr17   0:00 [rcu_bh]
root         9  0.0  0.0      0     0 ?        S    Apr17   0:00 [migration/0]
root        10  0.0  0.0      0     0 ?        S    Apr17   0:00 [watchdog/0]
root        11  0.0  0.0      0     0 ?        S    Apr17   0:00 [kdevtmpfs]
root        12  0.0  0.0      0     0 ?        S<   Apr17   0:00 [netns]
root        13  0.0  0.0      0     0 ?        S<   Apr17   0:00 [perf]
root        14  0.0  0.0      0     0 ?        S    Apr17   0:00 [xenwatch]
root        15  0.0  0.0      0     0 ?        S    Apr17   0:00 [xenbus]
root        17  0.0  0.0      0     0 ?        S    Apr17   0:00 [khungtaskd]
root        18  0.0  0.0      0     0 ?        S<   Apr17   0:00 [writeback]
root        19  0.0  0.0      0     0 ?        SN   Apr17   0:00 [ksmd]
root        20  0.0  0.0      0     0 ?        SN   Apr17   0:00 [khugepaged]
root        21  0.0  0.0      0     0 ?        S<   Apr17   0:00 [crypto]
root        22  0.0  0.0      0     0 ?        S<   Apr17   0:00 [kintegrityd]
root        23  0.0  0.0      0     0 ?        S<   Apr17   0:00 [bioset]
root        24  0.0  0.0      0     0 ?        S<   Apr17   0:00 [kblockd]
root        25  0.0  0.0      0     0 ?        S<   Apr17   0:00 [ata_sff]
root        26  0.0  0.0      0     0 ?        S<   Apr17   0:00 [md]
root        27  0.0  0.0      0     0 ?        S<   Apr17   0:00 [devfreq_wq]
root        28  0.0  0.0      0     0 ?        S    Apr17   0:00 [kworker/u30:1]
root        30  0.0  0.0      0     0 ?        S    Apr17   0:00 [kswapd0]
root        31  0.0  0.0      0     0 ?        S<   Apr17   0:00 [vmstat]
root        32  0.0  0.0      0     0 ?        S    Apr17   0:00 [fsnotify_mark]
root        33  0.0  0.0      0     0 ?        S    Apr17   0:00 [ecryptfs-kthrea]
root        49  0.0  0.0      0     0 ?        S<   Apr17   0:00 [kthrotld]
root        50  0.0  0.0      0     0 ?        S<   Apr17   0:00 [bioset]
root        51  0.0  0.0      0     0 ?        S<   Apr17   0:00 [bioset]
root        52  0.0  0.0      0     0 ?        S<   Apr17   0:00 [bioset]
root        53  0.0  0.0      0     0 ?        S<   Apr17   0:00 [bioset]
root        54  0.0  0.0      0     0 ?        S<   Apr17   0:00 [bioset]
root        55  0.0  0.0      0     0 ?        S<   Apr17   0:00 [bioset]
root        56  0.0  0.0      0     0 ?        S<   Apr17   0:00 [bioset]
root        57  0.0  0.0      0     0 ?        S<   Apr17   0:00 [bioset]
root        58  0.0  0.0      0     0 ?        S<   Apr17   0:00 [bioset]
root        59  0.0  0.0      0     0 ?        S<   Apr17   0:00 [bioset]
root        60  0.0  0.0      0     0 ?        S<   Apr17   0:00 [bioset]
root        61  0.0  0.0      0     0 ?        S<   Apr17   0:00 [bioset]
root        62  0.0  0.0      0     0 ?        S<   Apr17   0:00 [bioset]
root        63  0.0  0.0      0     0 ?        S<   Apr17   0:00 [bioset]
root        64  0.0  0.0      0     0 ?        S<   Apr17   0:00 [bioset]
root        65  0.0  0.0      0     0 ?        S<   Apr17   0:00 [bioset]
root        66  0.0  0.0      0     0 ?        S<   Apr17   0:00 [bioset]
root        67  0.0  0.0      0     0 ?        S<   Apr17   0:00 [bioset]
root        68  0.0  0.0      0     0 ?        S<   Apr17   0:00 [bioset]
root        69  0.0  0.0      0     0 ?        S<   Apr17   0:00 [bioset]
root        70  0.0  0.0      0     0 ?        S<   Apr17   0:00 [bioset]
root        71  0.0  0.0      0     0 ?        S<   Apr17   0:00 [bioset]
root        72  0.0  0.0      0     0 ?        S<   Apr17   0:00 [bioset]
root        73  0.0  0.0      0     0 ?        S<   Apr17   0:00 [bioset]
root        74  0.0  0.0      0     0 ?        S    Apr17   0:00 [scsi_eh_0]
root        75  0.0  0.0      0     0 ?        S<   Apr17   0:00 [scsi_tmf_0]
root        76  0.0  0.0      0     0 ?        S    Apr17   0:00 [scsi_eh_1]
root        77  0.0  0.0      0     0 ?        S<   Apr17   0:00 [scsi_tmf_1]
root        79  0.0  0.0      0     0 ?        S<   Apr17   0:00 [bioset]
root        83  0.0  0.0      0     0 ?        S<   Apr17   0:00 [ipv6_addrconf]
root        96  0.0  0.0      0     0 ?        S<   Apr17   0:00 [bioset]
root        97  0.0  0.0      0     0 ?        S<   Apr17   0:00 [deferwq]
root       255  0.0  0.0      0     0 ?        S<   Apr17   0:00 [raid5wq]
root       285  0.0  0.0      0     0 ?        S<   Apr17   0:00 [bioset]
root       309  0.0  0.0      0     0 ?        S    Apr17   0:00 [jbd2/xvdf1-8]
root       310  0.0  0.0      0     0 ?        S<   Apr17   0:00 [ext4-rsv-conver]
root       373  0.0  0.0      0     0 ?        S<   Apr17   0:00 [kworker/0:1H]
root       393  0.0  0.0      0     0 ?        S    Apr17   0:01 [kworker/0:9]
root       414  0.0  0.0      0     0 ?        S    Apr17   0:00 [kauditd]
root       417  0.0  0.0      0     0 ?        S<   Apr17   0:00 [iscsi_eh]
root       441  0.0  0.0      0     0 ?        S<   Apr17   0:00 [ib_addr]
root       444  0.0  0.1  12204  1664 ?        Ss   Apr17   0:05 /usr/sbin/haveged --Foreground --verbose=1 -w 1024
root       447  0.0  0.3  28352  3216 ?        Ss   Apr17   0:00 /lib/systemd/systemd-journald
root       454  0.0  0.0      0     0 ?        S<   Apr17   0:00 [ib_mcast]
root       455  0.0  0.0      0     0 ?        S<   Apr17   0:00 [ib_nl_sa_wq]
root       456  0.0  0.0      0     0 ?        S<   Apr17   0:00 [ib_cm]
root       457  0.0  0.0      0     0 ?        S<   Apr17   0:00 [iw_cm_wq]
root       458  0.0  0.0      0     0 ?        S<   Apr17   0:00 [rdma_cm]
root       468  0.0  0.1 102968  1216 ?        Ss   Apr17   0:00 /sbin/lvmetad -f
root       492  0.0  0.0      0     0 ?        S<   Apr17   0:00 [loop0]
root       495  0.0  0.0      0     0 ?        S<   Apr17   0:00 [loop1]
root       500  0.0  0.0      0     0 ?        S<   Apr17   0:00 [loop2]
root       526  0.0  0.0      0     0 ?        S<   Apr17   0:00 [loop3]
root       531  0.0  0.0      0     0 ?        S<   Apr17   0:00 [loop4]
root      1048  0.0  0.2  16124  2656 ?        Ss   Apr17   0:00 /sbin/dhclient -1 -v -pf /run/dhclient.eth0.pid -lf /var/lib/dhcp/dhclient.eth0.leases -I -df /var/lib/dhcp/dhclient6.eth0.leases eth0
syslog    1184  0.0  0.2 256392  2752 ?        Ssl  Apr17   0:00 /usr/sbin/rsyslogd -n
root      1185  0.0  0.3 275848  3380 ?        Ssl  Apr17   0:02 /usr/lib/accountsservice/accounts-daemon
message+  1189  0.0  0.3  43016  3376 ?        Ss   Apr17   0:00 /usr/bin/dbus-daemon --system --address=systemd: --nofork --nopidfile --systemd-activation
root      1196  0.0  0.0   5220   116 ?        Ss   Apr17   0:03 /sbin/iscsid
root      1197  0.0  0.3   5720  3516 ?        S<Ls Apr17   0:14 /sbin/iscsid
daemon    1210  0.0  0.1  26044  2004 ?        Ss   Apr17   0:00 /usr/sbin/atd -f
root      1213  0.0  1.4 300904 14736 ?        Ssl  Apr17   0:04 /usr/lib/snapd/snapd
root      1216  0.0  0.5 281464  6072 ?        Ssl  Apr17   0:00 /snap/amazon-ssm-agent/1068/amazon-ssm-agent
root      1232  0.0  0.2  28544  2940 ?        Ss   Apr17   0:00 /lib/systemd/systemd-logind
root      1245  0.0  0.1   4396  1264 ?        Ss   Apr17   0:00 /usr/sbin/acpid
root      1257  0.0  0.2  29008  2464 ?        Ss   Apr17   0:00 /usr/sbin/cron -f
root      1259  0.0  0.3 636200  4004 ?        Ssl  Apr17   0:00 /usr/bin/lxcfs /var/lib/lxcfs/
root      1318  0.0  0.0  13372   144 ?        Ss   Apr17   0:00 /sbin/mdadm --monitor --pid-file /run/mdadm/monitor.pid --daemonise --scan --syslog
root      1403  0.0  0.3  65512  3548 ?        Ss   Apr17   0:00 /usr/sbin/sshd -D
root      2124  0.0  0.2  14388  2756 ?        Ssl  Apr17   0:01 /usr/bin/gonit
bitnami   2529  0.0  0.2  45148  2256 ?        Ss   Apr17   0:00 /lib/systemd/systemd --user
bitnami   2531  0.0  0.1  63228  1308 ?        S    Apr17   0:00 (sd-pam)
systemd+  4252  0.0  0.2 100324  2432 ?        Ssl  Apr17   0:00 /lib/systemd/systemd-timesyncd
root      5542  0.0  0.2  42276  2972 ?        Ss   Apr17   0:00 /lib/systemd/systemd-udevd
root      5660  0.0  0.4 277088  4556 ?        Ssl  Apr17   0:00 /usr/lib/policykit-1/polkitd --no-debug
root      9470  0.0  0.1   4504  1608 ?        S    Apr17   0:00 /bin/sh /opt/bitnami/mysql/bin/mysqld_safe --defaults-file=/opt/bitnami/mysql/my.cnf --mysqld=mysqld.bin --socket=/opt/bitnami/mysql/tmp/mysql.sock --datadir=/opt/bitnami/mysql/data --log-error=/opt/bitnami/mysql/data/mysqld.log --pid-file=/opt/bitnami/mysql/data/mysqld.pid --lower-case-table-names=1
mysql     9777  0.2 31.5 1226220 320284 ?      Sl   Apr17   7:13 /opt/bitnami/mysql/bin/mysqld.bin --defaults-file=/opt/bitnami/mysql/my.cnf --basedir=/opt/bitnami/mysql --datadir=/opt/bitnami/mysql/data --plugin-dir=/opt/bitnami/mysql/lib/plugin --user=mysql --lower-case-table-names=1 --log-error=/opt/bitnami/mysql/data/mysqld.log --pid-file=/opt/bitnami/mysql/data/mysqld.pid --socket=/opt/bitnami/mysql/tmp/mysql.sock --port=3306
root      9833  0.0  0.8 269252  8480 ?        Ss   Apr17   0:03 php-fpm: master process (/opt/bitnami/php/etc/php-fpm.conf)
daemon    9835  0.0  6.9 294560 70812 ?        S    Apr17   0:28 php-fpm: pool wordpress
root      9840  0.0  2.6 203384 27016 ?        Ss   Apr17   0:04 /opt/bitnami/apache2/bin/httpd.bin -f /opt/bitnami/apache2/conf/httpd.conf
daemon    9848  0.0  1.7 1312492 17884 ?       Sl   Apr17   0:01 /opt/bitnami/apache2/bin/httpd.bin -f /opt/bitnami/apache2/conf/httpd.conf
daemon    9849  0.0  1.8 1312708 18816 ?       Sl   Apr17   0:01 /opt/bitnami/apache2/bin/httpd.bin -f /opt/bitnami/apache2/conf/httpd.conf
daemon    9984  0.0  7.0 296080 71572 ?        S    Apr17   0:27 php-fpm: pool wordpress
daemon    9985  0.0  2.3 1312880 23868 ?       Sl   Apr17   0:04 /opt/bitnami/apache2/bin/httpd.bin -f /opt/bitnami/apache2/conf/httpd.conf
root     16919  0.0  0.0      0     0 ?        S    Apr18   0:00 [kworker/0:1]
root     17737  0.0  0.6  92796  6896 ?        Ss   01:15   0:00 sshd: bitnami [priv]
bitnami  17747  0.0  0.3  92796  3320 ?        S    01:15   0:00 sshd: bitnami@pts/0
bitnami  17748  0.0  0.5  22900  5528 pts/0    Ss   01:15   0:00 -bash
bitnami  17789  0.0  0.3  37364  3324 pts/0    R+   01:19   0:00 ps auxwww

Open in new window

Couple of problems jump out.

1) Your ifconfig shows a private network IP address 172.31.33.101, so once you get Apache listening, you'll only be able to access Apache on the local machine. There can never be any public access of the IP address you're using, as this address falls in one of the non-routable address ranges.

2) Your ps show Apache + FPM PHP running.

3) Your netstat shows no process names along with the non-owned process message, suggests you're running inside some container system.

4) Your ps suggests you're running these commands at the machine level, rather than inside a container.

Conclusion: Something about your entire setup is very odd.

Mention if you're running a container system, like LXC or LXD or other.

Provide output of...

ls /etc/*release*

cat /etc/*release*

uname -a

Open in new window


Also mention how exactly you installed your OS on this instance, specifically which AMI (standard, custom built) you used.
After thinking about this... maybe your system is actually working, as you have it configured.

Also provide the output of the following command, while you're ssh'ed into machine.

curl -I -L 172.31.33.101

Open in new window


If you get back any headers, then Apache really is working + you'll have to somehow connect your 172.31.33.101 to a public IP, however Amazon has you do this... based on your account/setup with them.
Thank you for your comment.

First, this app is Bitnami Wordpress.
See: https://docs.bitnami.com/aws/apps/wordpress/


Outputs are as follows:

This output is shown after ssh login.
Welcome to Ubuntu 16.04.5 LTS (GNU/Linux 4.4.0-1079-aws x86_64)
       ___ _ _                   _
      | _ |_) |_ _ _  __ _ _ __ (_)
      | _ \ |  _| ' \/ _` | '  \| |
      |___/_|\__|_|_|\__,_|_|_|_|_|

  *** Welcome to the Bitnami WordPress 5.0.2-1 ***
  *** Documentation:  https://docs.bitnami.com/aws/apps/wordpress/ ***
  ***                 https://docs.bitnami.com/aws/ ***
  *** Bitnami Forums: https://community.bitnami.com/ ***

Open in new window



bitnami@ip-172-31-33-101:~$ curl -I -L 172.31.33.101
HTTP/1.1 301 Moved Permanently
Date: Mon, 22 Apr 2019 00:08:23 GMT
Server: Apache
X-Powered-By: PHP/7.2.13
X-Frame-Options: SAMEORIGIN
Vary: Cookie
Location: http://54.178.243.12/
Content-Type: text/html; charset=UTF-8

Open in new window


bitnami@ip-172-31-33-101:~$ ls /etc/*release*
/etc/lsb-release  /etc/os-release

Open in new window


bitnami@ip-172-31-33-101:~$ cat /etc/*release*
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=16.04
DISTRIB_CODENAME=xenial
DISTRIB_DESCRIPTION="Ubuntu 16.04.5 LTS"
NAME="Ubuntu"
VERSION="16.04.5 LTS (Xenial Xerus)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 16.04.5 LTS"
VERSION_ID="16.04"
HOME_URL="http://www.ubuntu.com/"
SUPPORT_URL="http://help.ubuntu.com/"
BUG_REPORT_URL="http://bugs.launchpad.net/ubuntu/"
VERSION_CODENAME=xenial
UBUNTU_CODENAME=xenial

Open in new window


bitnami@ip-172-31-33-101:~$ uname -a
Linux ip-172-31-33-101 4.4.0-1079-aws #89-Ubuntu SMP Tue Mar 26 15:25:52 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux

Open in new window

1) This looks very odd. Likely this will break many things, unless 172.31.33.101 + 54.178.243.12 are configured on same machine (or container, if you're running inside a container). From you ipconfig, these IPs are different machines/containers, so anyone's guess how this will work.

I'd fix this first, as it will make debugging near impossible.

bitnami@ip-172-31-33-101:~$ curl -I -L 172.31.33.101
HTTP/1.1 301 Moved Permanently
Date: Mon, 22 Apr 2019 00:08:23 GMT
Server: Apache
X-Powered-By: PHP/7.2.13
X-Frame-Options: SAMEORIGIN
Vary: Cookie
Location: http://54.178.243.12/
Content-Type: text/html; charset=UTF-8

Open in new window


2) State whether you're running this on a bare machine or inside some container, like LXD or LXC (since Xenial is so old) or Docker.

3) Looks like you're running inside some container, as netstat -pluten shows no program names + the following message emits...

$ netstat -pluten
(Not all processes could be identified, non-owned process info
 will not be shown, you would have to be root to see it all.)
Active Internet connections (only servers)

Open in new window


4) What you should know. Xenial is a very poor choice for running containers. Doubtful this will every work well.

State with Bionic (18.0.3), then remove all packages containing lxd or lxc in dpkg -l output, then install LXD using snap.

This will give you a solid/working runtime environment for containers.

5) Also, skip using Bitnami, as this is just another layer of cruft (non essential code) you have to debug.

If you think you must use Bitnami, get your setup working without Bitnami first. You can always then install Bitnami + debug any problems.
This question needs an answer!
Become an EE member today
7 DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform.
View membership options
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.