Print

Print


Thank you! I can now connect with mysql-connector-java-5.1.34-bin.jar JDBC driver.



On Dec 4, 2014, at 10:14 AM, Serge Monkewitz <[log in to unmask]> wrote:

> I updated the IPAC install.
> 
> On Dec 3, 2014, at 2:40 PM, Jacek Becla <[log in to unmask]> wrote:
> 
>> The fix is at the tip of the qserv master.
>> 
>> Jacek
>> 
>> 
>> 
>> On 12/03/2014 01:54 PM, Tatiana Goldina wrote:
>>> Indeed, mysql-proxy-lua.log shows that the queries coming from mysql client (first 2 entries) do not have the comment, while the queries coming from JDBC driver (last entry) do:
>>> 
>>> *******************
>>> Intercepted: select @@version_comment limit 1
>>> Processing locally
>>> 
>>> *******************
>>> Intercepted:  SHOW VARIABLES WHERE Variable_name ='language' OR Variable_name = 'net_write_timeout' OR Variable_name = 'interactive_timeout' OR Variable_name = 'wait_timeout' OR Variable_name = 'character_set_client' OR Variable_name = 'character_set_connection' OR Variable_name = 'character_set' OR Variable_name = 'character_set_server' OR Variable_name = 'tx_isolation' OR Variable_name = 'transaction_isolation' OR Variable_name = 'character_set_results' OR Variable_name = 'timezone' OR Variable_name = 'time_zone' OR Variable_name = 'system_time_zone' OR Variable_name = 'lower_case_table_names' OR Variable_name = 'max_allowed_packet' OR Variable_name = 'net_buffer_length' OR Variable_name = 'sql_mode' OR Variable_name = 'query_cache_type' OR Variable_name = 'query_cache_size' OR Variable_name = 'license' OR Variable_name = 'init_connect'
>>> Processing locally
>>> 
>>> *******************
>>> Intercepted: /* mysql-connector-java-5.1.34 ( Revision: [log in to unmask] ) */SHOW VARIABLES WHERE Variable_name ='language' OR Variable_name = 'net_write_timeout' OR Variable_name = 'interactive_timeout' OR Variable_name = 'wait_timeout' OR Variable_name = 'character_set_client' OR Variable_name = 'character_set_connection' OR Variable_name = 'character_set' OR Variable_name = 'character_set_server' OR Variable_name = 'tx_isolation' OR Variable_name = 'transaction_isolation' OR Variable_name = 'character_set_results' OR Variable_name = 'timezone' OR Variable_name = 'time_zone' OR Variable_name = 'system_time_zone' OR Variable_name = 'lower_case_table_names' OR Variable_name = 'max_allowed_packet' OR Variable_name = 'net_buffer_length' OR Variable_name = 'sql_mode' OR Variable_name = 'query_cache_type' OR Variable_name = 'query_cache_size' OR Variable_name = 'license' OR Variable_name = 'init_connect'
>>> proxy.connection.server.thread_id: 151
>>> Passing query: /* mysql-connector-java-5.1.34(Revision: [log in to unmask]) */SHOW VARIABLES WHERE Variable_name='language' OR Variable_name='net_write_timeout' OR Variable_name='interactive_timeout' OR Variable_name='wait_timeout' OR Variable_name='character_set_client' OR Variable_name='character_set_connection' OR Variable_name='character_set' OR Variable_name='character_set_server' OR Variable_name='tx_isolation' OR Variable_name='transaction_isolation' OR Variable_name='character_set_results' OR Variable_name='timezone' OR Variable_name='time_zone' OR Variable_name='system_time_zone' OR Variable_name='lower_case_table_names' OR Variable_name='max_allowed_packet' OR Variable_name='net_buffer_length' OR Variable_name='sql_mode' OR Variable_name='query_cache_type' OR Variable_name='query_cache_size' OR Variable_name='license' OR Variable_name='init_connect'
>>> Passing hints: "client_dst_name" "134.4.53.236:4040" "server_thread_id" "151" "db" "LSST"
>>> Sendresult -4110
>>> ERROR 4110: Qserv error: 'ParseException:ANTLR parse error:unexpected token: /:'
>>> 
>>> 
>>> On Dec 3, 2014, at 1:46 PM, Jacek Becla <[log in to unmask]> wrote:
>>> 
>>>> I think we understand it, so apparently, mysql client 4.1 and higher
>>>> is stripping out comments (and jdbc does not). The fix that went in
>>>> so far was for cleaning up some left over white spaces that were
>>>> confusing proxy/lua code.
>>>> 
>>>> I'll fix that.
>>>> 
>>>> Jacek
>>>> 
>>>> 
>>>> 
>>>> On 12/03/2014 12:12 PM, Tatiana Goldina wrote:
>>>>> Here is a test program I am using. It is similar to the one John sent
>>>>> before. The configuration options to the driver are hardcoded in the URL.
>>>>> 
>>>>> 
>>>>> ------------------------------------------------------------------------
>>>>> 
>>>>> Use REPLY-ALL to reply to list
>>>>> 
>>>>> To unsubscribe from the QSERV-L list, click the following link:
>>>>> https://listserv.slac.stanford.edu/cgi-bin/wa?SUBED1=QSERV-L&A=1
>>>>> 
>>>>> 
>>>>> 
>>>>> 
>>>>> It requires MySQL JDBC driver, which can be downloaded from here:
>>>>> http://dev.mysql.com/downloads/connector/j/
>>>>> 
>>>>> To compile and run:
>>>>>  javac TestQserv.java
>>>>>  java -cp
>>>>> .:mysql-connector-java-5.1.34/mysql-connector-java-5.1.34-bin.jar TestQserv
>>>>> 
>>>>> The options to the driver are here:
>>>>> http://dev.mysql.com/doc/connector-j/en/connector-j-reference-configuration-properties.html
>>>>> 
>>>>> Both URL formats
>>>>>  "jdbc:mysql://address=(protocol=tcp)(host=lsst-db1.ipac.caltech.edu
>>>>> <http://lsst-db1.ipac.caltech.edu>)(port=4040)(user=qsmaster)/LSST?dumpQueriesOnException=true"
>>>>> and
>>>>>  "jdbc:mysql://lsst-db1.ipac.caltech.edu
>>>>> <http://lsst-db1.ipac.caltech.edu>:4040/LSST?user=qsmaster&dumpQueriesOnException=true"
>>>>> produce the same error (Qserv error: 'ParseException:ANTLR parse
>>>>> error:unexpected token: /:') when getting the connection.
>>>>> 
>>>>> Thank you very much for your help!
>>>>> 
>>>>> Tatiana
>>>>> 
>>>>> 
>>>>> P.S. No problem executing this command with mysql command line client:
>>>>> 
>>>>>>> mysql -h lsst-db1.ipac.caltech.edu
>>>>> <http://lsst-db1.ipac.caltech.edu> -u qsmaster -P 4040 -D
>>>>> LSST --protocol tcp -e "/* mysql-connector-java-5.1.6 ( Revision: xxx )
>>>>> */SHOW VARIABLES WHERE Variable_name ='language' OR Variable_name =
>>>>> 'net_write_timeout' OR Variable_name = 'interactive_timeout' OR
>>>>> Variable_name = 'wait_timeout' OR Variable_name = 'character_set_client'
>>>>> OR Variable_name = 'character_set_connection' OR Variable_name =
>>>>> 'character_set' OR Variable_name = 'character_set_server' OR
>>>>> Variable_name = 'tx_isolation' OR Variable_name =
>>>>> 'transaction_isolation' OR Variable_name = 'character_set_results' OR
>>>>> Variable_name = 'timezone' OR Variable_name = 'time_zone' OR
>>>>> Variable_name = 'system_time_zone' OR Variable_name =
>>>>> 'lower_case_table_names' OR Variable_name = 'max_allowed_packet' OR
>>>>> Variable_name = 'net_buffer_length' OR Variable_name = 'sql_mode' OR
>>>>> Variable_name = 'query_cache_type' OR Variable_name = 'query_cache_size'
>>>>> OR Variable_name = 'init_connect'"
>>>>> +--------------------------+---------------------------------------------------------------+
>>>>> | Variable_name            | Value
>>>>>                  |
>>>>> +--------------------------+---------------------------------------------------------------+
>>>>> | character_set_client     | latin1
>>>>>                   |
>>>>> | character_set_connection | latin1
>>>>>                   |
>>>>> | character_set_results    | latin1
>>>>>                   |
>>>>> | character_set_server     | latin1
>>>>>                   |
>>>>> | init_connect             |
>>>>>                  |
>>>>> | interactive_timeout      | 28800
>>>>>                  |
>>>>> | language                 |
>>>>> /home/lsstadm/stack/Linux64/mysql/5.1.65/share/mysql/english/ |
>>>>> | lower_case_table_names   | 0
>>>>>                  |
>>>>> | max_allowed_packet       | 1048576
>>>>>                  |
>>>>> | net_buffer_length        | 16384
>>>>>                  |
>>>>> | net_write_timeout        | 60
>>>>>                   |
>>>>> | query_cache_size         | 0
>>>>>                  |
>>>>> | query_cache_type         | ON
>>>>>                   |
>>>>> | sql_mode                 |
>>>>>                  |
>>>>> | system_time_zone         | PST
>>>>>                  |
>>>>> | time_zone                | SYSTEM
>>>>>                   |
>>>>> | tx_isolation             | REPEATABLE-READ
>>>>>                  |
>>>>> | wait_timeout             | 28800
>>>>>                  |
>>>>> +--------------------------+---------------------------------------------------------------+
>>>>> 
>>>>> 
>>>>> 
>>>>> 
>>>>> On Dec 3, 2014, at 10:07 AM, Serge Monkewitz <[log in to unmask]
>>>>> <mailto:[log in to unmask]>> wrote:
>>>>> 
>>>>>> Monkewitz <[log in to unmask] <mailto:[log in to unmask]>> wrote:
>>>>>> 
>>>>>>> Tatiana: forwarding to qserv-l, since I am taking today off to deal
>>>>>>> with family matters. I’ll take a look tomorrow if no-one else has any
>>>>>>> ideas.
>>>>>>> 
>>>>>>> For context - connecting to qserv via JDBC still fails, even after
>>>>>>> Jacek’s show variables fix (and fix for the fix).
>>>>>>> 
>>>>>>> Begin forwarded message:
>>>>>>> 
>>>>>>>> *From:*Tatiana Goldina <[log in to unmask]
>>>>>>>> <mailto:[log in to unmask]>>
>>>>>>>> *Subject:**Re: rebuilding QSERV*
>>>>>>>> *Date:*December 2, 2014 at 4:02:08 PM PST
>>>>>>>> *To:*Serge Monkewitz <[log in to unmask]
>>>>>>>> <mailto:[log in to unmask]>>
>>>>>>>> 
>>>>>>>> I am out of clues. I am still getting the same error when connecting
>>>>>>>> through the JDBC driver.
>>>>>>>> 
>>>>>>>> jdbc:mysql://lsst-db1.ipac.caltech.edu
>>>>>>>> <http://lsst-db1.ipac.caltech.edu/>:4040/LSST?user=qsmaster&dumpQueriesOnException=true&traceProtocol=true
>>>>>>>> 
>>>>>>>> trace is attached. I don't know how to debug it further.
>>>>>>>> 
>>>>>>> 
>>>>>>> ------------------------------------------------------------------------
>>>>>>> 
>>>>> 
>>>>> 
>>>>> ------------------------------------------------------------------------
>>>>> 
>>>>> Use REPLY-ALL to reply to list
>>>>> 
>>>>> To unsubscribe from the QSERV-L list, click the following link:
>>>>> https://listserv.slac.stanford.edu/cgi-bin/wa?SUBED1=QSERV-L&A=1
>>>>> 
>>>> 
>>>> 
>>>> 
>>>> --
>>>> 
>>> 
>> 
> 
> ########################################################################
> Use REPLY-ALL to reply to list
> 
> To unsubscribe from the QSERV-L list, click the following link:
> https://listserv.slac.stanford.edu/cgi-bin/wa?SUBED1=QSERV-L&A=1
> 
> 
> -- 
> BEGIN-ANTISPAM-VOTING-LINKS
> ------------------------------------------------------
> 
> Teach CanIt if this mail (ID 04NnuglUB) is spam:
> Spam:        https://canit.ipac.caltech.edu/canit/b.php?i=04NnuglUB&m=bb436dded771&c=s
> Not spam:    https://canit.ipac.caltech.edu/canit/b.php?i=04NnuglUB&m=bb436dded771&c=n
> Forget vote: https://canit.ipac.caltech.edu/canit/b.php?i=04NnuglUB&m=bb436dded771&c=f
> ------------------------------------------------------
> END-ANTISPAM-VOTING-LINKS
> 

########################################################################
Use REPLY-ALL to reply to list

To unsubscribe from the QSERV-L list, click the following link:
https://listserv.slac.stanford.edu/cgi-bin/wa?SUBED1=QSERV-L&A=1