bigbluebutton / bbb-install

BASH script to install BigBlueButton in 30 minutes.
GNU Lesser General Public License v3.0
618 stars 538 forks source link

404 Not Found After Reboot #122

Open BEEGUY42069 opened 4 years ago

BEEGUY42069 commented 4 years ago

I'm having a rather unusual issue. I installed BBB using the script and it completed without error. I then tested by accessing greenlight, creating an account, etc and everything appeared functional. I then went to restart the VM and now I'm getting thrown 404 not found nginx errors. The unusual part is that I didn't modify nginx or any of the config between the time it worked and became inaccessible. I feel like it's probably something obvious, but I can't seem to figure out what I'm missing! Thanks in advanced for your help!

This is the script and parameters I used to install BBB: wget -qO- https://packages-eu.bigbluebutton.org/bbb-install.sh | bash -s -- -v xenial-220 -s conference.protectedtechnology.com -e xxxxx@xxxx.com -g

Using the command bbb-conf --check gives me this information:

BigBlueButton Server 2.2.2 (1781)
                    Kernel version: 4.4.0-174-generic
                      Distribution: Ubuntu 16.04.6 LTS (64-bit)
                            Memory: 8141 MB
                         CPU cores: 4

/usr/share/bbb-web/WEB-INF/classes/bigbluebutton.properties (bbb-web)
       bigbluebutton.web.serverURL: https://conference.protectedtechnology.com
                defaultGuestPolicy: ALWAYS_ACCEPT
                 svgImagesRequired: true

/etc/nginx/sites-available/bigbluebutton (nginx)
                       server name: conference.protectedtechnology.com
                              port: 80, [::]:80
                              port: 443 ssl
                    bbb-client dir: /var/www/bigbluebutton

/var/www/bigbluebutton/client/conf/config.xml (bbb-client)
                Port test (tunnel): rtmp://conference.protectedtechnology.com
                              red5: conference.protectedtechnology.com
              useWebrtcIfAvailable: true

/opt/freeswitch/etc/freeswitch/vars.xml (FreeSWITCH)
                       local_ip_v4: 206.72.207.27
                   external_rtp_ip: stun:stun.freeswitch.org
                   external_sip_ip: stun:stun.freeswitch.org

/opt/freeswitch/etc/freeswitch/sip_profiles/external.xml (FreeSWITCH)
                        ext-rtp-ip: $${local_ip_v4}
                        ext-sip-ip: $${local_ip_v4}
                        ws-binding: :5066
                       wss-binding: 206.72.207.27:7443

/usr/local/bigbluebutton/core/scripts/bigbluebutton.yml (record and playback)
                     playback_host: conference.protectedtechnology.com
                 playback_protocol: https
                            ffmpeg: 4.2.2-1bbb1~ubuntu16.04

/etc/bigbluebutton/nginx/sip.nginx (sip.nginx)
                        proxy_pass: 206.72.207.27

/usr/local/bigbluebutton/bbb-webrtc-sfu/config/default.yml (Kurento SFU)
                        kurento.ip: 206.72.207.27
                       kurento.url: ws://127.0.0.1:8888/kurento
                    localIpAddress: XXX.XX.XXX.XX
               recordScreenSharing: true
                     recordWebcams: true
                  codec_video_main: VP8
               codec_video_content: VP8

/usr/share/meteor/bundle/programs/server/assets/app/config/settings.yml (HTML5 client)
                             build: 862
                        kurentoUrl: wss://conference.protectedtechnology.com/bbb-webrtc-sfu
                  enableListenOnly: true

# Potential problems described below

# Error: Found text in freeswitch.log:
#
#    Thread ended for mod_event_socket
#
# FreeSWITCH may not be responding to requests on port 8021 (event socket layer)
# and users may have errors joining audio.
#

#
# Error: Unable to connect to the FreeSWITCH Event Socket Layer on port 8021
#

Edit: A user below helped and was able to identify this as an issue where the Greenlight database docker container isn't starting. Manually starting that container and then using the bbb-conf --restart command fixed our installation. It's since been in production without incident.

ffdixon commented 4 years ago

I then went to restart the VM and

Did the IP address of your serer change after reboot. You are going to want to use a hostname (not IP address) for your BigBlueButton server. That way, you can also use Let's Encrypt (via bbb-install.sh) to get a SSL certificate.

BEEGUY42069 commented 4 years ago

The VM has a static ip. I used the FQDN with the install script, not an IP address. It's not that I'm unable to reach the server, It's that Nginx is reporting 404 and not redirecting me to Greenlight, however prior to rebooting it loaded without a hitch. If you go to https://conference.protectedtechnology.com/b you can see the error.

This is an installation on a fresh VM using the latest install script. I haven't made any changes to the config. I deployed an installation in January using the same script above and it was seamless, I'm not sure what's changed, but any help would greatly appreciated!

adlerweb commented 4 years ago

Can confirm - had the same problem on a server deployed using bbb-install. Rerunning brought it back to life. IP did not change.

BEEGUY42069 commented 4 years ago

Can confirm - had the same problem on a server deployed using bbb-install. Rerunning brought it back to life. IP did not change.

I just tried this and it worked, but the issue returned after reboot. I'm not sure what's occurring during reboot that is causing the installation to break, but all services are active and running without error.

georgetasioulis commented 4 years ago

Confirming the same. Fresh installation on dedicated server running Ubuntu 16.04 works fine until you reboot it. After reboot you get a 404 error when visiting the URL. Re-running bbb-install fixes everything until next reboot.

Running docker ps after reboot (and after waiting a few minutes just in case) shows that only one instance is running:

# docker ps
CONTAINER ID        IMAGE                         COMMAND             CREATED             STATUS              PORTS                    NAMES
06be56ecc9c1        bigbluebutton/greenlight:v2   "bin/start"         24 minutes ago      Up 3 minutes        127.0.0.1:5000->80/tcp   greenlight-v2

bbb-conf --check shows no potential issues.

After re-running bbb-install there are two containers running:

# docker ps
CONTAINER ID        IMAGE                         COMMAND                  CREATED             STATUS              PORTS                      NAMES
3fb1030b92f5        bigbluebutton/greenlight:v2   "bin/start"              55 seconds ago      Up 54 seconds       127.0.0.1:5000->80/tcp     greenlight-v2
709aa594e95e        postgres:9.5                  "docker-entrypoint.s…"   56 seconds ago      Up 55 seconds       127.0.0.1:5432->5432/tcp   greenlight_db_1
BEEGUY42069 commented 4 years ago

Confirming the same. Fresh installation on dedicated server running Ubuntu 16.04 works fine until you reboot it. After reboot you get a 404 error when visiting the URL. Re-running bbb-install fixes everything until next reboot.

Running docker ps after reboot (and after waiting a few minutes just in case) shows that only one instance is running:

# docker ps
CONTAINER ID        IMAGE                         COMMAND             CREATED             STATUS              PORTS                    NAMES
06be56ecc9c1        bigbluebutton/greenlight:v2   "bin/start"         24 minutes ago      Up 3 minutes        127.0.0.1:5000->80/tcp   greenlight-v2

bbb-conf --check shows no potential issues.

After re-running bbb-install there are two containers running:

# docker ps
CONTAINER ID        IMAGE                         COMMAND                  CREATED             STATUS              PORTS                      NAMES
3fb1030b92f5        bigbluebutton/greenlight:v2   "bin/start"              55 seconds ago      Up 54 seconds       127.0.0.1:5000->80/tcp     greenlight-v2
709aa594e95e        postgres:9.5                  "docker-entrypoint.s…"   56 seconds ago      Up 55 seconds       127.0.0.1:5432->5432/tcp   greenlight_db_1

THAT WAS IT! I started the container and then restarted BBB using the bbb-conf --restart command and everything came back up! Thank you a million!

georgetasioulis commented 4 years ago

I'm also pretty sure it's the docker container that's not running which is causing the issue, but why aren't both containers starting on boot? That's the problem that needs to be solved.

lonesomewalker commented 4 years ago

Yep, we also had this many times so we have scripted a check, if not responding -> start docker container

BEEGUY42069 commented 4 years ago

I'm also pretty sure it's the docker container that's not running which is causing the issue, but why aren't both containers starting on boot? That's the problem that needs to be solved.

In my installation, that was exactly it. With it manually started, we've now hosted several meetings with many participants pretty seamlessly. I'm not sure why that one container isn't being started, but another user commented below with the same issue.

In my previous installations this wasn't a problem, so I suspect there's some kind of bug either with docker or the script. In any event, I really appreciate your help! This has been an invaluable tool and is only possible because of your contribution and detective work! Thank you!!

JochenKoertner commented 4 years ago

The restart configuration of the db image in greenlight/docker-composer.yml seems to be the problem. If you set it to 'restart: unless-stopped' the database will be started on reboot.

ghost commented 4 years ago

Great, 3 days i was re-installing the server and bbb to find out why is not working after reboot. Right now reinstalling agian and just find this post OMG =)) Thank you ))

ghost commented 4 years ago

The restart configuration of the db image in greenlight/docker-composer.yml seems to be the problem. If you set it to 'restart: unless-stopped' the database will be started on reboot.

I did it, doesn't work.

Confirming the same. Fresh installation on dedicated server running Ubuntu 16.04 works fine until you reboot it. After reboot you get a 404 error when visiting the URL. Re-running bbb-install fixes everything until next reboot. Running docker ps after reboot (and after waiting a few minutes just in case) shows that only one instance is running:

# docker ps
CONTAINER ID        IMAGE                         COMMAND             CREATED             STATUS              PORTS                    NAMES
06be56ecc9c1        bigbluebutton/greenlight:v2   "bin/start"         24 minutes ago      Up 3 minutes        127.0.0.1:5000->80/tcp   greenlight-v2

bbb-conf --check shows no potential issues. After re-running bbb-install there are two containers running:

# docker ps
CONTAINER ID        IMAGE                         COMMAND                  CREATED             STATUS              PORTS                      NAMES
3fb1030b92f5        bigbluebutton/greenlight:v2   "bin/start"              55 seconds ago      Up 54 seconds       127.0.0.1:5000->80/tcp     greenlight-v2
709aa594e95e        postgres:9.5                  "docker-entrypoint.s…"   56 seconds ago      Up 55 seconds       127.0.0.1:5432->5432/tcp   greenlight_db_1

THAT WAS IT! I started the container and then restarted BBB using the bbb-conf --restart command and everything came back up! Thank you a million!

How you did it? Where i can find the ID of container?

Thank's in advance

---------UP So, thank you ver much. I managed it. But, is there other solutions to solve this issue?

lonesomewalker commented 4 years ago

You could also just simply change in the greenlight directory and bring up the container like this:

cd greenlight
docker-compose down
docker-compose up -d
ghost commented 4 years ago

You could also just simply change in the greenlight directory and bring up the container like this:

cd greenlight
docker-compose down
docker-compose up -d

Hi, I did like that it works, but my quetions was is there any other way to do it automatically?

Thanks in advance.

mountainfly commented 4 years ago

hi there, in my case changing the restart-policy as JochenKoertner statet, worked. It now starts correctly after reboot.

joe5250 commented 3 years ago

Hi guys,

I already had the same problem.

By inspecting docker-compose.yml as suggested by JochenKoertner I found a curiosity: container "app" is starting but referenced a link to conainer "db" , which is not already running at this time.

So I changed the sequence of starting the docker containers from first "app" .... to first "db".

now the docker-compose.yml look like version: '3' services: db: image: postgres:9.5 restart: unless-stopped ports:

So I guess, after starting container "db" then the next step should be starting container "app" refering to container db. In the common installation container "app" is starting and refering to container "db" before container "db" is available.

I'm not pretty sure, but now it is working now after a long time and reinstalling BBB for many times.

So long

Joe

joseluisq commented 3 years ago

Can you help me?

The same problem here, after a upgrade I have restarted the server and now from greenlight when I start a new session then I get a 404. For example this doesn't work anymore: https://my-server.com/html5client/join?sessionToken=abcdef...

I did the following but It doesn't help.

$ bbb-conf --setip my-server.com
$ bbb-conf --clean
$ bbb-conf --check

BigBlueButton Server 2.2.3 (2307)
                    Kernel version: 4.15.0-96-generic
                      Distribution: Ubuntu 16.04.7 LTS (64-bit)
                            Memory: 32799 MB
                         CPU cores: 8

/usr/share/bbb-web/WEB-INF/classes/bigbluebutton.properties (bbb-web)
       bigbluebutton.web.serverURL: https://my-server.com
                defaultGuestPolicy: ALWAYS_ACCEPT
                 svgImagesRequired: true

/etc/nginx/sites-available/bigbluebutton (nginx)
                       server_name: 127.0.0.1
                              port: 80, [::]:8080, [::]:80
                              port: 443 ssl

/opt/freeswitch/etc/freeswitch/vars.xml (FreeSWITCH)
                       local_ip_v4: 213.133.103.206
                   external_rtp_ip: stun:stun.freeswitch.org
                   external_sip_ip: stun:stun.freeswitch.org

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

/usr/local/bigbluebutton/core/scripts/bigbluebutton.yml (record and playback)
                     playback_host: my-server.com
                 playback_protocol: https
                            ffmpeg: 4.2.4-1ubuntu0.1bbb1~16.04.1

/etc/bigbluebutton/nginx/sip.nginx (sip.nginx)
                        proxy_pass: 213.133.103.206
                          protocol: https

/usr/local/bigbluebutton/bbb-webrtc-sfu/config/default.yml (Kurento SFU)
                        kurento.ip: 213.133.103.206
                       kurento.url: ws://127.0.0.1:8888/kurento
                    kurento.sip_ip: 213.133.103.206
                    localIpAddress: 213.133.103.206
               recordScreenSharing: true
                     recordWebcams: true
                  codec_video_main: VP8
               codec_video_content: VP8

/usr/share/meteor/bundle/programs/server/assets/app/config/settings.yml (HTML5 client)
                             build: 1114
                        kurentoUrl: wss://my-server.com/bbb-webrtc-sfu
                  enableListenOnly: true
                    sipjsHackViaWs: false

/usr/share/bbb-web/WEB-INF/classes/spring/turn-stun-servers.xml (STUN Server)
                              stun:stun.freeswitch.org

# Potential problems described below

# Warning: Detected FreeSWITCH is using default stun.freeswitch.org server.  See
#
#     http://docs.bigbluebutton.org/2.2/troubleshooting.html#freeswitch-using-default-stun-server
#
mountainfly commented 3 years ago

Can you help me?

Hi, this is, what I wrote down (in german) in March, solving this issue on my machine, hope that helps:

Greenlight ist down nach OS Reboot. Man muss in /root/greenlight/docker-composer.yml die Restart Policy des Datenbankservers (zweiter Abschnitt) ändern auf 'restart: unless-stopped', so wie sie auch beim oberen container greenlight eingestellt ist. Dann greenlight neustarten mit: cd ~/greenlight docker-compose down docker-compose up -d systemctl restart nginx

joseluisq commented 3 years ago

@mountainfly Thanks for the tip.

In my case I have upgraded from 2.2.0 to 2.2.31 I have solved the issue doing the following steps with one reboot:

$ apt-get update
$ apt-get dist-upgrade
$ reboot
$ bbb-conf --setip my-server.com
$ bbb-conf --clean
$ bbb-conf --check

# Warning: You have this server defined for https, but in
#
#   /etc/bigbluebutton/nginx/sip.nginx
#
#  did not find the use of https in definition for proxy_pass
#
#       proxy_pass http://127.0.0.1:5066;
#
# Warning: You have this server defined for https, but in
#
#   /etc/bigbluebutton/nginx/sip.nginx
#
#  did not find the use of port 7443 in definition for proxy_pass
#
#       proxy_pass http://127.0.0.1:5066;
#

I have replace the proxy_pass with my real server ip and protocol (https). And finally

$ bbb-conf --setip my-server.com
$ bbb-conf --clean
$ bbb-conf --check

Now everything is fine again.

asim-quadri commented 3 years ago

when i want to join the class with demo link iam getting below error

Can any one help me out

404-Not-Found

ffdixon commented 3 years ago

Hi @asim-quadri, did you try the suggestions earlier in this issue? Are you seeing this on an upgrade or new install?

asim-quadri commented 3 years ago

Hi @asim-quadri, did you try the suggestions earlier in this issue? Are you seeing this on an upgrade or new install?

new install

asim-quadri commented 3 years ago

After new installation iam getting this error Capture