Oops... In my prior message I meant that the basexserver.bat script only starts
the service on port 1984 not 8984.
Sorry for the unseen error. BTW, it is the case that when you do the
basexhttp.bat script on the command-line without the '-S' option, the response
messages streamed to the command line include a message that the server on 1984
started along with the http server on 8984. When you invoke this script with
the '-S' option, only a short message informs you that the server on 8984 has
started. Perhaps it would be possible to return the message that the server on
port 1984 started, too?
-: Jim :-
-----Original Message-----
From: BaseX-Talk <[email protected]> On Behalf Of Jim
Salmons
Sent: Friday, March 29, 2019 1:16 PM
To: 'Marco Lettere' <[email protected]>; [email protected]
Subject: Re: [basex-talk] Quick Windows issue: Invalid reply on port 1984,
works fine on port 8984
Hi Marco!
Your tip put me on the right track... I have a handle on how things work now
and, so, I'll share my understanding in hope that it helps another nooby dev,
especially if under Windows...
CONTEXT: I am pretty sure that my confusion came from working through the
Startup page of the Getting Started section of the wiki,
http://docs.basex.org/wiki/Startup. There are a number of different modes for
running BaseX and each page section gives a tip bullet list of how to invoke
these modes. Working through the page, both by double-clicking Windows desktop
icons and issuing batch commands in command prompt and Powershell windows, I
was inadvertently stopping and starting various combinations of server, http
server, standalone, etc. And since there were no directly labeled processes or
services that said anything about BaseX, I was in the dark about what was
starting, stopping, and running when inspecting Windows' Task Manager.
Given Marco's tip and rereading the bullet points of the wiki's Startup page, I
now understand "who's on first" in terms of what's running and serving which
ports. My confusion on Windows was that when you issue the basexserver.bat
command at a command prompt, you only start the server:8984 while the "BaseX
Sever (Start)" icon on Windows runs the basexhttp.bat script with the '-S'
option thus starting BOTH the basic and the http servers (although the
command-line messages only mention the HTTP server starting on 8984).
I had so many things starting and stopping hither and yon that I was my own
worst enemy in terms of entry learning.
I now have my "sea legs" and am plowing into the Python API so I can start to
integrate BaseX with my research toolkit.
Thanks, Marco, for the clarifying tip. :-)
Happy-Healthy Vibes from Colorado,
-: Jim :-
-----Original Message-----
From: BaseX-Talk <[email protected]> On Behalf Of
Marco Lettere
Sent: Friday, March 29, 2019 1:56 AM
To: [email protected]
Subject: Re: [basex-talk] Quick Windows issue: Invalid reply on port 1984,
works fine on port 8984
Hi Jim,
I think port 1984 is not meant to be connected to over HTTP. It's a pure socket
connection that ships BaseX internal client-server protocol.
When you connect to that port you probably have to use the Python client API in
order to get your BaseX COMMANDS (not HTTP requests) serialized over the wire.
Hope this helps [cit.].
Regards,
M.
On 28/03/19 23:28, Jim Salmons wrote:
> Hello BaseX folk,
>
> I have just installed version 9.1.2 and am starting to learn BaseX in
> support of my post-cancer #PayItForward Bonus Round #CitizenScientist
> research in #DigitalHumanities and #MachineLearning. My goal is to
> "cut out the middleman" of writing intermediate JSON and XML fragment
> files in order to update the #MAGAZINEgts ground-truth storage file
> that I am developing for a digital collection of Softalk Apple magazine at
> the Internet Archive.
> With BaseX and its Python interface, I want to write new and updated
> document structure and content depiction metadata directly to a local
> copy of this ground-truth master file which will then be easily popped
> out of the database as an XML file for uploading to the Softalk Apple
> collection at the Internet Archive.
>
> I hit a bump, reported to the Github Issue queue, where my Windows 10
> installation can not open the BaseX GUI exe launcher. The work-around,
> as noted in my issue report, is to use the Getting Started advice to
> execute the jar directly. By creating a desktop icon that launches the
> execuable jar in the installation folder, the GUI launches as expected.
>
> With that minor issue behind me, I am wondering why my attempts to
> connect to the server via localhost:1984 port does not work while
> everything is fine and dandy when hitting port 8984. Port 1984 returns
> an invalid HTTP response. (Note: Other ports that are not assigned to
> anything else return a connection refused, so this invalid response is
> not the same as the server not being there.)
>
> If I keep a Powershell window open with the server running, every once
> in a while (after several minutes or more) the server throws this error:
>
> java.lang.NullPointerException
> at org.basex.core.Context.perm(Context.java:252)
> at org.basex.core.Command.run(Command.java:250)
> at org.basex.core.Command.run(Command.java:143)
> at org.basex.core.cmd.Close.close(Close.java:54)
> at org.basex.server.ClientListener.close(ClientListener.java:232)
> at org.basex.BaseXServer$1.run(BaseXServer.java:157)
> at java.base/java.util.TimerThread.mainLoop(Timer.java:556)
> at java.base/java.util.TimerThread.run(Timer.java:506)
>
> which may be related to port 1984 not responding, a firewall issue perhaps?
> Honestly, I don't see anything that looks like a BaseX process or
> service running in Task Manager (other than a generic 'Java(TM) Platform SE
> binary'
> process, and there is nothing that looks related in the Windows
> Firewall entries. I'm still investigating this here, but if anyone
> knows what is akimbo, I would greatly appreciate your advice.
>
> Thank you... and looking forward to being a new BaseX community
> member. :-)
>
> Happy-Healthy Vibes,
> -: Jim Salmons :-
>
> Jim Salmons
> Twitter: @Jim_Salmons
>
> https://www.researchgate.net/profile/Jim_Salmons (my
> #CitizenScientist
> profile)
> www.medium.com/@Jim_Salmons/ (my mostly #DigitalHumanities
> writing)
>
>