• ircd Issue

    From Dream Master@1:103/705 to All on Friday, January 22, 2021 10:30:36
    Interesting little issue. If running ircd from within Synchronet as a non-standalone service, it binds to the properly defined interface in sbbs.ini. On the other hand, when running ircd as a standalone service from systemd, it binds to 0.0.0.0.

    Please note, my BBS interface is 172.31.1.184 and my management interface is 172.31.5.242.

    ircd from within Synchronet:

    tcp 0 0 172.31.1.184:6667 0.0.0.0:* LISTEN
    tcp 0 0 172.31.1.184:36197 71.95.196.34:6667 ESTABLISHED

    ircd when started from systemd:

    tcp 0 0 0.0.0.0:6667 0.0.0.0:* LISTEN
    tcp 0 0 172.31.5.242:35327 71.95.196.34:6667 ESTABLISHED tcp6 0 0 :::6667 :::* LISTEN

    From the looks of it, the standalone initialization of it comes from ircd.js, lines 168 through 181:

    if(this.server==undefined) { // Running from JSexec?
    if (!jsexec_revision_detail)
    jsexec_revision_detail = "JSexec";
    if (cmdline_port)
    default_port = cmdline_port;
    else if (mline_port)
    default_port = mline_port;

    server = { socket: false, terminated: false,
    version_detail: jsexec_revision_detail, interface_ip_addr_list: ["0.0.0.0","::"] };
    server.socket = create_new_socket(default_port)
    if (!server.socket)
    exit();
    }

    Yet, from lines 626 to 646, the else statement to utilize the sbbs.ini defined interface will likely never get called:

    function connect_to_server(this_cline,the_port) {
    var connect_sock;
    var new_id;

    if (!the_port && this_cline.port)
    the_port = this_cline.port;
    else if (!the_port)
    the_port = default_port; // try a safe default.
    if (js.global.ConnectedSocket != undefined) {
    try {
    connect_sock = new ConnectedSocket(this_cline.host, the_port, {timeout:ob_sock_timeout, bindaddrs:server.interface_ip_addr_list});
    }
    catch(e) {
    connect_sock = new Socket();
    }
    }
    else {
    connect_sock = new Socket();
    connect_sock.bind(0,server.interface_ip_address);
    connect_sock.connect(this_cline.host,the_port,ob_sock_timeout);
    }

    I'm a little stumped on how to fix this. I can obviously tweak interface_ip_addr_list and put the correct interface in it, but that would make the solution only work for me and I don't want that.

    Thoughts?

    Brian Klauss <-> Dream Master
    Caught in a Dream | caughtinadream.com a Synchronet BBS

    ---
    þ Synchronet þ Caught in a Dream - caughtinadream.com
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Digital Man@1:103/705 to Dream Master on Friday, January 22, 2021 12:01:18
    Re: ircd Issue
    By: Dream Master to All on Fri Jan 22 2021 10:30 am

    Interesting little issue. If running ircd from within Synchronet as a non-standalone service, it binds to the properly defined interface in sbbs.ini. On the other hand, when running ircd as a standalone service from systemd, it binds to 0.0.0.0.

    Please note, my BBS interface is 172.31.1.184 and my management interface is 172.31.5.242.

    ircd from within Synchronet:

    tcp 0 0 172.31.1.184:6667 0.0.0.0:* LISTEN tcp 0 0 172.31.1.184:36197 71.95.196.34:6667
    ESTABLISHED

    ircd when started from systemd:

    tcp 0 0 0.0.0.0:6667 0.0.0.0:* LISTEN tcp 0 0 172.31.5.242:35327 71.95.196.34:6667
    ESTABLISHED tcp6 0 0 :::6667 :::*
    LISTEN

    From the looks of it, the standalone initialization of it comes from ircd.js, lines 168 through 181:

    if(this.server==undefined) { // Running from JSexec?
    if (!jsexec_revision_detail)
    jsexec_revision_detail = "JSexec";
    if (cmdline_port)
    default_port = cmdline_port;
    else if (mline_port)
    default_port = mline_port;

    server = { socket: false, terminated: false,
    version_detail: jsexec_revision_detail, interface_ip_addr_list: ["0.0.0.0","::"] };
    server.socket = create_new_socket(default_port)
    if (!server.socket)
    exit();
    }

    Yet, from lines 626 to 646, the else statement to utilize the sbbs.ini defined interface will likely never get called:

    function connect_to_server(this_cline,the_port) {
    var connect_sock;
    var new_id;

    if (!the_port && this_cline.port)
    the_port = this_cline.port;
    else if (!the_port)
    the_port = default_port; // try a safe default.
    if (js.global.ConnectedSocket != undefined) {
    try {
    connect_sock = new ConnectedSocket(this_cline.host, the_port, {timeout:ob_sock_timeout, bindaddrs:server.interface_ip_addr_list});
    }
    catch(e) {
    connect_sock = new Socket();
    }
    }
    else {
    connect_sock = new Socket();
    connect_sock.bind(0,server.interface_ip_address);

    connect_sock.connect(this_cline.host,the_port,ob_sock_timeout);
    }

    I'm a little stumped on how to fix this. I can obviously tweak interface_ip_addr_list and put the correct interface in it, but that would make the solution only work for me and I don't want that.

    Thoughts?

    There may be a setting in ircd.conf that is (or is supposed to) control the local interface IP address to bind to, but looking at that code you pasted, it certainly appears to be hard-coded to 0.0.0.0. Note: sbbs.ini is intentionally not used by JSexec.

    The person to talk to about this stuff would be either cyan or deuce in #synchronet at irc.synchro.net (Cyan wrote the ircd.js). I saw you attempted to get Deuce's attention regarding your BinkIT 100% CPU utilization issue and didn't get any response. Sometimes you've got to ping him multiple times. echicken or nelgin might also have some helpful input on the ircd local interface issue (and those 2 monitor DOVE-Net usually, so maybe they're reply here).
    --
    digital man

    Sling Blade quote #14:
    Karl Childers: Some folks call it a sling blade, I call it a kaiser blade. Norco, CA WX: 63.9øF, 57.0% humidity, 1 mph W wind, 0.00 inches rain/24hrs
    --- SBBSecho 3.12-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Dream Master@1:103/705 to Digital Man on Friday, January 22, 2021 16:00:55
    Re: ircd Issue
    By: Digital Man to Dream Master on Fri Jan 22 2021 12:01 pm

    The person to talk to about this stuff would be either cyan or deuce in #synchronet at irc.synchro.net (Cyan wrote the ircd.js). I saw you attempted to get Deuce's attention regarding your BinkIT 100% CPU utilization issue and didn't get any response. Sometimes you've got to ping him multiple times. echicken or nelgin might also have some helpful input on the ircd local interface issue (and those 2 monitor DOVE-Net usually, so maybe they're reply here).

    Thank you. I tried reaching out to Deuce on irc, no glory. Cyan isn't online. Maybe I'll get lucky some time tonight when everyone is bored with their families. :)

    Also, I think I found the issue with BinkIT. I'm going to try to replicate it again this weekend and report back.

    Brian Klauss <-> Dream Master
    Caught in a Dream | caughtinadream.com a Synchronet BBS

    ---
    þ Synchronet þ Caught in a Dream - caughtinadream.com
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Digital Man@1:103/705 to Dream Master on Friday, January 22, 2021 17:00:06
    Re: ircd Issue
    By: Dream Master to Digital Man on Fri Jan 22 2021 04:00 pm

    Re: ircd Issue
    By: Digital Man to Dream Master on Fri Jan 22 2021 12:01 pm

    The person to talk to about this stuff would be either cyan or deuce in #synchronet at irc.synchro.net (Cyan wrote the ircd.js). I saw you attempted to get Deuce's attention regarding your BinkIT 100% CPU utilization issue and didn't get any response. Sometimes you've got to ping him multiple times. echicken or nelgin might also have some helpful input on the ircd local interface issue (and those 2 monitor DOVE-Net usually, so maybe they're reply here).

    Thank you. I tried reaching out to Deuce on irc, no glory. Cyan isn't online. Maybe I'll get lucky some time tonight when everyone is bored with their families. :)

    Cyan's in there (as he usually is), and I was *just* chatting with him. <shrug>

    He's in VN, so take that time zone into account too.
    --
    digital man

    Rush quote #50:
    I've always been a big sponge. - Neil Peart
    Norco, CA WX: 53.6øF, 69.0% humidity, 1 mph NNW wind, 0.00 inches rain/24hrs --- SBBSecho 3.12-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Nelgin@1:103/705 to Dream Master on Saturday, January 23, 2021 02:31:13
    Dream wrote:
    Re: ircd Issue
    By: Digital Man to Dream Master on Fri Jan 22 2021 12:01 pm

    The person to talk to about this stuff would be either cyan or deuce in #synchronet at irc.synchro.net (Cyan wrote the ircd.js). I saw you attempted
    to get Deuce's attention regarding your BinkIT 100% CPU utilization issue and didn't get any response. Sometimes you've got to ping him multiple times. echicken or nelgin might also have some helpful input on the ircd local interface issue (and those 2 monitor DOVE-Net usually, so maybe they're reply here).

    Thank you. I tried reaching out to Deuce on irc, no glory. Cyan isn't online. Maybe I'll get lucky some time tonight when everyone is bored with their families. :)

    Also, I think I found the issue with BinkIT. I'm going to try to replicate it again this weekend and report back.

    Deuce added some documentation to services.ini

    ; Interface (default: network interface IP address specified in sbbs.ini [services])
    ; Host (default: unspecified) - only run on the specified hostname
    ; NotHost (default: unspecified) - do not run on the specified hostname


    SO if you just specify the Interface with IP then the service will bind to
    that ip.

    ---
    þ Synchronet þ End Of The Line BBS - endofthelinebbs.com
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Digital Man@1:103/705 to Nelgin on Saturday, January 23, 2021 03:46:09
    Re: Re: ircd Issue
    By: Nelgin to Dream Master on Sat Jan 23 2021 02:31 am

    Dream wrote:
    Re: ircd Issue
    By: Digital Man to Dream Master on Fri Jan 22 2021 12:01 pm

    The person to talk to about this stuff would be either cyan or deuce in #synchronet at irc.synchro.net (Cyan wrote the ircd.js). I saw you attempted
    to get Deuce's attention regarding your BinkIT 100% CPU utilization issue and didn't get any response. Sometimes you've got to ping him multiple times. echicken or nelgin might also have some helpful input on the ircd local interface issue (and those 2 monitor DOVE-Net usually, so maybe they're reply here).

    Thank you. I tried reaching out to Deuce on irc, no glory. Cyan isn't online. Maybe I'll get lucky some time tonight when everyone is bored with their families. :)

    Also, I think I found the issue with BinkIT. I'm going to try to replicate it again this weekend and report back.

    Deuce added some documentation to services.ini

    ; Interface (default: network interface IP address specified in sbbs.ini [services])
    ; Host (default: unspecified) - only run on the specified hostname
    ; NotHost (default: unspecified) - do not run on the specified hostname


    SO if you just specify the Interface with IP then the service will bind to that ip.

    When the ircd.js is run from JSexec, the services.ini file is not read-by/used-for it.
    --
    digital man

    Sling Blade quote #11:
    Doyle Hargraves (to Karl): What in the hell you doin' with that hammer?
    Norco, CA WX: 47.5øF, 82.0% humidity, 1 mph ESE wind, 0.00 inches rain/24hrs --- SBBSecho 3.12-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Dream Master@1:103/705 to Nelgin on Saturday, January 23, 2021 14:49:24
    Re: Re: ircd Issue
    By: Nelgin to Dream Master on Sat Jan 23 2021 02:31 am

    Deuce added some documentation to services.ini

    ; Interface (default: network interface IP address specified in sbbs.ini [services])
    ; Host (default: unspecified) - only run on the specified hostname
    ; NotHost (default: unspecified) - do not run on the specified hostname


    SO if you just specify the Interface with IP then the service will bind to that ip.

    This will not work when used independantly of SBBS. If ran from systemd by itself, ircd.js does not query services.ini.

    Brian Klauss <-> Dream Master
    Caught in a Dream | caughtinadream.com a Synchronet BBS

    ---
    þ Synchronet þ Caught in a Dream - caughtinadream.com
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)