I am receiving an error when attempting to downgra...
# lucee
r
I am receiving an error when attempting to downgrade MySQL to any version 8.0.18 and below. The error received from Lucee is the following:
Copy code
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.
Is there something I am doing wrong or is this possibly a bug?
a
Can you connect to the MySQL server via the shell client (or any other sort of client, for that matter). You are getting this when trying to make a JDBC connection yeah? Have you googled the error message and... well... there's a tonne of stuff to look at.
r
Yes, it works outside of Lucee I have googled the error and still playing around with it.
a
I wonder if you need an older JDBC driver? What have you actually tried already by way of troubleshooting, so ppl don't waste time suggesting stuff you've already looked at?
r
I have tried every single version and came up with knowing that this does not work for 8.0.18 and lower versions.
I am wondering if there is an issue with MySQL being on a different port number than the conventional 3306
a
shouldn't be
I mean... provided you have told Lucee that.
because it is the sort of error you'd get if you weren't talking on the right address or port.
Bear in mind that Lucee doesn't talk to the MySQL server, so it won't give a shit what version it is. All it talks to is a JDBC driver. It doesn't know what's on the other side of it.
👍🏼 1
r
I'm using 127.0.0.1:3305 to connect
it works when connecting on mysql cli
it works when using the dbms
a
from the same box Lucee is on ?
r
yes
I switched the datasource to use MySQL 8.0.28 and it also errors
not to make this confusing, but I have to MySQL servers running in parallel
server versions 5.7 and 8
then there are the MySQL versions installed in Lucee
a
OK, maybe grab the JDBC driver from Oracle and try that?
r
it is the server version that I switched to version 8.0.28 in the datasource and not the jdbc version, which is currently on version 8.0.9, just to test if the server version 8.0.28 would error as well and it does error just the same as server version 5.7.
the reason for why I am attempting to look into this issue is that a colleague of mine is receiving an error on a query of query that stated the following:
Copy code
Not in aggregate function or group by clause: org.hsqldb.Expression@6b6ba733 in statement [SELECT marketValue, marketPercent, d_as_at_date, monthly FROM qMonthlyPortfolioSum GROUP BY monthly ORDER BY d_as_at_date]
For the life of me, I do not get any errors and this query of query works. I even took the source query and the query of query out of the CFML and combined them to see if I receive an error in the DBMS and it works fine there as well in server version 5.7 and 8.
a
I switched to version 8.0.28 in the datasource
OK I am out of my depth here. I am unaware of why one would specify the DB server version in a data source, and I have never had to.
r
I'm unable to get a hold of my colleague and do not know if he possibly has restrictions that could be the reason for the differences between our local environments or something else.
a
I'm still trying to work out what a datasource of any stripe has to do with a QoQ. Is there something I'm missing here?
a
Oh shit yeah I missed that.
r
@ryan I ran into your error on a single query I had (luckily just 1) when I upgraded from 5.7 to 8. This explains the issue. I personally just added one of the columns I had in my select to the group by and it fixed it. https://dev.mysql.com/doc/refman/8.0/en/group-by-handling.html
r
@Asher Densmore-Lynn Yes, just the fact that the QofQ is derived from a query using the datasource, I'm attempting to test any and every combination to replicate the error that I mentioned above that my colleague is experiencing.
a
QoQ aside, there was a change in MySQL at some point wherein it used to be forgiving of having non-aggregated in a SELECT clause when they're no in the GROUP BY clause. And that's kinda like the error one would see. However that has nothing to do with QoQ, and also nothing to do with the error you originally posted
r
Correct, I'm just explaining the purpose for why I am looking into these downgrades, which is yet another error. Lol
a
OK. The MySQL version is not going to contribute to that error. So stop with all that. You're wasting yours (and our) time with that.
Are you and your colleague both on the same version of Lucee? The exact same version?
r
I'm pretty sure we are off on the minor version, but we are both on 5.3
a
where's that table-flip emoticon when I need it?
"off on the minor version" is not a minor thing in Lucee.
r
ok, well that's good to know
I will downgrade and see if I can then replicate the error.
a
Looks to me like its internal hsqldb version might have changed somewhere in there along the way. From one that was forgiving of "Not in aggregate function or group by clause" to a version that is less forgiving (or poss the other way around).
r
both his and mine show hsql 1.8
a
There were some changes in the QoQ implementation that bit us on the are between "minor" versions of Lucee recently.
On MySQL (just as an example), there's a setting one can pass to make it ignore that warning. I wonder if HSQL has similar, and it's set in one version of Lucee and not in the other.
But, that said... if you fixed the SQL then... problem goes away. It's erroring for a reason.
(but I get that this is not what yer looking at, at the moment)
r
ok, thanks Adam, good to know. I didn't realize the minor versions would be impactful to a query. I was thinking that if the hsql version is the same, then lucee differing minor versions would not cause an issue. I'm going to downgrade and test. Thanks, again, and apologies for swaying your temperament.
a
mate don't worry. Even just humidity changes do that 😉
😂 1
My experience with Lucee is that even minor version differences can have "idiosyncratic" [cough] impacts on one's CFML apps. So make sure to keep them inline across all environments.
b
Communications link failure
is a very generic MySQL error. usually the "real" error is in the "caused by" when you see this/
g
We get the communication link error, often now. With a message along the lines of; have not contacted the server is xxxx ms... I always thought it was a "network" / comms issue with the change of DB or JDBC. I have never thought of it being an issue with the actual SQL - as that hasn't changed... I'll give it a through look though.
b
Again look at the full stack trace including the root cause
You can stare at the outermost exception message all day, but it won't tell you the issue
z
Try reducing the lifetime timeout to 15m