• ircd "address in use" via systemd up on crash, fills log file

    From Rob Swindell@1:103/705 to GitLab issue in main/sbbs on Mon Jul 24 17:21:24 2023
    close https://gitlab.synchro.net/main/sbbs/-/issues/402
    --- SBBSecho 3.20-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Rob Swindell@1:103/705 to GitLab note in main/sbbs on Mon Jul 24 18:39:36 2023
    https://gitlab.synchro.net/main/sbbs/-/issues/402#note_3708

    After further review, it does appear that the sockopts.ini file *should* be applied to newly created ListeningSocket() via the sock_init callback parameter (ls_cb) passed to xpms_add() in js_listening_socket_constructor(). ls_cb() in turn calls set_socket_options() and even logs an error if one occurs, so we don't expect any problem there.
    --- SBBSecho 3.20-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Rob Swindell@1:103/705 to GitLab issue in main/sbbs on Mon Jul 24 18:37:18 2023
    reopen https://gitlab.synchro.net/main/sbbs/-/issues/402

    I have the following systemd service file for my ircd```[Unit]Description=Synchronet ircdAfter=syslog.target network.target[Service]Type=simpleUser=bbsGroup=bbs#ExecStart=/sbbs/exec/jsexec -L0 -a -c /sbbs/ctrl -l -o/var/log/sbbs/ircd.log -e/var/log/sbbs/ircd.err ircdExecStart=/sbbs/exec/jsexec -L7 -l /sbbs/exec/ircd.js#StandardOutput=syslog#StandardError=syslogSyslogIdentifier=ircd[Install]WantedBy=multi-user.target```If the ircd crashes for some reason, it will spam the log files with:```Apr 26 01:51:05 bbs ircd[922629]: Re-running: /sbbs/exec/ircd.jsApr 26 01:51:05 bbs ircd[922629]: SynchronetIRCd-1.9 started.Apr 26 01:51:05 bbs ircd[922629]: Trying to read configuration from: /sbbs/ctrl/ircd.confApr 26 01:51:05 bbs ircd[922629]: Creating new socket object on port 6667Apr 26 01:51:05 bbs ircd[922629]: 0009 !ERROR 98 binding IRCd socket to port 6667: Address already in useApr 26 01:51:05 bbs ircd[922629]: !Error Error: Unable to add host to socket set creating listening socket on port 6667Apr 26 01:51:05 bbs ircd[922629]: !Module (/sbbs/exec/ircd.js) set exit_code: 1```This messages repeats 5-7 times per second. Left unchecked it will fill up a log in pretty short order.REUSEADDR = TRUEin sockopts.iniNeed a fix so that the ircd will respawn.
    --- SBBSecho 3.20-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Nigel Reed@1:103/705 to GitLab note in main/sbbs on Fri Sep 1 00:05:16 2023
    https://gitlab.synchro.net/main/sbbs/-/issues/402#note_3856

    For those researching this issue, I believe it's caused by using -l with jsexec.The -l option will make the process repeat until terminated. I assume that means that jsexec will restart when an error occurs. Sep 1 01:20:50 bbs ircd[806092]: Re-running: /sbbs/exec/ircd.jsI thought this was from systemd, however this is jsexecjsexec.c: lprintf(LOG_INFO,"\nRe-running: %s", module);By removing the -l from the jsexec process, it will terminate and allow systemd to manage restarting the process.ExecStart=/sbbs/exec/jsexec -L7 /sbbs/exec/ircd.jsRestart=alwaysRestartSec=15After I did a /die it tried to start, waited and started right up.If others can check and confirm, then the wiki ircd instructions can be updated. It may be noted that js.time_limit may need to be set to avoid getting an endless loop exit, which I wonder is what is causing a number of ircd to disconnect and reconnect, but that's another investigation.
    --- SBBSecho 3.20-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Nigel Reed@1:103/705 to GitLab note in main/sbbs on Wed May 22 18:06:00 2024
    https://gitlab.synchro.net/main/sbbs/-/issues/402#note_5351

    This appears resolved, at least for me.
    --- SBBSecho 3.20-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)