Unrecognized Options Running Basex in Docker Container
Friday, 29 January 2016 · 5 messages
EK
Eliot Kimber29 Jan 2016 02:10 #
I'm seeing a difference in how the .basex file is processed between running a server under OS X directly and running it in a Docker container. In particular, my local settings are being rejected as unrecognized.
Here's the startup messages from within the basex container:
basex@611404b26b04:~$ basexhttp
/home/basex/.basex: Unknown option 'CATFILE'.
/home/basex/.basex: Unknown option 'DTD'.
/home/basex/.basex: Unknown option '
SKIPCORRUPT'.
/home/basex/.basex: Unknown option 'CHOP'.
/home/basex/.basex: writing new configuration file.
[main] INFO org.eclipse.jetty.server.Server - jetty-8.1.17.v20150415 [main] INFO org.eclipse.jetty.webapp.StandardDescriptorProcessor - NO JSP Support for /, did not find org.apache.jasper.servlet.JspServlet BaseX 8.3 [Server]
Server was started (port: 1984).
[main] INFO org.eclipse.jetty.server.AbstractConnector - Started SelectChannelConnector at 0.0.0.0:8984
HTTP Server was started (port: 8984).
I verified that with the same .basex file running 8.3 under OS X the options are recognized and set as expected.
What would cause this difference in behavior?
Here is the .basex file in the /home/basex directory when the server starts:
USER = admin
PASSWORD = admin
DEBUG = false
DBPATH = /home/basex/basex/data
REPOPATH = /home/basex/basex/repo
LANG = English
LANGKEYS = false
GLOBALLOCK = false
# Client/Server Architecture
HOST = localhost
PORT = 1984
SERVERPORT = 1984
SERVERHOST =
PROXYHOST =
PROXYPORT = 0
NONPROXYHOSTS =
IGNORECERT = false
TIMEOUT = 30
KEEPALIVE = 600
PARALLEL = 8
LOG = true
LOGMSGMAXLEN = 1000
# HTTP Services
WEBPATH = /home/basex/basex/webapp
RESTPATH =
RESTXQPATH =
CACHERESTXQ = false
HTTPLOCAL = false
STOPPORT = 8985
AUTHMETHOD = Basic
# Local options
CATFILE = /opt/dita-ot/DITA-OT/catalog-dita.xml
DTD = true
SKIPCORRUPT = true
CHOP = false
-- (this is the end of the file) --
After the server starts the offending options are omitted from the rewritten .basex file.
The only difference I can think of is the Java version. The container uses the OpenJDK while I have Oracle Java running in OS X:
basex@611404b26b04:~$ java -version
openjdk version "1.8.0_66-internal"
OpenJDK Runtime Environment (build 1.8.0_66-internal-b17)
OpenJDK 64-Bit Server VM (build 25.66-b17, mixed mode)
basex@611404b26b04:~$
But otherwise it's exactly the same code running in both environments and the same config file.
Thanks,
Eliot
----
Eliot Kimber, Owner
Contrext, LLC
http://contrext.comEK
Eliot Kimber29 Jan 2016 02:30 #
Another bit of info.
If I interact with the server from within the container, e.g., connect to the basex server using the basexclient, I can set and get options but they are not reflected in the DBA app:
Quoted text · Eliot Kimber · 1 line
> open test-02
Database 'test-02' was not found.
[I then create test-02 using the DBA Web app to prove
Quoted text · Eliot Kimber · 2 lines
I'm talking to the same server] > open test-02
Database 'test-02' was opened in 0.68 ms.
Quoted text · Eliot Kimber · 3 lines
> set chop false CHOP: false > get chop
CHOP: false
But if I refresh the page for test-02 in the DBA app, it still shows a check for chop.
So something seems to be up with local options.
I verified that I can add data to the database itself.
Thanks,
E.
----
Eliot Kimber, Owner
Contrext, LLC
http://contrext.com
On 1/28/16, 6:10 PM, "Eliot Kimber"
<basex-talk-bounces at mailman.uni-konstanz.de on behalf of
Quoted text · Eliot Kimber · 102 lines
ekimber at contrext.com> wrote: >I'm seeing a difference in how the .basex file is processed between >running a server under OS X directly and running it in a Docker container. >In particular, my local settings are being rejected as unrecognized. > >Here's the startup messages from within the basex container: > >basex@611404b26b04:~$ basexhttp >/home/basex/.basex: Unknown option 'CATFILE'. >/home/basex/.basex: Unknown option 'DTD'. >/home/basex/.basex: Unknown option 'SKIPCORRUPT'. >/home/basex/.basex: Unknown option 'CHOP'. >/home/basex/.basex: writing new configuration file. >[main] INFO org.eclipse.jetty.server.Server - jetty-8.1.17.v20150415 >[main] INFO org.eclipse.jetty.webapp.StandardDescriptorProcessor - NO JSP >Support for /, did not find org.apache.jasper.servlet.JspServlet >BaseX 8.3 [Server] >Server was started (port: 1984). >[main] INFO org.eclipse.jetty.server.AbstractConnector - Started >SelectChannelConnector at 0.0.0.0:8984 >HTTP Server was started (port: 8984). > >I verified that with the same .basex file running 8.3 under OS X the >options are recognized and set as expected. > > >What would cause this difference in behavior? > >Here is the .basex file in the /home/basex directory when the server >starts: > >USER = admin >PASSWORD = admin >DEBUG = false >DBPATH = /home/basex/basex/data >REPOPATH = /home/basex/basex/repo >LANG = English >LANGKEYS = false >GLOBALLOCK = false > > ># Client/Server Architecture >HOST = localhost >PORT = 1984 >SERVERPORT = 1984 >SERVERHOST = >PROXYHOST = >PROXYPORT = 0 >NONPROXYHOSTS = >IGNORECERT = false >TIMEOUT = 30 >KEEPALIVE = 600 >PARALLEL = 8 >LOG = true >LOGMSGMAXLEN = 1000 > > ># HTTP Services >WEBPATH = /home/basex/basex/webapp >RESTPATH = >RESTXQPATH = >CACHERESTXQ = false >HTTPLOCAL = false >STOPPORT = 8985 >AUTHMETHOD = Basic > > ># Local options >CATFILE = /opt/dita-ot/DITA-OT/catalog-dita.xml >DTD = true >SKIPCORRUPT = true >CHOP = false >-- (this is the end of the file) -- > > >After the server starts the offending options are omitted from the >rewritten .basex file. > >The only difference I can think of is the Java version. The container uses >the OpenJDK while I have Oracle Java running in OS X: > >basex@611404b26b04:~$ java -version >openjdk version "1.8.0_66-internal" >OpenJDK Runtime Environment (build 1.8.0_66-internal-b17) >OpenJDK 64-Bit Server VM (build 25.66-b17, mixed mode) >basex@611404b26b04:~$ > >But otherwise it's exactly the same code running in both environments and >the same config file. > >Thanks, > >Eliot > >---- >Eliot Kimber, Owner >Contrext, LLC >http://contrext.com > > > >
CG
Difficult to tell what may go wrong.. What is output if you start basexhttp in debugging mode (with -d)?
Quoted text · Eliot Kimber · 102 lines
Am 29.01.2016 1:10 vorm. schrieb "Eliot Kimber" <ekimber at contrext.com>: > > I'm seeing a difference in how the .basex file is processed between > running a server under OS X directly and running it in a Docker container. > In particular, my local settings are being rejected as unrecognized. > > Here's the startup messages from within the basex container: > > basex@611404b26b04:~$ basexhttp > /home/basex/.basex: Unknown option 'CATFILE'. > /home/basex/.basex: Unknown option 'DTD'. > /home/basex/.basex: Unknown option 'SKIPCORRUPT'. > /home/basex/.basex: Unknown option 'CHOP'. > /home/basex/.basex: writing new configuration file. > [main] INFO org.eclipse.jetty.server.Server - jetty-8.1.17.v20150415 > [main] INFO org.eclipse.jetty.webapp.StandardDescriptorProcessor - NO JSP > Support for /, did not find org.apache.jasper.servlet.JspServlet > BaseX 8.3 [Server] > Server was started (port: 1984). > [main] INFO org.eclipse.jetty.server.AbstractConnector - Started > SelectChannelConnector at 0.0.0.0:8984 > HTTP Server was started (port: 8984). > > I verified that with the same .basex file running 8.3 under OS X the > options are recognized and set as expected. > > > What would cause this difference in behavior? > > Here is the .basex file in the /home/basex directory when the server > starts: > > USER = admin > PASSWORD = admin > DEBUG = false > DBPATH = /home/basex/basex/data > REPOPATH = /home/basex/basex/repo > LANG = English > LANGKEYS = false > GLOBALLOCK = false > > > # Client/Server Architecture > HOST = localhost > PORT = 1984 > SERVERPORT = 1984 > SERVERHOST = > PROXYHOST = > PROXYPORT = 0 > NONPROXYHOSTS = > IGNORECERT = false > TIMEOUT = 30 > KEEPALIVE = 600 > PARALLEL = 8 > LOG = true > LOGMSGMAXLEN = 1000 > > > # HTTP Services > WEBPATH = /home/basex/basex/webapp > RESTPATH = > RESTXQPATH = > CACHERESTXQ = false > HTTPLOCAL = false > STOPPORT = 8985 > AUTHMETHOD = Basic > > > # Local options > CATFILE = /opt/dita-ot/DITA-OT/catalog-dita.xml > DTD = true > SKIPCORRUPT = true > CHOP = false > -- (this is the end of the file) -- > > > After the server starts the offending options are omitted from the > rewritten .basex file. > > The only difference I can think of is the Java version. The container uses > the OpenJDK while I have Oracle Java running in OS X: > > basex@611404b26b04:~$ java -version > openjdk version "1.8.0_66-internal" > OpenJDK Runtime Environment (build 1.8.0_66-internal-b17) > OpenJDK 64-Bit Server VM (build 25.66-b17, mixed mode) > basex@611404b26b04:~$ > > But otherwise it's exactly the same code running in both environments and > the same config file. > > Thanks, > > Eliot > > ---- > Eliot Kimber, Owner > Contrext, LLC > http://contrext.com > > >
EK
Eliot Kimber29 Jan 2016 17:53 #
Looks like debug gives no extra info:
basex@f2c1e3d6f9db:~$ basexhttp -d/home/basex/.basex: Unknown option 'CATFILE'.
/home/basex/.basex: Unknown option 'DTD'.
/home/basex/.basex: Unknown option '
SKIPCORRUPT'.
/home/basex/.basex: Unknown option 'CHOP'.
/home/basex/.basex: writing new configuration file.
DEBUG: true
[main] INFO org.eclipse.jetty.server.Server - jetty-8.1.17.v20150415
[main] INFO org.eclipse.jetty.webapp.StandardDescriptorProcessor - NO JSP Support for /, did not find org.apache.jasper.servlet.JspServlet
WEBPATH: /opt/basex/webapp
DEBUG: true
BaseX 8.3 [Server]
Server was started (port: 1984).
[main] INFO org.eclipse.jetty.server.AbstractConnector - Started SelectChannelConnector at 0.0.0.0:8984
HTTP Server was started (port: 8984).
I did have a problem at one point where I didn't have my file system permissions set correctly and got a "cannot write .basex file" message and debug showed me a java traceback but I resolved that issue.
Cheers,
E.
----
Eliot Kimber, Owner
Contrext, LLC
http://contrext.comQuoted text · Christian Grün · 112 lines
From: Christian Grün <christian.gruen at gmail.com> Date: Friday, January 29, 2016 at 2:20 AM To: Eliot Kimber <ekimber at contrext.com> Cc: "basex-talk at mailman.uni-konstanz.de" <basex-talk at mailman.uni-konstanz.de> Subject: Re: [basex-talk] Unrecognized Options Running Basex in Docker Container Difficult to tell what may go wrong.. What is output if you start basexhttp in debugging mode (with -d)? Am 29.01.2016 1:10 vorm. schrieb "Eliot Kimber" <ekimber at contrext.com>: > > I'm seeing a difference in how the .basex file is processed between > running a server under OS X directly and running it in a Docker container. > In particular, my local settings are being rejected as unrecognized. > > Here's the startup messages from within the basex container: > > basex@611404b26b04:~$ basexhttp > /home/basex/.basex: Unknown option 'CATFILE'. > /home/basex/.basex: Unknown option 'DTD'. > /home/basex/.basex: Unknown option 'SKIPCORRUPT'. > /home/basex/.basex: Unknown option 'CHOP'. > /home/basex/.basex: writing new configuration file. > [main] INFO org.eclipse.jetty.server.Server - jetty-8.1.17.v20150415 > [main] INFO org.eclipse.jetty.webapp.StandardDescriptorProcessor - NO JSP > Support for /, did not find org.apache.jasper.servlet.JspServlet > BaseX 8.3 [Server] > Server was started (port: 1984). > [main] INFO org.eclipse.jetty.server.AbstractConnector - Started > SelectChannelConnector at 0.0.0.0:8984 <http://SelectChannelConnector at 0.0.0.0:8984> > HTTP Server was started (port: 8984). > > I verified that with the same .basex file running 8.3 under OS X the > options are recognized and set as expected. > > > What would cause this difference in behavior? > > Here is the .basex file in the /home/basex directory when the server > starts: > > USER = admin > PASSWORD = admin > DEBUG = false > DBPATH = /home/basex/basex/data > REPOPATH = /home/basex/basex/repo > LANG = English > LANGKEYS = false > GLOBALLOCK = false > > > # Client/Server Architecture > HOST = localhost > PORT = 1984 > SERVERPORT = 1984 > SERVERHOST = > PROXYHOST = > PROXYPORT = 0 > NONPROXYHOSTS = > IGNORECERT = false > TIMEOUT = 30 > KEEPALIVE = 600 > PARALLEL = 8 > LOG = true > LOGMSGMAXLEN = 1000 > > > # HTTP Services > WEBPATH = /home/basex/basex/webapp > RESTPATH = > RESTXQPATH = > CACHERESTXQ = false > HTTPLOCAL = false > STOPPORT = 8985 > AUTHMETHOD = Basic > > > # Local options > CATFILE = /opt/dita-ot/DITA-OT/catalog-dita.xml > DTD = true > SKIPCORRUPT = true > CHOP = false > -- (this is the end of the file) -- > > > After the server starts the offending options are omitted from the > rewritten .basex file. > > The only difference I can think of is the Java version. The container uses > the OpenJDK while I have Oracle Java running in OS X: > > basex@611404b26b04:~$ java -version > openjdk version "1.8.0_66-internal" > OpenJDK Runtime Environment (build 1.8.0_66-internal-b17) > OpenJDK 64-Bit Server VM (build 25.66-b17, mixed mode) > basex@611404b26b04:~$ > > But otherwise it's exactly the same code running in both environments and > the same config file. > > Thanks, > > Eliot > > ---- > Eliot Kimber, Owner > Contrext, LLC > http://contrext.com > > >
EK
Eliot Kimber29 Jan 2016 22:14 #
I appears to have been an issue with the configuration file itself (probably a Windows vs Linux line endings problem).
When I took Michael Seiferle's advice and appended my settings to the base catalog, rather than replacing it entirely, it worked as expected.
I've replaced my use of my own basex Docker image with the version Michael is maintaining (basex/basexhttp). One less thing for me to worry about :-)
Cheers,
E.
----
Eliot Kimber, Owner
Contrext, LLC
http://contrext.com
Quoted text · Eliot Kimber · 146 lines
From: <basex-talk-bounces at mailman.uni-konstanz.de> on behalf of Eliot Kimber <ekimber at contrext.com> Date: Friday, January 29, 2016 at 9:53 AM To: "basex-talk at mailman.uni-konstanz.de" <basex-talk at mailman.uni-konstanz.de> Subject: Re: [basex-talk] Unrecognized Options Running Basex in Docker Container Looks like debug gives no extra info: basex@f2c1e3d6f9db:~$ basexhttp -d /home/basex/.basex: Unknown option 'CATFILE'. /home/basex/.basex: Unknown option 'DTD'. /home/basex/.basex: Unknown option 'SKIPCORRUPT'. /home/basex/.basex: Unknown option 'CHOP'. /home/basex/.basex: writing new configuration file. DEBUG: true [main] INFO org.eclipse.jetty.server.Server - jetty-8.1.17.v20150415 [main] INFO org.eclipse.jetty.webapp.StandardDescriptorProcessor - NO JSP Support for /, did not find org.apache.jasper.servlet.JspServlet WEBPATH: /opt/basex/webapp DEBUG: true BaseX 8.3 [Server] Server was started (port: 1984). [main] INFO org.eclipse.jetty.server.AbstractConnector - Started SelectChannelConnector at 0.0.0.0:8984 HTTP Server was started (port: 8984). I did have a problem at one point where I didn't have my file system permissions set correctly and got a "cannot write .basex file" message and debug showed me a java traceback but I resolved that issue. Cheers, E. ---- Eliot Kimber, Owner Contrext, LLC http://contrext.com From: Christian Grün <christian.gruen at gmail.com> Date: Friday, January 29, 2016 at 2:20 AM To: Eliot Kimber <ekimber at contrext.com> Cc: "basex-talk at mailman.uni-konstanz.de" <basex-talk at mailman.uni-konstanz.de> Subject: Re: [basex-talk] Unrecognized Options Running Basex in Docker Container Difficult to tell what may go wrong.. What is output if you start basexhttp in debugging mode (with -d)? Am 29.01.2016 1:10 vorm. schrieb "Eliot Kimber" <ekimber at contrext.com>: > > I'm seeing a difference in how the .basex file is processed between > running a server under OS X directly and running it in a Docker container. > In particular, my local settings are being rejected as unrecognized. > > Here's the startup messages from within the basex container: > > basex@611404b26b04:~$ basexhttp > /home/basex/.basex: Unknown option 'CATFILE'. > /home/basex/.basex: Unknown option 'DTD'. > /home/basex/.basex: Unknown option 'SKIPCORRUPT'. > /home/basex/.basex: Unknown option 'CHOP'. > /home/basex/.basex: writing new configuration file. > [main] INFO org.eclipse.jetty.server.Server - jetty-8.1.17.v20150415 > [main] INFO org.eclipse.jetty.webapp.StandardDescriptorProcessor - NO JSP > Support for /, did not find org.apache.jasper.servlet.JspServlet > BaseX 8.3 [Server] > Server was started (port: 1984). > [main] INFO org.eclipse.jetty.server.AbstractConnector - Started > SelectChannelConnector at 0.0.0.0:8984 <http://SelectChannelConnector at 0.0.0.0:8984> > HTTP Server was started (port: 8984). > > I verified that with the same .basex file running 8.3 under OS X the > options are recognized and set as expected. > > > What would cause this difference in behavior? > > Here is the .basex file in the /home/basex directory when the server > starts: > > USER = admin > PASSWORD = admin > DEBUG = false > DBPATH = /home/basex/basex/data > REPOPATH = /home/basex/basex/repo > LANG = English > LANGKEYS = false > GLOBALLOCK = false > > > # Client/Server Architecture > HOST = localhost > PORT = 1984 > SERVERPORT = 1984 > SERVERHOST = > PROXYHOST = > PROXYPORT = 0 > NONPROXYHOSTS = > IGNORECERT = false > TIMEOUT = 30 > KEEPALIVE = 600 > PARALLEL = 8 > LOG = true > LOGMSGMAXLEN = 1000 > > > # HTTP Services > WEBPATH = /home/basex/basex/webapp > RESTPATH = > RESTXQPATH = > CACHERESTXQ = false > HTTPLOCAL = false > STOPPORT = 8985 > AUTHMETHOD = Basic > > > # Local options > CATFILE = /opt/dita-ot/DITA-OT/catalog-dita.xml > DTD = true > SKIPCORRUPT = true > CHOP = false > -- (this is the end of the file) -- > > > After the server starts the offending options are omitted from the > rewritten .basex file. > > The only difference I can think of is the Java version. The container uses > the OpenJDK while I have Oracle Java running in OS X: > > basex@611404b26b04:~$ java -version > openjdk version "1.8.0_66-internal" > OpenJDK Runtime Environment (build 1.8.0_66-internal-b17) > OpenJDK 64-Bit Server VM (build 25.66-b17, mixed mode) > basex@611404b26b04:~$ > > But otherwise it's exactly the same code running in both environments and > the same config file. > > Thanks, > > Eliot > > ---- > Eliot Kimber, Owner > Contrext, LLC > http://contrext.com > > >
Written for BaseX 8.3. BaseX may have changed since: please check the current documentation.
⚡Generated with XQuery