• Javascript issues

    From Jason@VERT to All on Sat Nov 16 13:12:00 2013
    So I have been pouring thru the docs and i can't seem to figure something out.

    I keep getting this error when attempting to try some of the doors that came preinstalled in sync for *nix.


    !JavaScript /sbbs/exec/xtrn_sec.js line 135: uncaught exception: error connecting to server

    Now i have checked line 135 in that file and it's just simply trying to execute
    the door, but i don't get the error connecting to server part.

    This happens with like the TW2 game that is preinstalled. I'm scratching my head and just am missing something. What is it i'm missing? :)

    Thanks,
    Jason


    ---
    ž Synchronet ž The Hard Drive Cafe BBS is BACK! telnet://bbs.hdcbbs.com
  • From echicken@VERT to Jason on Sun Nov 17 01:08:09 2013
    Re: Javascript issues
    By: Jason to All on Sat Nov 16 2013 13:12:00

    !JavaScript /sbbs/exec/xtrn_sec.js line 135: uncaught exception: error connecting to server

    This happens with like the TW2 game that is preinstalled. I'm scratching

    Paging Deuce ...

    The game is likely trying to connect to a JSON-DB service on your local system, which you haven't configured yet. You can either set that up, or point the game at another server (probably wlarb.synchro.net.) How do you do this, exactly? A brief look at the docs doesn't make this clear - Deuce ought to update the documentation, or perhaps he'll just post here and tell you what to do.

    ---
    echicken
    electronic chicken bbs - bbs.electronicchicken.com - 416-273-7230
    ž
  • From Jason@VERT to echicken on Sun Nov 17 01:45:21 2013
    Re: Javascript issues
    By: echicken to Jason on Sun Nov 17 2013 01:08 am

    !JavaScript /sbbs/exec/xtrn_sec.js line 135: uncaught exception: error connecting to server

    This happens with like the TW2 game that is preinstalled. I'm scratching

    Paging Deuce ...

    The game is likely trying to connect to a JSON-DB service on your local system, which you haven't configured yet. You can either set that up, or point the game at another server (probably wlarb.synchro.net.) How do you do this, exactly? A brief look at the docs doesn't make this clear - Deuce ought to update the documentation, or perhaps he'll just post here and tell you what to do.


    I setup the json-service.js on port 10088, i found that in a doc somewhere (i can't remember now where), i don't know if thats the right port for that. If someone knows the port number for the json-service please post it.. Here is what I have for that right now in my services.ini file

    [JSON]
    Port=10088
    Options=STATUS | LOOP | NO_RECYCLE
    Command=json-service.js

    -+-
    So i'm guessing i need to setup one for the json-db.js file as well.. What should i use in the services.ini file to set that up?

    Thanks,
    Jason


    ---
    ž
  • From Android8675@VERT to Jason on Sun Nov 17 07:15:54 2013
    Re: Javascript issues
    By: Jason to echicken on Sun Nov 17 2013 01:45 am

    The game is likely trying to connect to a JSON-DB service on your
    local system, which you haven't configured yet. You can either set
    that up, or point the game at another server (probably
    wlarb.synchro.net.) How do you do this, exactly? A brief look at the
    docs doesn't make this clear - Deuce ought to update the
    documentation, or perhaps he'll just post here and tell you what to
    do.

    I setup the json-service.js on port 10088, i found that in a doc somewhere (i can't remember now where), i don't know if thats the right port for that. If someone knows the port number for the json-service please post it.. Here is what I have for that right now in my services.ini file

    You don't necessarily have to do that, you can connect to another server that's already running TW2 and play that way, but assuming json-service is starting up correctly (Watch the Services tab in SBBSCTRL startup, make sure it doesn't say something like JSON could not startup), then you should make sure you ran the tw2init program.

    cd c:\sbbs\xtrn\tw2 (or wherever you put TW2)
    \sbbs\exec\jsexec tw2int500.js

    That'll reset the game and should give no errors, then try running the game from your board.
    --
    Andy/Android8675


    ---
    ž Synchronet ž Shodan's Core - shodan.synchro.net
  • From mark lewis@VERT to Jason on Sun Nov 17 10:53:54 2013
    On Sat, 16 Nov 2013, Jason wrote to All:


    !JavaScript /sbbs/exec/xtrn_sec.js line 135: uncaught exception:
    error connecting to server

    i suspect that it is having problems connecting to the JSON server which stores
    the game data... i ran into a similar problem with that TW2 game and being set up to use the local JSON server and database...

    )\/(ark

    --- FMail/Win32 1.60
    * Origin: (1:3634/12.71)
    ž Synchronet ž Vertrauen ž Home of Synchronet ž telnet://vert.synchro.net
  • From Jason@VERT to Android8675 on Sun Nov 17 11:39:04 2013
    Re: Javascript issues
    By: Android8675 to Jason on Sun Nov 17 2013 07:15 am

    You don't necessarily have to do that, you can connect to another server that's already running TW2 and play that way, but assuming json-service is starting up correctly (Watch the Services tab in SBBSCTRL startup, make
    sure it doesn't say something like JSON could not startup), then you should make sure you ran the tw2init program.

    cd c:\sbbs\xtrn\tw2 (or wherever you put TW2)
    \sbbs\exec\jsexec tw2int500.js

    That'll reset the game and should give no errors, then try running the game from your board.
    --
    Andy/Android8675

    Yeah, that sort of the problem, i still get the same error "cannot connect to server", so i still must be missing something. The JSON service is starting, but the DB service isn't there.. Not sure what port to run that on.

    Is there a doc somewhere that has the default ports for all the services run on
    Synchronet, especially for the JSON and other services other than the standard ones like web,term,ftp,rlogin,irc and such..

    Jason


    ---
    ž Synchronet ž The Hard Drive Cafe BBS is BACK! telnet://bbs.hdcbbs.com
  • From echicken@VERT to Jason on Mon Nov 18 01:22:07 2013
    Re: Javascript issues
    By: Jason to echicken on Sun Nov 17 2013 01:45:21

    I setup the json-service.js on port 10088, i found that in a doc somewhere (i can't remember now where), i don't know if thats the right port for that. If someone knows the port number for the json-service please post

    It normally listens on 10088, but you can put it anywhere, really. The important thing is that any clients (BBSs) that connect to your server (including your own local instance of the game) be configured to connect to the port that you've chosen.

    [JSON]
    Port=10088
    Options=STATUS | LOOP | NO_RECYCLE
    Command=json-service.js

    -+-
    So i'm guessing i need to setup one for the json-db.js file as well.. What
    should i use in the services.ini file to set that up?

    What you posted above is what would go in services.ini. You'll also need to create a JSON-DB module for tradewars 2, by adding a section like this to ctrl/json-service.ini:

    [tw2]
    dir=../xtrn/tw2/

    I believe that there are some additional steps required to initialize the game ... but I haven't done it before. Hopefully the documentation will provide the answers.

    ---
    echicken
    electronic chicken bbs - bbs.electronicchicken.com - 41
  • From Jason@VERT to echicken on Mon Nov 18 11:21:55 2013
    Re: Javascript issues
    By: echicken to Jason on Mon Nov 18 2013 01:22 am

    -+-
    So i'm guessing i need to setup one for the json-db.js file as well.. What
    should i use in the services.ini file to set that up?

    What you posted above is what would go in services.ini. You'll also need
    to create a JSON-DB module for tradewars 2, by adding a section like this
    to ctrl/json-service.ini:

    [tw2]
    dir=../xtrn/tw2/


    I do have that line already in my json-service.ini. It was originally commented out, but i un-commented that line and im still having trouble. :(

    I have tried to run the twint500.js script thats in the tw directory to initialize the game, but it gets the same error, cannot connect to server... thats why i was wondering if i had something on a wrong port.

    Jason

    ---
    ž Synchronet ž The Hard Drive Cafe BBS is BACK! telnet://bbs.hdcbbs.com
  • From Android8675@VERT to Jason on Mon Nov 18 12:50:27 2013
    Re: Javascript issues
    By: Jason to echicken on Mon Nov 18 2013 11:21 am

    I have tried to run the twint500.js script thats in the tw directory to initialize the game, but it gets the same error, cannot connect to server... thats why i was wondering if i had something on a wrong port.

    Port shouldn't matter because you're connecting to the JSON dB server from the same computer, unless you have 2 computers, one running your BBS with the JSON Server, and a second computer where you're trying to run the twint500.js script.

    If the program can't connect to the server it's probably because the server isn't running. When you startup your board, in the SBBSCTRL window under Services it should say something about JSON starting up, and chances are it's failing somewhere (producing an error), Might want to startup the BBS, scan that Services tab and see if JSON Server is even running.
    --
    Andy/Android8675


    ---
    ž Synchronet ž Shodan's Core - shodan.synchro.net
  • From Jason@VERT to Android8675 on Mon Nov 18 18:44:21 2013
    Re: Javascript issues
    By: Android8675 to Jason on Mon Nov 18 2013 12:50 pm

    Port shouldn't matter because you're connecting to the JSON dB server from the same computer, unless you have 2 computers, one running your BBS with the JSON Server, and a second computer where you're trying to run the twint500.js script.

    If the program can't connect to the server it's probably because the server isn't running. When you startup your board, in the SBBSCTRL window under Services it should say something about JSON starting up, and chances are it's failing somewhere (producing an error), Might want to startup the BBS, scan that Services tab and see if JSON Server is even running.
    --

    Here is what's in my /var/log/messages file when i start the bbs

    srvc 0019 JSON socket bount to TCP port 10088
    srvc 0000 Services thread started (12 service sockets bound)
    srvc 0019 JSON server initialized (v1.28)
    srvc 0019 JSON database initialized (v1.38) <-- i get this about 10 times

    then i get

    srvc 0019 JSON !JavaScript : uncaught exception: error connecting to server srvc 0019 JSON !JavaScript : uncaught exception: error connecting to server

    Then whenever the BBS is recycling the services, i get this error

    srvc 0019 JSON !JavaScript warning /sbbs/exec/json-service.js line 216: Terminated
    srvc 0019 JSON service thread terminated (0 clients served)


    Any help you can give is appreciated! :)

    Thanks,
    Jason


    ---
    ž Synchronet ž The Hard Drive Cafe BBS is BAC
  • From MCMLXXIX@VERT to Jason on Tue Nov 19 13:17:15 2013
    Re: Javascript issues
    By: Jason to Android8675 on Mon Nov 18 2013 18:44:21

    srvc 0019 JSON database initialized (v1.38) <-- i get this about 10 times

    srvc 0019 JSON !JavaScript : uncaught exception: error connecting to server srvc 0019 JSON !JavaScript : uncaught exception: error connecting to server srvc 0019 JSON !JavaScript warning /sbbs/exec/json-service.js line 216: Terminated
    srvc 0019 JSON service thread terminated (0 clients served)


    you'll get that database initialization message for every db that gets created (one for each entry in ctrl\json-service.ini)

    the warning upon restart is normal (happens when you interrupt a running script)

    i would check tw2\gamesttings.js and make sure the host and port are what you want them to be (defaults to localhost:10088)

    there's a control script in sbbs\exec. json-svc-ctrl can be run from a command line (jsexec json-svc-ctrl). if you run that you can tell whether or not you can connect to the service.

    --
  • From Digital Man@VERT to Jason on Tue Nov 19 19:46:24 2013
    Re: Javascript issues
    By: Jason to Android8675 on Sun Nov 17 2013 11:39 am

    Is there a doc somewhere that has the default ports for all the services
    run on Synchronet, especially for the JSON and other services other than
    the standard ones like web,term,ftp,rlogin,irc and such..

    Yup:
    http://wiki.synchro.net/faq:tcpip?s[]=ports

    digital man

    Synchronet "Real Fact" #23:
    1584 Synchronet BBS Software registrations were sold between 1992 and 1996. Norco, CA WX: 56.8ųF, 81.0% humidity, 2 mph SE wind, 0.00 inches rain/24hrs
    ---
    ž Synchronet ž Vertrauen ž Home of Synchronet ž telnet://vert.synchro.net
  • From mark lewis@VERT to MCMLXXIX on Wed Nov 20 09:39:51 2013
    On Tue, 19 Nov 2013, MCMLXXIX wrote to Jason:

    there's a control script in sbbs\exec. json-svc-ctrl can be run
    from a command line (jsexec json-svc-ctrl). if you run that you can
    tell whether or not you can connect to the service.

    seems to be broken... i tried it on my friend's system and can't put in a username without it being corrupted...

    ŚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄæ
    ³ Server Configuration ³ ĆÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
    ³ ³Server hostname localhost ³
    ³ ³Server port 10088 ³
    ³ ³User Name ~~ H name ³
    ³ ³User Password ******** ³
    ³ ³Connect to Server ³ ĄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄŁ

    if i type the name again, the corruption changes...

    )\/(ark

    --- FMail/Win32 1.60
    * Origin: (1:3634/12.71)
    ž Synchronet ž Vertrauen ž Home of Synchronet ž telnet://vert.syn
  • From MCMLXXIX@VERT to mark lewis on Thu Nov 21 12:32:06 2013
    Re: Javascript issues
    By: mark lewis to MCMLXXIX on Wed Nov 20 2013 09:39:51

    seems to be broken... i tried it on my friend's system and can't put in a username without it being corrupted...

    ŚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄæ
    ³ Server Configuration ³ ĆÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
    ³ ³Server hostname localhost ³
    ³ ³Server port 10088 ³
    ³ ³User Name ~~ H name ³
    ³ ³User Password ******** ³
    ³ ³Connect to Server ³ ĄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄŁ

    if i type the name again, the corruption changes...


    I had this problem at one point as well. I don't recall the exact cause but I think the solution was to update to the latest build of synchronet. I blame deuce. something to do with the UIFC code incorrectly converting values.


    ---
    ž Synchr
  • From mark lewis@VERT to MCMLXXIX on Thu Nov 21 20:36:59 2013
    On Thu, 21 Nov 2013, MCMLXXIX wrote to mark lewis:

    seems to be broken... i tried it on my friend's system and can't put
    in a username without it being corrupted...

    ŚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄæ
    ³ Server Configuration ³ ĆÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
    ³ ³Server hostname localhost ³
    ³ ³Server port 10088 ³
    ³ ³User Name ~~ H name ³
    ³ ³User Password ******** ³
    ³ ³Connect to Server ³ ĄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄŁ

    if i type the name again, the corruption changes...


    I had this problem at one point as well. I don't recall the exact
    cause but I think the solution was to update to the latest build of synchronet. I blame deuce. something to do with the UIFC code
    incorrectly converting values.

    hummm... interesting... the system was installed from SVN and updated once from
    SVN by doing another update and install from SVN instead of following the wiki update procedure... only three config files had to be replaced, though... everything else seemed to be up to date and working properly... that last update was only a month or two ago...

    )\/(ark

    --- FMail/Win32 1.60
    * Origin: (1:3634/12.71)
    ž Synchronet ž Vertrauen ž Home of Synchronet ž telnet://vert.synchro.net
  • From MCMLXXIX@VERT to mark lewis on Fri Nov 22 12:42:09 2013
    Re: Javascript issues
    By: mark lewis to MCMLXXIX on Thu Nov 21 2013 20:36:59

    hummm... interesting... the system was installed from SVN and updated once f SVN by doing another update and install from SVN instead of following the wi update procedure... only three config files had to be replaced, though... everything else seemed to be up to date and working properly... that last update was only a month or two ago...

    you mean CVS, i presume. when you say you did an install from svn, do you mean you updated your js files? or do you mean you compiled the bbs from source. are you running sbbs on linux or windows? if you are running on windows, and no specific reason not to update to the latest build, i recommend grabbing sbbs_dev.zip from ftp://synchro.net and putting that shite in place (and do a full backup beforehand).

    ---
    ž Synchronet ž The BRoKEN BuBBLE (bbs.thebrokenbubble.com)
  • From mark lewis@VERT to MCMLXXIX on Fri Nov 22 19:26:06 2013
    On Fri, 22 Nov 2013, MCMLXXIX wrote to mark lewis:


    hummm... interesting... the system was installed from SVN and
    updated once f
    SVN by doing another update and install from SVN instead of
    following the wi
    update procedure... only three config files had to be replaced,
    though... everything else seemed to be up to date and working
    properly... that last update was only a month or two ago...

    you mean CVS, i presume.

    yeah, whatever the source code versioning software is ;)

    when you say you did an install from svn,

    i didn't do it... my friend did for their system... i have full admin and physical access to the box and everything on it...

    do you mean you updated your js files? or do you mean you compiled
    the bbs from source. are you running sbbs on linux or windows? if
    you are running on windows, and no specific reason not to update to
    the latest build, i recommend grabbing sbbs_dev.zip from
    ftp://synchro.net and putting that shite in place (and do a full
    backup beforehand).

    let me start of by saying "no winwhatever is trusted around these parts for mission critical processes" ;)

    so, from the top...

    my friend decided they wanted to take a look at synchronet for business purposes... they approached me to host the setup, look over their shoulder, and
    help admin the installation... with that we tasked an older box that was sitting idle with a fully updated ubuntu 8 LTS installation... a wiki page was followed where a directory was set up for the user that the bbs was to operate as and the initial make file was downloaded and executed... there was something
    else that had to be downloaded and built first, IIRC... i think that was the javascript engine but really don't know at this point in time... the make ran and at the end, everything seemed to be completed so my friend set about configuring everything for message processing... after some minor stumbling, they finally got all the message areas for the fidonet backbone and the additional areas my net and my system offer... they then sent an areafix with reescan and pulled in some 200000+ messages to populate the system with... everything worked pretty well so they started working with other aspects of the
    software.. one thing they cleaned up was the html code for the ftp page (IIRC)... it was missing closing tags and had some tags out of sequence... but that was nothing major... some months later they decided to update the system from SVN but they forgot that the procedure was different than a new install...
    because they forgot this they ran the initial make process all over again... at
    the end they realized what they had done and with a few questions in here answered, we were able to get the three or four config files back in place and the system is still running like that...

    so now, the question is this... with a full make processing being run a second time, that process performing a SVN update, why would it miss out on updating the js files if that's where the problem is?

    we have discussed doing another update but this time following the wiki page's update procedure... won't that also update the js files?

    FWIW: here's the wiki page link that was used to start with and is planned on being used again for the update procedure...

    http://wiki.synchro.net/install:nix

    )\/(ark

    --- FMail/Win32 1.60
    * Origin: (1:3634/12.71)
    ž Synchronet ž Vertrauen ž Home of Synchronet ž telnet://vert.synchro.net
  • From MCMLXXIX@VERT to mark lewis on Sat Nov 23 09:58:08 2013
    Re: Javascript issues
    By: mark lewis to MCMLXXIX on Fri Nov 22 2013 19:26:06

    so now, the question is this... with a full make processing being run a seco time, that process performing a SVN update, why would it miss out on updatin the js files if that's where the problem is?

    there was a lot in that message, so ill just address this :|

    it's more likely that it's the build of sbbs that is causing the problem, and not the scripts being out of date. the problem, when i was experiencing it myself, was addressed 6 months ago and seems to have been fixed, at least for me.. which tells me your build is outdated by at least 6 months. if it's not, then you could try updating all of the scripts (sbbs/exec/*.js && sbbs/exec/load/*.js) and see if that helps.

    if that still doesnt help, we can take it from there, eh?

    ---
    ž Synchronet ž The BRoKEN BuBBLE (bbs.thebrokenbubble.com)
  • From mark lewis@VERT to MCMLXXIX on Sat Nov 23 12:49:23 2013
    On Sat, 23 Nov 2013, MCMLXXIX wrote to mark lewis:

    Re: Javascript issues
    By: mark lewis to MCMLXXIX on Fri Nov 22 2013 19:26:06

    so now, the question is this... with a full make processing being
    run a seco
    time, that process performing a SVN update, why would it miss out
    on updatin
    the js files if that's where the problem is?

    there was a lot in that message, so ill just address this :|

    yeah, i know... i started to go back and break it out into a numbered list to make it easier but conversational mode was easier to get down on phosphour ;)

    it's more likely that it's the build of sbbs that is causing the
    problem,

    hummm...

    and not the scripts being out of date. the problem, when i
    was experiencing it myself, was addressed 6 months ago and seems to
    have been fixed, at least for me.. which tells me your build is
    outdated by at least 6 months.

    yeah, not 6 months out...

    sbbs@darkstar:/sbbs/ctrl$ ls -la /sbbs/exec/sbbs
    lrwxrwxrwx 1 sbbs sbbs 40 2013-09-30 07:58 /sbbs/exec/sbbs -> /sbbs/src/sbbs3/gcc.linux.exe.debug/sbbs

    we compiled to debug mode this time because previously there had been hangs and
    the nodes would not restart... we had to reboot the whole box and even then sbbs wouldn't shutdown and we'd have to force the reboot via the big read switch...

    if it's not, then you could try updating all of the scripts (sbbs/exec/*.js && sbbs/exec/load/*.js) and see if that helps.

    what would be the easiest way to do that?

    if that still doesnt help, we can take it from there, eh?

    we're thinking about doing the update from the wiki today or tomorrow and seeing what happens then... we archive everything first and will also save a listing of the files in those areas so we can compare them after the update...

    following the wiki update should update all the binary sources and all of the scripts, should it not??

    i started to list all the js files from those two directories but there were 176 of them... 101 in exec and 75 in exec/load... i figured that was too much for this post but can post them in another message or two if wanted for comparison...

    thanks for your help :)

    )\/(ark

    --- FMail/Win32 1.60
    * Origin: (1:3634/1