Fresh install throwing nginx 502 gateway error using server name

671 views
Skip to first unread message

Mike Boulter

unread,
Jan 22, 2024, 12:35:42 PM1/22/24
to BigBlueButton-Setup
The server is live at markets.chat.  I have installed multiple times but always same result.  It's a VM so each install was completely fresh.

Trying to get this sorted, could someone give an assist?

Ubuntu 20.04 BBB focal-270

Installed with:
`wget -qO- https://raw.githubusercontent.com/bigbluebutton/bbb-install/v2.7.x-release/bbb-install.sh | bash -s -- -w -v focal-270 -s x.com -e x...@pro.dev`

Everything running:
```bbb-conf --status
nginx ————————————————————————► [✔ - active]
freeswitch ———————————————————► [✔ - active]
redis-server —————————————————► [✔ - active]
bbb-apps-akka ————————————————► [✔ - active]
bbb-fsesl-akka ———————————————► [✔ - active]
mongod ———————————————————————► [✔ - active]
bbb-html5 ————————————————————► [✔ - active]
bbb-html5-backend@1 ——————————► [✔ - active]
bbb-html5-backend@2 ——————————► [✔ - active]
bbb-html5-frontend@1 —————————► [✔ - active]
bbb-html5-frontend@2 —————————► [✔ - active]
bbb-webrtc-sfu ———————————————► [✔ - active]
bbb-webrtc-recorder ——————————► [✔ - active]
kurento-media-server —————————► [✔ - active]
etherpad —————————————————————► [✔ - active]
bbb-web ——————————————————————► [✔ - active]
bbb-pads —————————————————————► [✔ - active]
bbb-export-annotations ———————► [✔ - active]
bbb-rap-caption-inbox ————————► [✔ - active]
bbb-rap-resque-worker ————————► [✔ - active]
bbb-rap-starter ——————————————► [✔ - active]```

No errors:
```bbb-conf --check

BigBlueButton Server 2.7.3 (492)
                    Kernel version: 5.4.0-169-generic
                      Distribution: Ubuntu 20.04.6 LTS (64-bit)
                            Memory: 4012 MB
                         CPU cores: 8

/etc/bigbluebutton/bbb-web.properties (override for bbb-web)
/usr/share/bbb-web/WEB-INF/classes/bigbluebutton.properties (bbb-web)
       bigbluebutton.web.serverURL: https://markets.chat
                defaultGuestPolicy: ALWAYS_ACCEPT
              defaultMeetingLayout: CUSTOM_LAYOUT

/etc/nginx/sites-available/bigbluebutton (nginx)
                       server_name: markets.chat
                              port: 80, [::]:80127.0.0.1:82 http2 proxy_protocol, [::1]:82 http2127.0.0.1:81 proxy_protocol, [::1]:81

/opt/freeswitch/etc/freeswitch/vars.xml (FreeSWITCH)
                       local_ip_v4: 173.231.62.146
                   external_rtp_ip: 173.231.62.146
                   external_sip_ip: 173.231.62.146

/opt/freeswitch/etc/freeswitch/sip_profiles/external.xml (FreeSWITCH)
                        ext-rtp-ip: 173.231.62.146
                        ext-sip-ip: 173.231.62.146
                        ws-binding: 173.231.62.146:5066
                       wss-binding: 173.231.62.146:7443

UDP port ranges

                        FreeSWITCH: 16384-24576
                           kurento: 24577-32768
                    bbb-webrtc-sfu: 24577-32768
                    bbb-webrtc-recorder: 24577-32768

/usr/local/bigbluebutton/core/scripts/bigbluebutton.yml (record and playback)
                     playback_host: x.com
                 playback_protocol: https
                            ffmpeg: 4.2.7-0ubuntu0.1

/usr/share/bigbluebutton/nginx/sip.nginx (sip.nginx)
                        proxy_pass: 173.231.62.146
                          protocol: http

/usr/local/bigbluebutton/bbb-webrtc-sfu/config/default.yml (bbb-webrtc-sfu)
/etc/bigbluebutton/bbb-webrtc-sfu/production.yml (bbb-webrtc-sfu - override)
    mediasoup.webrtc.*.announcedIp: 173.231.62.146
  mediasoup.plainRtp.*.announcedIp: 173.231.62.146
                        kurento.ip: 173.231.62.146
                       kurento.url: ws://127.0.0.1:8888/kurento
                 freeswitch.sip_ip: 173.231.62.146
                  recordingAdapter: Kurento
               recordScreenSharing: true
                     recordWebcams: true
                  codec_video_main: VP8
               codec_video_content: VP8

/etc/bbb-webrtc-recorder/bbb-webrtc-recorder.yml (bbb-webrtc-recorder)
/etc/bigbluebutton/bbb-webrtc-recorder.yml (bbb-webrtc-recorder - override)
               debug: false
               recorder.directory: /var/lib/bbb-webrtc-recorder

/usr/share/meteor/bundle/programs/server/assets/app/config/settings.yml (HTML5 client)
/etc/bigbluebutton/bbb-html5.yml (HTML5 client config override)
                             build: 201
                        kurentoUrl: wss://markets.chat/bbb-webrtc-sfu
            defaultFullAudioBridge: fullaudio
           defaultListenOnlyBridge: fullaudio
                    sipjsHackViaWs: true


# Potential problems described below```

nginx 502 bad gateway. have rebooted.  have confirmed with netstat listening on 80 and 443.  

distancelearning.cloud

unread,
Jan 23, 2024, 6:06:49 AM1/23/24
to BigBlueButton-Setup
Mike,  i cant do


and cant telnet to port 80?

Also you only have 4GB ram in server,  the recommended is below.. Dont think this is the issue.  since nginx should at least connect.
  • 16 GB of memory with swap enabled
What does /etc/hosts have for markets.chat

what are the settings on the cloud provider firewall?

Also,  the next time you install, save the entire install.log to inspect for errors.

regards,
Stephen

Fred Dixon

unread,
Jan 23, 2024, 7:04:18 AM1/23/24
to bigbluebu...@googlegroups.com
Hi,

> nginx 502 bad gateway. have rebooted.  have confirmed with netstat listening on 80 and 443.  

Could you install again and watch all the output from the install process -- did you see any errors thrown during the install?  Nginx may be running, for example, but an error in the install may have not correctly configured it.

Regards,... Fred

--
You received this message because you are subscribed to the Google Groups "BigBlueButton-Setup" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bigbluebutton-s...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/bigbluebutton-setup/b9569ada-70f2-4163-a6ee-fef5189aff6en%40googlegroups.com.


--
Co-founder BigBlueButton

Like BigBlueButton?  Tweet us at @bigbluebutton
Message has been deleted

Mike Boulter

unread,
Jan 24, 2024, 3:08:54 PM1/24/24
to BigBlueButton-Setup
Why was my message deleted?  If I remember correctly, I was asking a question about securing logs before I wipe the machine.

Fred Dixon

unread,
Jan 25, 2024, 4:20:56 AM1/25/24
to bigbluebu...@googlegroups.com
Hi Mike,

Your message was marked as potential SPAM by Google Groups (we appreciate this system as we've had some SPAM recently).

image.png
I've approved your message so it should now be visible at


Regards,.. Fred


Message has been deleted

Mike Boulter

unread,
Jan 25, 2024, 12:27:28 PM1/25/24
to BigBlueButton-Setup
The reply was deleted again.  Please undelete my last reply, I added new details.

Fred Dixon

unread,
Jan 26, 2024, 6:00:35 AM1/26/24
to bigbluebu...@googlegroups.com
Hi Mike,

The error message shows the source of the problem

> Jan 24 13:56:55 chat systemd[1]: Starting A high performance web server and a reverse proxy server...
> Jan 24 13:56:55 chat nginx[21510]: nginx: [emerg] bind() to [::1]:82 failed (99: Cannot assign requested address)

I did a quick google

  How to determine which process is listening to port 82

and found the following command

  netstat -tulnp | grep ':82'

I ran this on a new install of BigBlueButton 2.7 and had the following output

# netstat -tulnp | grep ':82'
tcp        0      0 127.0.0.1:82            0.0.0.0:*               LISTEN      67787/nginx: master
tcp6       0      0 ::1:82                  :::*                    LISTEN      67787/nginx: master 

Here, nginx was able to bind to the port.  However, it appears some other process is already bound to that port.  The command above should reveal it.

Regards,.. Fred

On Fri, Jan 26, 2024 at 6:33 AM Mike Boulter <mbou...@gmail.com> wrote:
Thanks Fred but still shows deleted.  Anyway, I found an email copy:

Just looking for anything before reinstalling the 4th time.

--- prior email ---
Nginx is throwing 502 thats why I assume it won't load any page?

I also couldn't do
# telnet localhost 80

Memory is just temp.  It will go into production with whatever it needs, this is just a VM.

Is there a flag to save install logs?  Or you mean just manually capture?  Is there not a log on disk that might be useful before I do this yet a third time?

Thank you

# systemctl status nginx
● nginx.service - A high performance web server and a reverse proxy server
     Loaded: loaded (/lib/systemd/system/nginx.service; enabled; vendor preset: enabled)
     Active: failed (Result: exit-code) since Wed 2024-01-24 13:56:55 EST; 20h ago
       Docs: man:nginx(8)

Jan 24 13:56:55 chat systemd[1]: Starting A high performance web server and a reverse proxy server...
Jan 24 13:56:55 chat nginx[21510]: nginx: [emerg] bind() to [::1]:82 failed (99: Cannot assign requested address)
Jan 24 13:56:55 chat nginx[21510]: nginx: configuration file /etc/nginx/nginx.conf test failed
Jan 24 13:56:55 chat systemd[1]: nginx.service: Control process exited, code=exited, status=1/FAILURE
Jan 24 13:56:55 chat systemd[1]: nginx.service: Failed with result 'exit-code'.
Jan 24 13:56:55 chat systemd[1]: Failed to start A high performance web server and a reverse proxy server.

# nginx -t
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: [emerg] bind() to [::1]:82 failed (99: Cannot assign requested address)
nginx: configuration file /etc/nginx/nginx.conf test failed

# ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
2: enp6s18: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
    link/ether bc:24:xx:xx:x:xx brd ff:ff:ff:ff:ff:ff
    inet 173.231.62.146/32 scope global enp6s18
       valid_lft forever preferred_lft forever
    inet6 fe80::be24:11ff:fe80:ccd0/64 scope link
       valid_lft forever preferred_lft forever
3: enp6s19: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
    link/ether bc:24:11:xx:xx:xx brd ff:ff:ff:ff:ff:ff
    inet 192.168.1.26/24 brd 192.168.1.255 scope global enp6s19
       valid_lft forever preferred_lft forever
    inet6 fe80::be24:11ff:feef:9f5/64 scope link
       valid_lft forever preferred_lft forever
4: docker0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN group default
    link/ether 02:42:fd:xx:xx:xxbrd ff:ff:ff:ff:ff:ff
    inet 172.17.0.1/16 brd 172.17.255.255 scope global docker0
       valid_lft forever preferred_lft forever


Firewall is just local ufw:
# ufw status verbose
Status: active
Logging: off
Default: deny (incoming), allow (outgoing), deny (routed)
New profiles: skip

To                         Action      From
--                         ------      ----
192.168.1.26 212/tcp       ALLOW IN    Anywhere                   # SSH
173.231.62.146 80 on enp6s18 ALLOW IN    Anywhere                   # WEB
173.231.62.146 443 on enp6s18 ALLOW IN    Anywhere                   # SSL
22/tcp (OpenSSH)           ALLOW IN    Anywhere
80,443/tcp (Nginx Full)    ALLOW IN    Anywhere
16384:32768/udp            ALLOW IN    Anywhere
3478                       ALLOW IN    Anywhere
22/tcp (OpenSSH (v6))      ALLOW IN    Anywhere (v6)
80,443/tcp (Nginx Full (v6)) ALLOW IN    Anywhere (v6)
16384:32768/udp (v6)       ALLOW IN    Anywhere (v6)
3478 (v6)                  ALLOW IN    Anywhere (v6)

# cat /etc/hosts
127.0.0.1 localhost
127.0.1.1 chat
173.231.62.146 markets.chat

# The following lines are desirable for IPv6 capable hosts
::1     ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters

# ss
Netid  State   Recv-Q  Send-Q        Local Address:Port    Peer Address:Port Process
udp    UNCONN  0       0             127.0.0.53%lo:53           0.0.0.0:*     users🙁("systemd-resolve",pid=759,fd=12))
udp    UNCONN  0       0            173.231.62.146:5060         0.0.0.0:*     users🙁("freeswitch",pid=895,fd=22))
udp    UNCONN  0       0            173.231.62.146:5090         0.0.0.0:*     users🙁("freeswitch",pid=895,fd=17))
udp    UNCONN  0       0            173.231.62.146:3478         0.0.0.0:*     users🙁("turnserver",pid=778,fd=55))
udp    UNCONN  0       0            173.231.62.146:3478         0.0.0.0:*     users🙁("turnserver",pid=778,fd=54))
udp    UNCONN  0       0            173.231.62.146:3478         0.0.0.0:*     users🙁("turnserver",pid=778,fd=53))
udp    UNCONN  0       0            173.231.62.146:3478         0.0.0.0:*     users🙁("turnserver",pid=778,fd=52))
udp    UNCONN  0       0            173.231.62.146:3478         0.0.0.0:*     users🙁("turnserver",pid=778,fd=51))
udp    UNCONN  0       0            173.231.62.146:3478         0.0.0.0:*     users🙁("turnserver",pid=778,fd=50))
udp    UNCONN  0       0            173.231.62.146:3478         0.0.0.0:*     users🙁("turnserver",pid=778,fd=49))
udp    UNCONN  0       0            173.231.62.146:3478         0.0.0.0:*     users🙁("turnserver",pid=778,fd=48))
tcp    LISTEN  0       511               127.0.0.1:3010         0.0.0.0:*     users🙁("node",pid=1664,fd=62))
tcp    LISTEN  0       64           173.231.62.146:5090         0.0.0.0:*     users🙁("freeswitch",pid=895,fd=18))
tcp    LISTEN  0       511               127.0.0.1:4100         0.0.0.0:*     users🙁("node",pid=1985,fd=28))
tcp    LISTEN  0       64           173.231.62.146:5060         0.0.0.0:*     users🙁("freeswitch",pid=895,fd=23))
tcp    LISTEN  0       511               127.0.0.1:4101         0.0.0.0:*     users🙁("node",pid=1963,fd=28))
tcp    LISTEN  0       511               127.0.0.1:3014         0.0.0.0:*     users🙁("node",pid=1664,fd=66))
tcp    LISTEN  0       511               127.0.0.1:3016         0.0.0.0:*     users🙁("node",pid=1513,fd=27))
tcp    LISTEN  0       511               127.0.0.1:9001         0.0.0.0:*     users🙁("node",pid=973,fd=30))
tcp    LISTEN  0       4096              127.0.1.1:27017        0.0.0.0:*     users🙁("mongod",pid=871,fd=11))
tcp    LISTEN  0       511               127.0.0.1:9002         0.0.0.0:*     users🙁("node",pid=974,fd=22))
tcp    LISTEN  0       64           173.231.62.146:5066         0.0.0.0:*     users🙁("freeswitch",pid=895,fd=24))
tcp    LISTEN  0       511               127.0.0.1:6379         0.0.0.0:*     users🙁("redis-server",pid=919,fd=6))
tcp    LISTEN  0       511               127.0.0.1:3022         0.0.0.0:*     users🙁("node",pid=1665,fd=27))
tcp    LISTEN  0       511               127.0.0.1:3024         0.0.0.0:*     users🙁("node",pid=1667,fd=25))
tcp    LISTEN  0       511               127.0.0.1:3026         0.0.0.0:*     users🙁("node",pid=1666,fd=27))
tcp    LISTEN  0       64           173.231.62.146:7443         0.0.0.0:*     users🙁("freeswitch",pid=895,fd=25))
tcp    LISTEN  0       128            192.168.1.26:212          0.0.0.0:*     users🙁("sshd",pid=831,fd=3))
tcp    LISTEN  0       5                 127.0.0.1:8021         0.0.0.0:*     users🙁("freeswitch",pid=895,fd=31))
tcp    LISTEN  0       4096          127.0.0.53%lo:53           0.0.0.0:*     users🙁("systemd-resolve",pid=759,fd=13))
tcp    LISTEN  0       1024         173.231.62.146:3478         0.0.0.0:*     users🙁("turnserver",pid=778,fd=47))
tcp    LISTEN  0       1024         173.231.62.146:3478         0.0.0.0:*     users🙁("turnserver",pid=778,fd=46))
tcp    LISTEN  0       1024         173.231.62.146:3478         0.0.0.0:*     users🙁("turnserver",pid=778,fd=41))
tcp    LISTEN  0       1024         173.231.62.146:3478         0.0.0.0:*     users🙁("turnserver",pid=778,fd=32))
tcp    LISTEN  0       1024         173.231.62.146:3478         0.0.0.0:*     users🙁("turnserver",pid=778,fd=31))
tcp    LISTEN  0       1024         173.231.62.146:3478         0.0.0.0:*     users🙁("turnserver",pid=778,fd=30))
tcp    LISTEN  0       1024         173.231.62.146:3478         0.0.0.0:*     users🙁("turnserver",pid=778,fd=29))
tcp    LISTEN  0       1024         173.231.62.146:3478         0.0.0.0:*     users🙁("turnserver",pid=778,fd=19))
tcp    LISTEN  0       4096                0.0.0.0:443          0.0.0.0:*     users🙁("haproxy",pid=962,fd=7))
tcp    LISTEN  0       511               127.0.0.1:4000         0.0.0.0:*     users🙁("node",pid=1984,fd=28))
tcp    LISTEN  0       511               127.0.0.1:3008         0.0.0.0:*     users🙁("node",pid=1513,fd=24))
tcp    LISTEN  0       511               127.0.0.1:4001         0.0.0.0:*     users🙁("node",pid=2000,fd=28))
tcp    LISTEN  0       100      [::ffff:127.0.0.1]:8900               *:*     users🙁("java",pid=1521,fd=89))
tcp    LISTEN  0       100      [::ffff:127.0.0.1]:8901               *:*     users🙁("java",pid=1526,fd=123))
tcp    LISTEN  0       4096                      *:8888               *:*     users🙁("kurento-media-s",pid=856,fd=11))
tcp    LISTEN  0       100      [::ffff:127.0.0.1]:8090               *:*     users🙁("java",pid=972,fd=444))
tcp    LISTEN  0       4096                      *:443                *:*     users🙁("haproxy",pid=962,fd=8))



Mike Boulter

unread,
Jan 26, 2024, 12:21:43 PM1/26/24
to BigBlueButton-Setup
Fred,

That helped narrow the issue down, which is ipv6.  Nothing bound on that port, but globally we disable ipv6 at this datacenter.

Is there an install flag to gracefully bypass?  Right now when I installed netstat, my apt is complaining of broken bbb packages, so I wish to do one more clean install, hopefully with a graceful way to bypass ipv6.

Mike Boulter

unread,
Jan 26, 2024, 2:37:04 PM1/26/24
to BigBlueButton-Setup
I am going to try following this guide on a clean install:
Message has been deleted

Fred Dixon

unread,
Jan 27, 2024, 5:25:12 AM1/27/24
to bigbluebu...@googlegroups.com
Hi Mike,

> That helped narrow the issue down, which is ipv6.  Nothing bound on that port, but globally we disable ipv6 at this datacenter.

Thanks for sharing this insight with others.  BigBlueButton does bind to ipv4 and ipv6 addresses.

Regards,... Fred


Reply all
Reply to author
Forward
0 new messages