• Port Binding Crashes

    From Xofraq@VERT/MICROBUR to All on Thursday, August 29, 2024 07:49:00
    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@VERT/DIGDIST to Xofraq on Thursday, August 29, 2024 12:07:00
    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@VERT/ECBBS to Xofraq on Thursday, August 29, 2024 23:34:00
    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@VERT/DIGDIST to echicken on Friday, August 30, 2024 08:23:00
    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@VERT/MICROBUR to Nightfox on Friday, August 30, 2024 14:31:00
    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@VERT/MICROBUR to echicken on Friday, August 30, 2024 14:33:00
    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@VERT/MAGNUMUK to Nightfox on Saturday, August 31, 2024 00:38:00
    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@VERT/ECBBS to Nightfox on Friday, August 30, 2024 20:36:00
    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@VERT/TACOPRON to echicken on Saturday, August 31, 2024 00:36:00
    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@VERT/DIGDIST to echicken on Saturday, August 31, 2024 15:45:29
    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@VERT to Xofraq on Saturday, August 31, 2024 18:17:16
    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 ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net