Hot answers tagged

17

This can happen for a variety of reasons. I just saw it myself a few weeks ago but I can't remember what the fix was for me. 1) Verify the address mysql is bound to, it's probably 127.0.0.1 (only) which I believe is the default (at least on standard Ubuntu server). You'll have to comment out the bind-address parameter in my.cnf to bind to all available ...


12

I have had the same problem in two of my programs. My error was this: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server. I spend some days to solve this problem. I have tested many approaches ...


6

Yes you can run the smaller drivers on newer java versions. It is just that ojdbc14.jar does not contain JDBC3 and JDBC4 features. You have to differentiate between runtime and compile time. At runtime you can use ojdbc14.jar in a JRE6 as long as your app code is not using JDBC4 features. If you want to use ojdbc14.jar in the buildpath you might experience ...


5

Well first off, JDBC and ODBC are not compatible. JDBC was Java's answer to ODBC, and they fill the same niche, but you can't connect to an ODBC data source using JDBC and vice versa. Now there IS a jdbc-odbc bridge in Java, but that is a compatibility hack, not a native connector (The translation will go JDBC->ODBC->(Target Database) rather than ...


5

The only way to get more info from haproxy than what you have, would be to use the show sess or show sess <id> command periodically to watch the state of each tcp connection, though I'm not sure if you would get any more useful information. The cD termination state is the most helpful piece of info you have. What it means exactly is that an ...


5

Sure! Ask /proc/sys/kernel/random/entropy_avail.


3

Use sqlplus. SQL*Plus FAQ, SQL*Plus Documentation


3

In Oracle, LOB (including BLOB) is stored as: in-the-table LOB - if the LOB is smaller than 3900 bytes it can be stored inside the table row; by default this is enabled, unless you specify DISABLE STORAGE IN ROW normal LOB - stored in a separate segment, outside of table, you may even put it in another tablespace; for these: a minimum of CHUNK bytes are ...


3

I suspect that this article will help you out: Understanding SSL Support The protocol still uses TCP port 1433, by default, irrespective of SSL being used. The client can request SSL and, if the server has a certificate installed, the server and client will negotiate SSL. The server can be configured to force SSL, which will cause clients that do not ...


2

What are the negatives of setting a high wait_timeout setting in MySQL? Idle and persistent connections will obviously take longer to expire. This may mean that you bump up against some default and sane limits. The first one will be max_connections. Then following that - because of the way which MySQL assigns memory and file descriptors to connections ...


2

Here is a good reference to various sql utilities. Of these I've only used sqlshell and it did what you e.g. sql from the command line. It's java based so you will need a java 6 jre to use it. The jar file version has a gui for installation so you might want the zip version. Henplus also looks like it would do what you want. I've not seen any of them in ...


2

Briefly, selectMethod=cursor theoretically requires more server-side resources than selectMethod=direct only loads at most batch-size records into client memory at once, resulting in a more predictable client memory footprint selectMethod=direct theoretically requires less server-side resources than selectMethod=cursor will read the entire result set ...


2

The most likely candidates are network latency and load. Is the database server being used by any other applications? What's the latency to the database server, and how much bandwidth is available? I'd start the investigation with some query profiling on the DB server. You could easily compare query times on the production DB to your local to determine ...


2

From http://aws.amazon.com/rds/faqs/#36 During certain types of planned maintenance, or in the unlikely event of DB Instance failure or Availability Zone failure, Amazon RDS will automatically failover to the standby so that you can resume database writes and reads as soon as the standby is promoted. Since the name record for your DB Instance ...


2

I'm answering for my own question. The JDBC Connection Pool's address property was wrong. It was a DNS name about which only one of three nodes knows.


2

as read someplace else... each new process get entropy from /dev/random a simple way to avoid stealing the pool is a program, such as: #!/usr/bin/env python import time while True: with open('/proc/sys/kernel/random/entropy_avail', 'r') as f: print(f.read().rstrip()) time.sleep(1.0)


2

No. As per documentation it will have a encrypted connnection. Check http://social.msdn.microsoft.com/Forums/sqlserver/en-US/bde679d9-ff83-4fa7-b402-42e336a97106/force-encryption-on-sql-server-not-working When the Force Encryption option for the Database Engine is set to YES, all communications between client and server is encrypted no matter ...


2

The next course of action is to check with your provider (in this case Amazon) to see if they know anything about the issue. It seems that they do: Network connectivity We are observing an issue outside of our network that is preventing a small number of Verizon FiOS customers from reaching the US-EAST-1 Region. Connectivity within the Region as ...


2

You need to either use a plugin that can simulate the login, like webinject or check_selenium, or expose some status page from your web app. You can have a static page that you can check for some status code (using check_http). If you want to get fancy, you can expose some status via JMX, and use one of the many JMX plugins. This would probably be the ...


2

I think your best bet would be to use wsadmin with a jython script. This is the way I've seen it done before and then you could load that csv into nagios or something. The wsadmin script could be set in cron to run or some scheduler on windows. IBM has an unofficial jython library which has a bunch of helpers and makes writing the jython easier.. ...


1

I think a good way for tracing memory leaks is to attach VisualVM to the running Java process (in this case a GF instance) and look into the reference tree of heap dumps. Another way that comes to my mind, but requires some work, would be to write your own connection/connection pool wrapper and log a stack trace every time connection is taken from the pool ...


1

The database needs to be up and running and accessible through the JDBC Data Source. Since it is not accessible, ODSI cannot connect to it to determine the database type.


1

Solved - this was a classloading issue. When looking again today in the logs, I saw this when restarting tomcat: Feb 22, 2011 11:47:40 AM org.apache.catalina.core.NamingContextListener addResource WARNING: Failed to register in JMX: javax.naming.NamingException: Could not load resource factory class [Root exception is java.lang.ClassNotFoundException: ...


1

Typically I create context.xml.default files or even appname.xml files in the /conf/Catalina/localhost directory for such purposes. It's the right way.


1

Check your context.xml file. Did you embed the <Context> within the existing <Context> of the default file? Worst case scenario it to take this: <ResourceLink type="javax.sql.DataSource" name="jdbc/LocalDB" global="jdbc/DB" /> ...and ensure it is within the already existing <Context> tag and get ...


1

As the exception shows the error is in the SQL syntax, probably in the JDBC Url, if you read the documentation you can see that when the port isn't specifed the colon sould also be ommited, try this: .getConnection("jdbc:mysql://localhost/schema?user=user_name&password=pass_word") Hope it works.


1

If it works on another server, then that server is the one hosting the mysql database. Your connect string needs to refer to it instead of localhost. The command 'netstat -lnt | grep 3306' will tell you if mysql is running and listening on the port. If it is only listening on '127.0.0.1', you will need to run your Java application on the same server, or ...


1

Your MySQL may be configured to specifically listen on only one IP address. Also note that localhost has special meaning in some if not most MySQL clients: it means to use a UNIX socket on the box. The address 127.0.0.1 will use a real TCP connection, so try that. If you still suspect iptables: iptables -L will allow you to see the current ruleset. Edit: ...


1

I know this answer is a bit late, and I don't even know if it will work, but since the connection string is a URL, can you escape it the way you would a URL? i.e. Table%20%28one%29


1

This is most likely a limit on the data source config on the JDBC MySQL driver then in your setup - wherever you have your data source defined look for the max connections property. Depending on your setup this could be in several locations defined differently (i.e. in server.xml at the Tomcat level vs. in web.xml at the webapp/ level), but it's in there ...



Only top voted, non community-wiki answers of a minimum length are eligible