• Port Binding Crashes

    From Xofraq@MICROBUR to All on Thu Aug 29 07:49:06 2024
    Hello All,

    I have been having some issues with my new setup and I am trying to get some info on what might be causing the crash. In the past 2 days I have been getting port already in use errors for all of my services like this one:

    !ERROR 98 binding FTP server socket to port 21: address already in use

    This happens to all services/ports then the system freezes. Seems to happen after running for most of the day and sometime after 7:00pm, I am looking for a time pattern. I have to reboot the system and fire the BBS back up.

    This is running on:
    Syncronet v3.20 - Debian GNU/Linux 12
    Raspberry Pi 6.6.31+rpt-rpi-v8

    Thanks in advance on any thoughts you may have!

    Xofraq

    ---
    ■ Synchronet ■ MicroBurst II BBS - 30 Years Later
  • From Nightfox@DIGDIST to Xofraq on Thu Aug 29 12:07:27 2024
    Re: Port Binding Crashes
    By: Xofraq to All on Thu Aug 29 2024 07:49 am

    I have been having some issues with my new setup and I am trying to get some info on what might be causing the crash. In the past 2 days I have been getting port already in use errors for all of my services like this one:

    !ERROR 98 binding FTP server socket to port 21: address already in use

    Does Synchronet actually crash when this happens? This means another server is already running on the same port (21), so Synchronet can't use that port. This is just an error, and I don't think Synchronet will crash when this happens; it just can't bind to the port.

    One way you can check what process is listening on port 21 is with this command:
    sudo lsof -i -P -n |grep LISTEN |grep :21

    One thing I've noticed is that after shutting down sbbs, it can take a couple minutes for it to fully shut down, so if I try to start sbbs up again too soon, some of the ports might still be in use.

    Nightfox

    ---
    ■ Synchronet ■ Digital Distortion: digitaldistortionbbs.com
  • From echicken@ECBBS to Xofraq on Thu Aug 29 23:34:10 2024
    Re: Port Binding Crashes
    By: Xofraq to All on Thu Aug 29 2024 07:49:06

    !ERROR 98 binding FTP server socket to port 21: address already in use

    In all likelihood Synchronet has already crashed and is trying to restart when you see this message.

    You can probably deal with this error by reviewing this, with attention to the "Rebind" section:

    https://wiki.synchro.net/faq:tcpip#bind

    Why it's crashing remains an open question. With a debug build you can get a core file which you can explore on your own, or submit along with an issue on gitlab.synchro.net:

    https://wiki.synchro.net/howto:gdb

    You may just be running out of memory. Maybe you'll notice a pattern in the logs in the minute(s) prior to this recurring crash.

    I personally run my terminal, web, mail, and services servers in separate processes, so that if one crashes or needs to restart it doesn't take down the whole BBS. I'm not really advocating for this but it can help isolate the problem.

    echicken
    electronic chicken bbs - bbs.electronicchicken.com
    ---
    ■ Synchronet ■ electronic chicken bbs - bbs.electronicchicken.com
  • From Nightfox@DIGDIST to echicken on Fri Aug 30 08:23:07 2024
    Re: Port Binding Crashes
    By: echicken to Xofraq on Thu Aug 29 2024 11:34 pm

    I personally run my terminal, web, mail, and services servers in separate processes, so that if one crashes or needs to restart it doesn't take down the whole BBS. I'm not really advocating for this but it can help isolate the problem.

    I didn't know you could do that, as I thought they were threads within the sbbs process. I might look into how to do that.

    Nightfox

    ---
    ■ Synchronet ■ Digital Distortion: digitaldistortionbbs.com
  • From Xofraq@MICROBUR to Nightfox on Fri Aug 30 14:31:11 2024
    Re: Port Binding Crashes
    By: Nightfox to Xofraq on Thu Aug 29 2024 12:07 pm

    Thanks for the freedback! It seems to be running fine now. I was probably rushing restarts.

    ---
    ■ Synchronet ■ MicroBurst II BBS - 30 Years Later
  • From Xofraq@MICROBUR to echicken on Fri Aug 30 14:33:40 2024
    Re: Port Binding Crashes
    By: echicken to Xofraq on Thu Aug 29 2024 11:34 pm

    Thanks echicken. I will watch my logs.

    ---
    ■ Synchronet ■ MicroBurst II BBS - 30 Years Later
  • From Keyop@MAGNUMUK to Nightfox on Sat Aug 31 00:38:57 2024
    Re: Port Binding Crashes
    By: Nightfox to echicken on Fri Aug 30 2024 08:23:07

    I personally run my terminal, web, mail, and services servers in separate processes, so that if one crashes or needs to restart it doesn't take down the whole BBS. I'm not really advocating for this but
    it can help isolate the problem.

    I didn't know you could do that, as I thought they were threads within the sbbs process. I might look into how to do that.

    I was just thinking that too ...

    ---
    ■ Synchronet ■ >>> Magnum BBS <<< - bbs.magnum.uk.net
  • From echicken@ECBBS to Nightfox on Fri Aug 30 20:36:25 2024
    Re: Port Binding Crashes
    By: Nightfox to echicken on Fri Aug 30 2024 08:23:07

    I didn't know you could do that, as I thought they were threads within the sbbs process. I might look into how to do that.

    A command line like this will start just the terminal service, and daemonize:

    sbbs d t!

    Similarly f!, m!, s!, w! for ftp, mail, services, web. You'll see these and other options if you do 'sbbs --help'.

    I'm on Linux and have separate systemd unit files for each of these (except FTP which I don't bother with anymore). I also run some of the JS services (JSON-DB, ircd, etc.) standalone via jsexec so I can restart my services without interrupting them.

    I wouldn't push this configuration on the average sysop, but since my BBS is mainly for development and sees frequent restarts it's handy for me to keep certain things online. (Lots of people connect to my JSON-DB and so on.)

    echicken
    electronic chicken bbs - bbs.electronicchicken.com
    ---
    ■ Synchronet ■ electronic chicken bbs - bbs.electronicchicken.com
  • From phigan@TACOPRON to echicken on Sat Aug 31 00:36:04 2024
    Re: Port Binding Crashes
    By: echicken to Nightfox on Fri Aug 30 2024 08:36 pm

    I wouldn't push this configuration on the average sysop, but since my BBS is mainly for development and sees frequent restarts it's handy for me to keep certain things online. (Lots of people connect to my JSON-DB and so on.)

    I think it's a pretty wise setup. It'd probably be awesome and help some sysops if there was a script to put all that stuff in place :).. or maybe just a wiki page (there might already be one, but my crappy searching didn't find it if there is).

    ---
    ■ Synchronet ■ TIRED of waiting 2 hours for a taco? GO TO TACOPRONTO.bbs.io
  • From Nightfox@DIGDIST to echicken on Sat Aug 31 15:45:29 2024
    Re: Port Binding Crashes
    By: echicken to Nightfox on Fri Aug 30 2024 08:36 pm

    A command line like this will start just the terminal service, and daemonize:

    sbbs d t!

    Similarly f!, m!, s!, w! for ftp, mail, services, web. You'll see these and other options if you do 'sbbs --help'.

    I'm on Linux and have separate systemd unit files for each of these (except FTP which I don't bother with anymore). I also run some of the JS services (JSON-DB, ircd, etc.) standalone via jsexec so I can restart my services without interrupting them.

    I probably should have checked sbbs --help.. That's useful information, and I might do that myself. Thanks for the reply.

    Nightfox

    ---
    ■ Synchronet ■ Digital Distortion: digitaldistortionbbs.com
  • From Digital Man to Xofraq on Sat Aug 31 18:17:16 2024
    Re: Port Binding Crashes
    By: Xofraq to All on Thu Aug 29 2024 07:49 am

    Hello All,

    I have been having some issues with my new setup and I am trying to get some info on what might be causing the crash. In the past 2 days I have been getting port already in use errors for all of my services like this one:

    !ERROR 98 binding FTP server socket to port 21: address already in use

    That's not a crash. For more information, see https://wiki.synchro.net/faq:tcpip#bind

    This happens to all services/ports then the system freezes. Seems to happen after running for most of the day and sometime after 7:00pm, I am looking for a time pattern. I have to reboot the system and fire the BBS back up.

    Are you stopping and restarting sbbs? Normally, the ports aren't re-bound very oftne, only on server recycle or restart.
    --
    digital man (rob)

    Sling Blade quote #11:
    Doyle Hargraves (to Karl): What in the hell you doin' with that hammer?
    Norco, CA WX: 84.3°F, 51.0% humidity, 6 mph WNW wind, 0.00 inches rain/24hrs