select AURORA_VERSION() as aurora_version SYNTAX error
Asked by safwan:

I keep getting the error below every hour in postgresql alert log

function aurora_version() does not exist at character 8 , the error log is full of this error every our , Please have a look below

any ideas

thanks


Answers:
author: Nic Brough -Adaptavist-
body: Something is reading your database looking for the version of the database, and assuming it is an AWS aurora database.

Confluence does not do this.

comments: author: safwan
body: Thank you Nic, for your feedback, below is the full error

2019-10-10 09:42:11 CEST \[32073-1\] confluenceuser@confluence ERROR: function aurora_version() does not exist at character 8  
2019-10-10 09:42:11 CEST \[32073-2\] confluenceuser@confluence HINT: No function matches the given name and argument types. You might need to add explicit type casts.  
2019-10-10 09:42:11 CEST \[32073-3\] confluenceuser@confluence STATEMENT: select AURORA_VERSION() as aurora_version  
2019-10-10 09:42:11 CEST \[32073-4\] confluenceuser@confluence ERROR: current transaction is aborted, commands ignored until end of transaction block  
2019-10-10 09:42:11 CEST \[32073-5\] confluenceuser@confluence STATEMENT: select 1


author: Teemu Hatula
body: Hi,  

I'm sorry for necroing this, but I experienced a test Confluence crash few days ago, and it looked like the db just went away. After some troubleshooting I noticed something is bombarding our Confluence PostgreSQL db with similiar stuff, I have identical log entries as [@safwan](/t5/user/viewprofilepage/user-id/3593165)   

Maybe some plugin is doing this? Nothing else but Confluence is allowed to use that db. I'm getting a bit worried as I can't determine if the test server crash is related to this, I would very much like to rule this out if possible, I don't want this to happen in production.


author: Tadas
body: I also get same error when I open Settings page in Jira:

2019-10-18 11:10:12 EEST PostgreSQL JDBC Driver jiradb jira_user 127.0.0.1 ERROR: function aurora_version() does not exist at character 8

<br />

2019-10-18 11:10:12 EEST PostgreSQL JDBC Driver jiradb jira_user 127.0.0.1 HINT: No function matches the given name and argument types. You might need to add explicit type casts.

<br />

2019-10-18 11:10:12 EEST PostgreSQL JDBC Driver jiradb jira_user 127.0.0.1 STATEMENT: select AURORA_VERSION() as aurora_version

<br />

2019-10-18 11:12:13 EEST PostgreSQL JDBC Driver jiradb jira_user 127.0.0.1 ERROR: function aurora_version() does not exist at character 8

<br />

2019-10-18 11:12:13 EEST PostgreSQL JDBC Driver jiradb jira_user 127.0.0.1 HINT: No function matches the given name and argument types. You might need to add explicit type casts.

<br />

2019-10-18 11:12:13 EEST PostgreSQL JDBC Driver jiradb jira_user 127.0.0.1 STATEMENT: select AURORA_VERSION() as aurora_version

I've noticed this after upgradig to the latest Jira 8.4.2 (from 8.3.x).


author: Teemu Hatula
body: Is this some weird PostgreSQL version bug we are experiencing?  

My Postgres version is 9.5.19  
Confluence's psql driver version 42.1.1


author: Teemu Hatula
body: ... Is this because of licensing? Server products have line in Supported Platforms -page that says it's not supported to run them on top of Aurora database. Is this just Confluence (and Jira) checking constantly if the Postgres is Aurora or not?  

If it is, wouldn't it suffice to check this on boot and not keep hammering the database with Aurora functions, it's really irritating and makes reading database logs more painful.


author: Tadas
body: Greping shows this:

```
# fgrep -R -e"aurora_version"
Binary file atlassian-jira/WEB-INF/classes/com/atlassian/jira/util/system/probes/AwsAuroraPostgreSQLProbe.class matches
```


author: Tadas
body: Looks like it's this new feature that introduced this error:

<https://jira.atlassian.com/browse/JRASERVER-41985>


author: NirvaSoftware
body: Hi all,

Is there at least a workaround for this problem because we are in 8.5.1 (self-hosted) and our postGresql (9.5.19) logs still contain these errors ?


author: marcus_noerder-tuitje
body: Any update on this issue? We are facing exactly the same problem. And: License expired yesterday. Does a license renewal solve this issue?


author: Kevin Colagio
body: Just noting that this also happens with the latest version of BitBucket when running on an AWS instance.


author: Colin McDermott_GLiNTECH
body: [@Tadas](/t5/user/viewprofilepage/user-id/2394772) I have logged <https://jira.atlassian.com/browse/JRASERVER-71055> over the Select AURORA_VERSION() issue.


author: Wenslauw van Os
body: Strike my remark. It was just my database being locked.
> I stopped my bitbucket server instance and now it won't start again. I keep seeing that error in the postgresql logs...


author: web-impressions
body: It is not caused by another application, as there is no other application talking to my PostgreSQL 10.12 database server. My PostgreSQL server is dedicated to a single instance of Confluence 7.3.1.  

To figure out if it is caused by a plugin i disabled all user-installed plugins where i get a "disable" button.  

After disabling "Atlassian Troubleshooting and Support Tools" (1.23.3) i never saw above mentioned errors anymore.  

I guess it is triggered on confluence launch or when navigating to admin area / "manage apps" / "user-installed apps". Maybe this is not happening on a fresh installation. My Confluence instance was updated alot of times in the last 9 years.  

FYI: [@Nic Brough -Adaptavist-](/t5/user/viewprofilepage/user-id/781454)  
[@safwan](/t5/user/viewprofilepage/user-id/3593165)you may want to file a bug report.  

comments: author: Colin McDermott_GLiNTECH
body: good idea:

[https://jira.atlassian.com/browse/JRASERVER-71055?error=login_required\&error_description=Login+required\&state=bad7c357-00f7-44de-b175-97f5dc24b139](https://jira.atlassian.com/browse/JRASERVER-71055?error=login_required&error_description=Login+required&state=bad7c357-00f7-44de-b175-97f5dc24b139)

Feel free to upvote if this is effecting your server. (seems like an easy codefix)


author: valdes21
body: Hi [@web-impressions](/t5/user/viewprofilepage/user-id/706414) ,

It helped in my case. But I'm receiving the same error from Jira Server too. In this case the deactivation of this add-on didn't help. I have added this information to JRASERVER-71055.

Regards  
Valdes21


Tags: confluence-server

server