web stats
Database Tasks error - Mirth Community

Go Back   Mirth Community > Mirth Connect > Support

Reply
 
Thread Tools Display Modes
  #1  
Old 11-06-2016, 11:19 PM
discofris discofris is offline
OBX.1 Kenobi
 
Join Date: Jan 2014
Location: Belgium
Posts: 45
discofris is on a distinguished road
Default Database Tasks error

I'm using the following on a winbox 2012R2:
  • MC 3.4.2.8129
  • JVM 1.8.0_111-b14
  • PostgreSQL 9.6.1

When clicking the Database Tasks tab in the Settings I get an error:


Not really an issue for my setup I guess, but it got me wondering ... so I used the MC Client API to do a /databaseTasks GET Request and got the following Response back:
Code:
<com.mirth.connect.donkey.server.data.DonkeyDaoException>
    <detailMessage>
    org.postgresql.util.PSQLException: ERROR: column am.amcanorder does not exist
    Position: 427</detailMessage>
    <cause class="org.postgresql.util.PSQLException">
        <detailMessage>
      ERROR: column am.amcanorder does not exist
      Position: 427</detailMessage>
        <stackTrace>
            <trace>org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2270)</trace>
*** CUT ***
            <trace>java.lang.Thread.run(Unknown Source)</trace>
        </stackTrace>
        <suppressedExceptions class="java.util.Collections$UnmodifiableRandomAccessList" resolves-to="java.util.Collections$UnmodifiableList">
            <c class="list"/>
            <list/>
        </suppressedExceptions>
        <SQLState>42703</SQLState>
        <vendorCode>0</vendorCode>
        <__serverError>
            <m__mesgParts>
                <entry>
                    <char>P</char>
                    <string>427</string>
                </entry>
                <entry>
                    <char>R</char>
                    <string>errorMissingColumn</string>
                </entry>
                <entry>
                    <char>S</char>
                    <string>ERROR</string>
                </entry>
                <entry>
                    <char>C</char>
                    <string>42703</string>
                </entry>
                <entry>
                    <char>V</char>
                    <string>ERROR</string>
                </entry>
                <entry>
                    <char>F</char>
                    <string>parse_relation.c</string>
                </entry>
                <entry>
                    <char>L</char>
                    <string>3090</string>
                </entry>
                <entry>
                    <char>M</char>
                    <string>column am.amcanorder does not exist</string>
                </entry>
            </m__mesgParts>
            <verbosity>0</verbosity>
        </__serverError>
    </cause>
    <stackTrace>
        <trace>com.mirth.connect.server.util.DatabaseUtil.indexExists(DatabaseUtil.java:258)</trace>
*** CUT ***
        <trace>org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555)</trace>
        <trace>java.lang.Thread.run(Unknown Source)</trace>
    </stackTrace>
    <suppressedExceptions class="java.util.Collections$UnmodifiableRandomAccessList" resolves-to="java.util.Collections$UnmodifiableList">
        <c class="list"/>
        <list/>
    </suppressedExceptions>
</com.mirth.connect.donkey.server.data.DonkeyDaoException>
So I googled "column am.amcanorder does not exist" and found out it had something to do with the JDBC driver and PostgeSQL version 9.6.x:
http://comments.gmane.org/gmane.comp...sql.jdbc/22948

Currently not really a big issue I guess, but one never knows, right?
__________________
Mirth Connect Server 3.4.1.8057
Java version: 1.8.0_101

on Debian 8.5 and various Winboxes
Reply With Quote
  #2  
Old 11-10-2016, 12:36 AM
discofris discofris is offline
OBX.1 Kenobi
 
Join Date: Jan 2014
Location: Belgium
Posts: 45
discofris is on a distinguished road
Default

On that particular system I also had very often thoses error in my postgresql logs:
Code:
2016-11-08 11:12:02 CET [5624]: [467-1] user=,db=,app=,client= LOG:  could not fork autovacuum worker process: No error
2016-11-08 11:12:03 CET [5624]: [468-1] user=,db=,app=,client= LOG:  could not reserve shared memory region (addr=0000000001970000) for child 00000000000004BC: error code 487
When those occured, after x time the MC engine crashed. Solution was to restart engine and postgresql.

Tuning the autovacuum settings did not help.

Googling those errors pointed me into memory ASLR. Because disabling ASLR on Windows is also a security matter, I did not continue troubleshooting into that direction.

Reverted back to PostgreSQL 9.4.10, and had no more errors.
__________________
Mirth Connect Server 3.4.1.8057
Java version: 1.8.0_101

on Debian 8.5 and various Winboxes
Reply With Quote
  #3  
Old 11-10-2016, 11:48 AM
narupley's Avatar
narupley narupley is offline
Mirth Employee
 
Join Date: Oct 2010
Posts: 7,124
narupley is on a distinguished road
Default

It appears this is a bug in the PostgreSQL JDBC driver:

Try downloading the latest version of the driver here and replacing it in server-lib/database. I've created an issue for it: MIRTH-4078
__________________
Step 1: JAVA CACHE...DID YOU CLEAR ...wait, ding dong the witch is dead?

Nicholas Rupley
Work: 949-237-6069
Always include what Mirth Connect version you're working with. Also include (if applicable) the code you're using and full stacktraces for errors (use CODE tags). Posting your entire channel is helpful as well; make sure to scrub any PHI/passwords first.


- How do I foo?
- You just bar.
Reply With Quote
  #4  
Old 11-10-2016, 12:18 PM
discofris discofris is offline
OBX.1 Kenobi
 
Join Date: Jan 2014
Location: Belgium
Posts: 45
discofris is on a distinguished road
Default

Forgot to mention I already tried that with those drivers:
https://jdbc.postgresql.org/download....1212.jre7.jar (renamed those to the same name in the server-lib/database folder)

The error still persisted, so I realized it was not a good idea using PG version 9.6 and quickly installed 9.4

But still good to know it is certainly not advised to use PG 9.6 as a MC backend db on prod systems.
__________________
Mirth Connect Server 3.4.1.8057
Java version: 1.8.0_101

on Debian 8.5 and various Winboxes
Reply With Quote
  #5  
Old 11-10-2016, 12:22 PM
narupley's Avatar
narupley narupley is offline
Mirth Employee
 
Join Date: Oct 2010
Posts: 7,124
narupley is on a distinguished road
Default

PostgreSQL 9.6 appears to work perfectly fine for me, so I still recommend it for production systems unless additional evidence comes up to the contrary.

After replacing the JAR make sure you restart the Mirth Connect server as well.
__________________
Step 1: JAVA CACHE...DID YOU CLEAR ...wait, ding dong the witch is dead?

Nicholas Rupley
Work: 949-237-6069
Always include what Mirth Connect version you're working with. Also include (if applicable) the code you're using and full stacktraces for errors (use CODE tags). Posting your entire channel is helpful as well; make sure to scrub any PHI/passwords first.


- How do I foo?
- You just bar.
Reply With Quote
  #6  
Old 11-10-2016, 12:24 PM
discofris discofris is offline
OBX.1 Kenobi
 
Join Date: Jan 2014
Location: Belgium
Posts: 45
discofris is on a distinguished road
Default

Did off course restart MC, on my 2 (win) test systems I concluded also it was production ready. But when installing it on customer site (only 4 channels!) ... the trouble began.
__________________
Mirth Connect Server 3.4.1.8057
Java version: 1.8.0_101

on Debian 8.5 and various Winboxes
Reply With Quote
  #7  
Old 11-10-2016, 12:28 PM
narupley's Avatar
narupley narupley is offline
Mirth Employee
 
Join Date: Oct 2010
Posts: 7,124
narupley is on a distinguished road
Default

I haven't been able to reproduce those error logs you posted, so I don't know at this point whether they are isolated to your customer site or not. If you find any way to reproduce them on other systems, certainly let us know.
__________________
Step 1: JAVA CACHE...DID YOU CLEAR ...wait, ding dong the witch is dead?

Nicholas Rupley
Work: 949-237-6069
Always include what Mirth Connect version you're working with. Also include (if applicable) the code you're using and full stacktraces for errors (use CODE tags). Posting your entire channel is helpful as well; make sure to scrub any PHI/passwords first.


- How do I foo?
- You just bar.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -8. The time now is 05:30 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2019, vBulletin Solutions, Inc.
Mirth Corporation