Re: HSQL Server on Linux

Fred Toussi via Hsqldb-user <[email protected]> Sun, 31 Dec 2017 20:31:06 +0000
Newsgroups gmane.comp.java.hsqldb.user
Message-ID <1514752266.2946550.1220432336.2EEB518D@webmail.messagingengine.com>
Hi Andreas,

I think the problem is here:

urlid test
url jdbc:hsqldb:hsql://localhost
username SA
password

The urlid is a handle you have defined for SqlTool. You need to specify the name that corresponds to server.dbname.0 on the URL itself like this:

urlid testserver
url jdbc:hsqldb:hsql://localhost/test
username SA
password

Regards

Fred


On Sun, Dec 31, 2017, at 16:39, Andreas Säger wrote:
> Hi,
> 
> I have some databases I used to use with Ubuntu 16.4, LibreOffice and
> HSQL 2.3.4 in /home/andreas/hsql/database/ and now I'd like to implement
> a service with only one of these databases.
> 
> I copied the hsqldb.init script from the samples to /etc/init.d and left
> it unchanged.
> 
> I copied the hsqldb.service from the samples to /etc and left it unchanged.
> 
> /etc/hsqldb.conf looks like this (I grepped out all uncommented lines):
> JAVA_EXECUTABLE=/usr/bin/java
> SQLTOOL_JAR_PATH=/home/andreas/hsql/driver/sqltool.jar
> SERVER_HOME=/home/andreas/hsql/
> HSQLDB_OWNER=andreas
> URLIDS=test
> AUTH_FILE=/home/andreas/hsql/sqltool.rc
> 
> /home/andreas/hsql/sqltool.rc looks like this:
> urlid test
> url jdbc:hsqldb:hsql://localhost
> username SA
> password
> 
> And finally the server.properties:
> server.address=127.0.0.1
> server.acl=/home/andreas/hsql/acl.txt
> server.database.0=/home/andreas/hsql/database/Meera;ifexists=true
> server.dbname.0=test
> 
> Oh, and the acl.txt:
> allow 127.0.0.1
> allow 192.168.15.0/24
> 
> $ sudo service hsqldb start
> > Job for hsqldb.init.service failed because the control process exited with error code. See "systemctl status hsqldb.init.service" and "journalctl -xe" for details.
> 
> times out with the above error message but the service is availlable
> anyway. I can connect my client (a LibreOffice Base doc) to
> jdbc:hsqldb:hsql://localhost/test and use the database.
> 
> $ journalctl -xe
> > -- 
> > -- A new session with the ID c19 has been created for the user andreas.
> > -- 
> > -- The leading process of the session is 16930.
> > Dez 31 17:08:30 andreas-ThinkPad-W510 systemd[1]: Started Session c19 of user andreas.
> > -- Subject: Unit session-c19.scope has finished start-up
> > -- Defined-By: systemd
> > -- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
> > -- 
> > -- Unit session-c19.scope has finished starting up.
> > -- 
> > -- The start-up result is done.
> > Dez 31 17:09:31 andreas-ThinkPad-W510 hsqldb.init[16922]: Failed instances:   [test]
> > Dez 31 17:09:31 andreas-ThinkPad-W510 hsqldb.init[16922]: Failed to start org.hsqldb.server.Server.
> > Dez 31 17:09:31 andreas-ThinkPad-W510 hsqldb.init[16922]: See log file '/var/log/hsqldb.log'.
> > Dez 31 17:09:31 andreas-ThinkPad-W510 systemd[1]: hsqldb.init.service: Control process exited, code=exited status=1
> > Dez 31 17:09:31 andreas-ThinkPad-W510 systemd[1]: Failed to start LSB: HyperSQL Database Server.
> > -- Subject: Unit hsqldb.init.service has failed
> > -- Defined-By: systemd
> > -- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
> > -- 
> > -- Unit hsqldb.init.service has failed.
> > -- 
> > -- The result is failed.
> > Dez 31 17:09:31 andreas-ThinkPad-W510 systemd[1]: hsqldb.init.service: Unit entered failed state.
> > Dez 31 17:09:31 andreas-ThinkPad-W510 systemd[1]: hsqldb.init.service: Failed with result 'exit-code'.
> > Dez 31 17:09:31 andreas-ThinkPad-W510 sudo[16893]: pam_unix(sudo:session): session closed for user root
> > Dez 31 17:10:44 andreas-ThinkPad-W510 sudo[17372]:  andreas : TTY=pts/0 ; PWD=/home/andreas/hsql ; USER=root ; COMMAND=/usr/sbin/service hsqldb st
> > Dez 31 17:10:44 andreas-ThinkPad-W510 sudo[17372]: pam_unix(sudo:session): session opened for user root by (uid=0)
> > Dez 31 17:10:45 andreas-ThinkPad-W510 systemd[1]: Stopped LSB: HyperSQL Database Server.
> > -- Subject: Unit hsqldb.init.service has finished shutting down
> > -- Defined-By: systemd
> > -- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
> > -- 
> > -- Unit hsqldb.init.service has finished shutting down.
> > Dez 31 17:10:45 andreas-ThinkPad-W510 sudo[17372]: pam_unix(sudo:session): session closed for user root
> > Dez 31 17:10:55 andreas-ThinkPad-W510 su[16930]: pam_unix(su:session): session closed for user andreas
> > Dez 31 17:10:56 andreas-ThinkPad-W510 systemd-logind[1015]: Removed session c19.
> > -- Subject: Session c19 has been terminated
> > -- Defined-By: systemd
> > -- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
> > -- Documentation: http://www.freedesktop.org/wiki/Software/systemd/multiseat
> > -- 
> > -- A session with the ID c19 has been terminated.
> > Dez 31 17:16:19 andreas-ThinkPad-W510 wpa_supplicant[1257]: wlp3s0: WPA: Group rekeying completed with 34:81:c4:06:3e:a3 [GTK=CCMP]
> > Dez 31 17:17:01 andreas-ThinkPad-W510 CRON[17477]: pam_unix(cron:session): session opened for user root by (uid=0)
> > Dez 31 17:17:01 andreas-ThinkPad-W510 CRON[17478]: (root) CMD (   cd / && run-parts --report /etc/cron.hourly)
> > Dez 31 17:17:01 andreas-ThinkPad-W510 CRON[17477]: pam_unix(cron:session): session closed for user root
> 
> 
> $ systemctl status hsqldb.init.service
> > ● hsqldb.init.service - LSB: HyperSQL Database Server
> >    Loaded: loaded (/etc/init.d/hsqldb.init; bad; vendor preset: enabled)
> >    Active: failed (Result: exit-code) since So 2017-12-31 17:31:38 CET; 1min 3s ago
> >      Docs: man:systemd-sysv-generator(8)
> >   Process: 17706 ExecStart=/etc/init.d/hsqldb.init start (code=exited, status=1/FAILURE)
> > 
> > Dez 31 17:30:37 andreas-ThinkPad-W510 su[17714]: Successful su for andreas by root
> > Dez 31 17:30:37 andreas-ThinkPad-W510 su[17714]: + ??? root:andreas
> > Dez 31 17:30:37 andreas-ThinkPad-W510 su[17714]: pam_unix(su:session): session opened for user andreas by (uid=0)
> > Dez 31 17:31:38 andreas-ThinkPad-W510 hsqldb.init[17706]: Failed instances:   [test]
> > Dez 31 17:31:38 andreas-ThinkPad-W510 hsqldb.init[17706]: Failed to start org.hsqldb.server.Server.
> > Dez 31 17:31:38 andreas-ThinkPad-W510 hsqldb.init[17706]: See log file '/var/log/hsqldb.log'.
> > Dez 31 17:31:38 andreas-ThinkPad-W510 systemd[1]: hsqldb.init.service: Control process exited, code=exited status=1
> > Dez 31 17:31:38 andreas-ThinkPad-W510 systemd[1]: Failed to start LSB: HyperSQL Database Server.
> > Dez 31 17:31:38 andreas-ThinkPad-W510 systemd[1]: hsqldb.init.service: Unit entered failed state.
> > Dez 31 17:31:38 andreas-ThinkPad-W510 systemd[1]: hsqldb.init.service: Failed with result 'exit-code'.
> 
> $ tail /var/log/hsqldb.log
> > [Server@27716f4]: [Thread[HSQLDB Connection @33ff808a,5,HSQLDB Connections @27716f4]]: database alias= does not exist
> > [Server@27716f4]: [Thread[HSQLDB Connection @9df418c,5,HSQLDB Connections @27716f4]]: database alias= does not exist
> > [Server@27716f4]: [Thread[HSQLDB Connection @1c9d289f,5,HSQLDB Connections @27716f4]]: database alias= does not exist
> > [Server@27716f4]: [Thread[HSQLDB Connection @23ba22c1,5,HSQLDB Connections @27716f4]]: database alias= does not exist
> > [Server@27716f4]: [Thread[HSQLDB Connection @6c0e1dec,5,HSQLDB Connections @27716f4]]: database alias= does not exist
> > [Server@27716f4]: [Thread[HSQLDB Connection @1f2ef2c0,5,HSQLDB Connections @27716f4]]: database alias= does not exist
> > [Server@27716f4]: [Thread[HSQLDB Connection @6a02f86a,5,HSQLDB Connections @27716f4]]: database alias= does not exist
> > [Server@27716f4]: [Thread[HSQLDB Connection @18dc63c1,5,HSQLDB Connections @27716f4]]: database alias= does not exist
> > [Server@27716f4]: [Thread[HSQLDB Connection @4a1ec4b,5,HSQLDB Connections @27716f4]]: database alias= does not exist
> > [Server@27716f4]: [Thread[HSQLDB Connection @6c71a6ed,5,HSQLDB Connections @27716f4]]: database alias= does not exist
> 
> Where did I define a blank alias?
> 
> Happy new year,
> Andreas Säger
> 
> 
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> _______________________________________________
> Hsqldb-user mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/hsqldb-user

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Hsqldb-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/hsqldb-user