You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafficcontrol.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2017/01/11 23:25:16 UTC
[jira] [Commented] (TC-96)
api/{version}/cdns/:cdn_name/configs/monitoring.json returns 500
[ https://issues.apache.org/jira/browse/TC-96?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15819512#comment-15819512 ]
ASF GitHub Bot commented on TC-96:
----------------------------------
GitHub user mitchell852 opened a pull request:
https://github.com/apache/incubator-trafficcontrol/pull/181
[TC-96] - adds group_by to dbix query to satisfy postgres
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/mitchell852/incubator-trafficcontrol tc-96
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/incubator-trafficcontrol/pull/181.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #181
----
commit bb6d23644e5944a5572e781c739e811714edae46
Author: Jeremy Mitchell <mi...@gmail.com>
Date: 2017-01-11T23:22:54Z
adds group_by to dbix query
----
> api/{version}/cdns/:cdn_name/configs/monitoring.json returns 500
> ----------------------------------------------------------------
>
> Key: TC-96
> URL: https://issues.apache.org/jira/browse/TC-96
> Project: Traffic Control
> Issue Type: Bug
> Components: Traffic Ops API
> Reporter: Jeremy Mitchell
> Assignee: Jeremy Mitchell
>
> I believe this is a postgres-specific error. Postgres seems to be a little more strict than mysql on how queries are formed.
> Error message:
> Error at line 271 ( while ( my $row = $rs_pp->next ) {)
> DBIx::Class::Storage::DBI::_dbh_execute(): DBI Exception: DBD::Pg::st execute failed: ERROR: column "me.cdn_id" must appear in the GROUP BY clause or be used in an aggregate function LINE 1: ...table, type.last_updated FROM (SELECT me.profile, me.cdn_id,... ^ [for Statement "SELECT me.profile, cdn.id, cdn.name, cdn.last_updated, cdn.dnssec_enabled, profile.id, profile.name, profile.description, profile.last_updated, type.id, type.name, type.description, type.use_in_table, type.last_updated FROM (SELECT me.profile, me.cdn_id, me.type FROM server me JOIN cdn cdn ON cdn.id = me.cdn_id JOIN profile profile ON profile.id = me.profile JOIN type type ON type.id = me.type WHERE ( cdn.name = ? ) GROUP BY me.profile) me JOIN cdn cdn ON cdn.id = me.cdn_id JOIN profile profile ON profile.id = me.profile JOIN type type ON type.id = me.type WHERE ( cdn.name = ? )" with ParamValues: 1='over-the-top', 2='over-the-top'] at /opt/traffic_ops/app/lib/API/Cdn.pm line 271
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)