Here is some more information. I can now reproduce the problem and suspect it may be due to our version of java. These probelms began with our upgrade from Java 6.
[root@SHCBRMSTST202] [/home/rules] > java -version java version "1.7.0_45" Java(TM) SE Runtime Environment (build 1.7.0_45-b18) Java HotSpot(TM) 64-Bit Server VM (build 24.45-b08, mixed mode) Here is an example of starting the server repeatedly from the command line to observe the startup messages. Notice how there is a sequence when the TCP and PG servers fail to start. Then, after a few fails, it starts OK. [root@SHCBRMSTST202] [/home/rules] > /usr/java/latest/bin/java -Dname=CareH2d -cp /home/rules/h2/bin/h2.jar org.h2.tools.Server Web Console server running at http://localhost:8082 (only local connections) TCP server running at tcp://localhost:9092 (only local connections) PG server running at pg://localhost:5435 (only local connections) ^C [root@SHCBRMSTST202] [/home/rules] > /usr/java/latest/bin/java -Dname=CareH2d -cp /home/rules/h2/bin/h2.jar org.h2.tools.Server Web Console server running at http://localhost:8082 (only local connections) TCP server running at tcp://localhost:9092 (only local connections) PG server running at pg://localhost:5435 (only local connections) ^C [root@SHCBRMSTST202] [/home/rules] > /usr/java/latest/bin/java -Dname=CareH2d -cp /home/rules/h2/bin/h2.jar org.h2.tools.Server Web Console server running at http://localhost:8082 (only local connections) TCP server running at tcp://localhost:9092 (only local connections) PG server running at pg://localhost:5435 (only local connections) ^C [root@SHCBRMSTST202] [/home/rules] > /usr/java/latest/bin/java -Dname=CareH2d -cp /home/rules/h2/bin/h2.jar org.h2.tools.Server Web Console server running at http://localhost:8082 (only local connections) TCP server running at tcp://localhost:9092 (only local connections) PG server running at pg://localhost:5435 (only local connections) ^C [root@SHCBRMSTST202] [/home/rules] > /usr/java/latest/bin/java -Dname=CareH2d -cp /home/rules/h2/bin/h2.jar org.h2.tools.Server Web Console server running at http://localhost:8082 (only local connections) TCP server running at tcp://localhost:9092 (only local connections) PG server running at pg://localhost:5435 (only local connections) ^C [root@SHCBRMSTST202] [/home/rules] > /usr/java/latest/bin/java -Dname=CareH2d -cp /home/rules/h2/bin/h2.jar org.h2.tools.Server Web Console server running at http://localhost:8082 (only local connections) ^C [root@SHCBRMSTST202] [/home/rules] > /usr/java/latest/bin/java -Dname=CareH2d -cp /home/rules/h2/bin/h2.jar org.h2.tools.Server Web Console server running at http://localhost:8082 (only local connections) ^C [root@SHCBRMSTST202] [/home/rules] > /usr/java/latest/bin/java -Dname=CareH2d -cp /home/rules/h2/bin/h2.jar org.h2.tools.Server Web Console server running at http://localhost:8082 (only local connections) ^C [root@SHCBRMSTST202] [/home/rules] > /usr/java/latest/bin/java -Dname=CareH2d -cp /home/rules/h2/bin/h2.jar org.h2.tools.Server Web Console server running at http://localhost:8082 (only local connections) ^C [root@SHCBRMSTST202] [/home/rules] > /usr/java/latest/bin/java -Dname=CareH2d -cp /home/rules/h2/bin/h2.jar org.h2.tools.Server Web Console server running at http://localhost:8082 (only local connections) TCP server running at tcp://localhost:9092 (only local connections) PG server running at pg://localhost:5435 (only local connections) On Wed, Jan 15, 2014 at 9:06 AM, Dave Atkins <[email protected]> wrote: > When the server starts, the only logging I have found is a file in > /var/log/databasename.log which contains entries like: > TCP server running at tcp://xxx.xx.xx.xxx:9092 (only local connections) > PG server running at pg://xxx.xx.xx.xxx:5435 (only local connections) > Web Console server running at http://xxx.xx.xx.xxx:8082 (only local > connections) > TCP server running at tcp://xxx.xx.xx.xxx:9092 (only local connections) > PG server running at pg://xxx.xx.xx.xxx:5435 (only local connections) > Web Console server running at http://xxx.xx.xx.xxx:8082 (only local > connections) > Web Console server running at http://xxx.xx.xx.xxx:8082 (only local > connections) > Web Console server running at http://xxx.xx.xx.xxx:8082 (only local > connections) > > There are no timestamps so I don't know when each entry was made, but I > think what I should be seeing is 3 lines for each startup: PG, Web Console, > and TCP server running... So what I see instead, for the last 3 startups is > just the Web Console server running. > > I can attempt more restarts to see what happens, but this is a production > system and I want to avoid more trouble. As I recall, I did attempt 3 > restarts but then we found the file connection method and were able to > switch over our application to use that protocol. The server has been > running for a week in this mode. > > When I start the server...there is never any kind of message; it just says > the service was started. Then you can do a ps -ef | grep java and see it > running: > > rules 10880 1 55 Jan09 ? 3-03:33:48 > /usr/java/latest/bin/java -Dname=CareH2d -cp > /home/rules/h2/bin/h2-1.3.169.jar org.h2.tools.Server > > Then, you can attempt to connect via tcp: > > java -cp /home/rules/h2/bin/h2-1.3.169.jar org.h2.tools.Shell -url > jdbc:h2:tcp://localhost//home/rules/care -user sa > > This throws the exception: > Exception in thread "main" org.h2.jdbc.JdbcSQLException: Connection is > broken: "java.net.ConnectException: Connection refused: localhost" > [90067-169] > > So then, we change the connection string: > > java -cp /home/rules/h2/bin/h2-1.3.169.jar org.h2.tools.Shell -url > jdbc:h2:file://home/rules/care -user sa > > and I am able to connect to the database, execute queries, etc. > > It seems obvious to me that the tcp server is just not running. But apart > from restarting over and over until it starts up properly, what can I do? I > have 4 other servers that are for development and testing...sometimes (like > 1/10 restarts) I have this problem, but I cannot reliably reproduce it. We > have upgraded the jar to .174 and at our next code release, will deploy > that and go through the restart process again with the file connection > method as our fallback. > > > On Wed, Jan 15, 2014 at 1:44 AM, Thomas Mueller < > [email protected]> wrote: > >> Hi, >> >> The service starts, but the tcp server is not running. >>> >> >> Well, if the TCP server is not running, then the service did not start >> properly, right? I don't know how, but I guess there is a way to look at >> the output of the server, so see what the problem is? >> >> > It is possible to connect by the file method. >> >> That only means the database is not open. The TCP server only opens the >> database when a connection is open (not when the TCP server is started). >> >> Regards, >> Thomas >> >> >> >> >>> >>> The service is started with default options, from a script in >>> init.d...e.g. >>> >>> service careH2 start >>> >>> => >>> /usr/java/latest/bin/java -Dname=CareH2d -cp >>> /home/rules/h2/bin/h2-1.3.169.jar org.h2.tools.Server >>> >>> >>> >>> On Tue, Jan 14, 2014 at 1:47 PM, Thomas Mueller < >>> [email protected]> wrote: >>> >>>> Hi, >>>> >>>> How did you start the service? I would expect an exception there if it >>>> didn't work. >>>> >>>> Regards, >>>> Thomas >>>> >>>> >>>> On Tue, Jan 14, 2014 at 6:23 PM, Dave Atkins <[email protected]>wrote: >>>> >>>>> Is there any way to diagnose this? Are there any log files I don't >>>>> know about? Where would I find an exception or some indication that the >>>>> service did not start properly? >>>>> >>>>> On Saturday, January 11, 2014 10:26:35 AM UTC-5, Noel Grandin wrote: >>>>> >>>>>> On Fri, Jan 10, 2014 at 5:21 PM, Dave Atkins <[email protected]> >>>>>> wrote: >>>>>> > I recently shutdown this H2 database and after restarting the >>>>>> service, I can >>>>>> > no longer connect via TCP. I've been troubleshooting from command >>>>>> line; the >>>>>> > web interface just times out. Here's what I see: >>>>>> >>>>>> >>>>>> The most likely answer is simply that the service did not restart >>>>>> properly and so there was nothing to connect to. >>>>>> >>>>> -- >>>>> You received this message because you are subscribed to the Google >>>>> Groups "H2 Database" group. >>>>> To unsubscribe from this group and stop receiving emails from it, send >>>>> an email to [email protected]. >>>>> >>>>> To post to this group, send email to [email protected]. >>>>> Visit this group at http://groups.google.com/group/h2-database. >>>>> For more options, visit https://groups.google.com/groups/opt_out. >>>>> >>>> >>>> -- >>>> You received this message because you are subscribed to a topic in the >>>> Google Groups "H2 Database" group. >>>> To unsubscribe from this topic, visit >>>> https://groups.google.com/d/topic/h2-database/3lJV5BZn2OE/unsubscribe. >>>> To unsubscribe from this group and all its topics, send an email to >>>> [email protected]. >>>> To post to this group, send email to [email protected]. >>>> Visit this group at http://groups.google.com/group/h2-database. >>>> For more options, visit https://groups.google.com/groups/opt_out. >>>> >>> >>> -- >>> You received this message because you are subscribed to the Google >>> Groups "H2 Database" group. >>> To unsubscribe from this group and stop receiving emails from it, send >>> an email to [email protected]. >>> To post to this group, send email to [email protected]. >>> Visit this group at http://groups.google.com/group/h2-database. >>> For more options, visit https://groups.google.com/groups/opt_out. >>> >> -- >> You received this message because you are subscribed to a topic in the >> Google Groups "H2 Database" group. >> To unsubscribe from this topic, visit >> https://groups.google.com/d/topic/h2-database/3lJV5BZn2OE/unsubscribe. >> To unsubscribe from this group and all its topics, send an email to >> [email protected]. >> To post to this group, send email to [email protected]. >> Visit this group at http://groups.google.com/group/h2-database. >> For more options, visit https://groups.google.com/groups/opt_out. >> > > -- You received this message because you are subscribed to the Google Groups "H2 Database" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/h2-database. For more options, visit https://groups.google.com/groups/opt_out.
