Announcement

Collapse
No announcement yet.

Unable to login to Administrator with 3.0.2 running on MySQL in Unix/Linux

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Unable to login to Administrator with 3.0.2 running on MySQL in Unix/Linux

    EDIT (by Nick Rupley):
    • This is due to the default case sensitivity settings of MySQL running on Unix environments. An issue has been created for it: MIRTH-3247. As a workaround, you can do this:
      Code:
      CREATE VIEW channel AS SELECT * FROM CHANNEL;


    Hi Mirth team,

    I was very excited to learn about Mirth 3.0.2 coming out and upgraded our Dev environment (hosted in AWS cloud) from 3.0.1 to that version while keeping the mirth.properties and other files in the ./conf folder intact (installer did).

    The server starts up and has a few Channel deployment errors (pls see attached log file) but does show the message of it listening on ports 9080 and 9443 (both forwarded to outside world from AWS)

    ...
    INFO 2014-04-21 00:05:12,556 [Thread-2] com.mirth.connect.server.Mirth: Mirth Connect 3.0.2.7140 (Built on April 15, 2014) server successfully started.
    INFO 2014-04-21 00:05:12,556 [Thread-2] com.mirth.connect.server.Mirth: This product was developed by Mirth Corporation (http://www.mirthcorp.com) and its contributors (c)2005-2014.
    INFO 2014-04-21 00:05:12,556 [Thread-2] com.mirth.connect.server.Mirth: Running Java HotSpot(TM) 64-Bit Server VM 1.7.0_51 on Linux (2.6.32-358.el6.x86_64, amd64), mysql, with charset UTF-8.
    INFO 2014-04-21 00:05:12,558 [Thread-2] com.mirth.connect.server.Mirth: Web server running at http://172.31.16.10:9080/ and https://172.31.16.10:9443/
    Unfortunately, I can no longer login to either Web UI or MirthConnect Java client even after resetting default "admin/admin" credentials in my MySQL DB, PERSON_PASSWORD table:

    UPDATE PERSON_PASSWORD SET PASSWORD = 'YzKZIAnbQ5m+3llggrZvNtf5fg69yX7pAplfYg0Dngn/fESH93OktQ==' WHERE PERSON_ID = 1

    I have attached the mirth.properties and fragment of mirth.log files. Would really appreciate someone's quick response as our Mirth Dev environment is completely down since last Friday!

    thanks,
    Dan Z.
    Attached Files
    Last edited by narupley; 04-23-2014, 03:39 PM.

  • #2
    Java info:
    java version "1.7.0_51"
    Java(TM) SE Runtime Environment (build 1.7.0_51-b13)
    Java HotSpot(TM) 64-Bit Server VM (build 24.51-b03, mixed mode)

    Comment


    • #3
      The login error you're seeing does not indicate a user authentication error. It indicates that you don't have connectivity to that IP/port in the first place. Can you reach the 9080 launch page of your server in a web browser? Can you access the web dashboard (click on "Access Secure Site" on the launch page)? And can you telnet to 9443 from your local machine?

      Regarding this error:

      Code:
      ERROR 2014-04-20 23:53:17,520 [Thread-2] com.mirth.connect.server.transformers.JavaScriptFilterTransformer: Filter/Transformer error
      java.lang.Exception: com.mirth.connect.server.MirthJavascriptTransformerException:
      SCRIPT SOURCE:  646a252d-0038-4e53-977e-d633667e2ddd
      SOURCE CODE:
      27: tmp = new XML(template);
      28: function doFilter() { phase[0] = 'filter'; return true; }function doTransform() { phase[0] = 'transformer'; logger = Packages.org.apache.log4j.Logger.getLogger(phase[0]);
      29:
      30:
      31: var mapping;try { mapping = tmp['web:accountRequest']; }catch (e) { logger.error(e);  mapping = '';}connectorMap.put('accountRequest', validate( mapping , tmp['web:accountRequest']['web:AccountId'], new Array()));
      32: var mapping;try { mapping = FileUtil.encode(new java.lang.String(msg['Patient']').getBytes('UTF-8')); }catch (e) { logger.error(e);  mapping = '';}connectorMap.put('patientInfoEncoded', validate( mapping , '', new Array()));
      33: var mapping;try { mapping = msg['Credentials']['partnerName'].toString(); }catch (e) { logger.error(e);  mapping = '';}channelMap.put('partnerName', validate( mapping , 'newcropdemo', new Array()));
      34: var mapping;try { mapping = msg['Credentials']['name'].toString(); }catch (e) { logger.error(e);  mapping = '';}channelMap.put('name', validate( mapping , 'demo', new Array()));
      35: var mapping;try { mapping = msg['Credentials']['password'].toString(); }catch (e) { logger.error(e);  mapping = '';}channelMap.put('password', validate( mapping , 'demo', new Array()));
      36: var mapping;try { mapping = msg['Credentials']['productName'].toString(); }catch (e) { logger.error(e);  mapping = '';}channelMap.put('productName', validate( mapping , 'SuperDuperSoftware', new Array()));
      LINE NUMBER:    32
      LINE SOURCE:    var mapping;try { mapping = FileUtil.encode(new java.lang.String(msg['Patient']').getBytes('UTF-8')); }catch (e) { logger.error(e);  mapping = '';}connectorMap.put('patientInfoEncoded', validate( mapping , '', new Array()));
      DETAILS:        missing ) after argument list
      
              at com.mirth.connect.server.util.javascript.JavaScriptUtil.compileAndAddScript(JavaScriptUtil.java:610)
              at com.mirth.connect.server.transformers.JavaScriptFilterTransformer.initialize(JavaScriptFilterTransformer.java:68)
              at com.mirth.connect.server.transformers.JavaScriptFilterTransformer.<init>(JavaScriptFilterTransformer.java:56)
              at com.mirth.connect.server.controllers.DonkeyEngineController.createFilterTransformerExecutor(DonkeyEngineController.java:804)
              at com.mirth.connect.server.controllers.DonkeyEngineController.convertToDonkeyChannel(DonkeyEngineController.java:591)
              at com.mirth.connect.server.controllers.DonkeyEngineController.deployChannel(DonkeyEngineController.java:210)
              at com.mirth.connect.server.controllers.DonkeyEngineController.deployChannels(DonkeyEngineController.java:189)
              at com.mirth.connect.server.controllers.DonkeyEngineController.redeployAllChannels(DonkeyEngineController.java:328)
              at com.mirth.connect.server.Mirth.startup(Mirth.java:270)
              at com.mirth.connect.server.Mirth.run(Mirth.java:154)
      Caused by: com.mirth.connect.server.MirthJavascriptTransformerException:
      SCRIPT SOURCE:  646a252d-0038-4e53-977e-d633667e2ddd
      SOURCE CODE:
      27: tmp = new XML(template);
      28: function doFilter() { phase[0] = 'filter'; return true; }function doTransform() { phase[0] = 'transformer'; logger = Packages.org.apache.log4j.Logger.getLogger(phase[0]);
      29:
      30:
      31: var mapping;try { mapping = tmp['web:accountRequest']; }catch (e) { logger.error(e);  mapping = '';}connectorMap.put('accountRequest', validate( mapping , tmp['web:accountRequest']['web:AccountId'], new Array()));
      32: var mapping;try { mapping = FileUtil.encode(new java.lang.String(msg['Patient']').getBytes('UTF-8')); }catch (e) { logger.error(e);  mapping = '';}connectorMap.put('patientInfoEncoded', validate( mapping , '', new Array()));
      33: var mapping;try { mapping = msg['Credentials']['partnerName'].toString(); }catch (e) { logger.error(e);  mapping = '';}channelMap.put('partnerName', validate( mapping , 'newcropdemo', new Array()));
      34: var mapping;try { mapping = msg['Credentials']['name'].toString(); }catch (e) { logger.error(e);  mapping = '';}channelMap.put('name', validate( mapping , 'demo', new Array()));
      35: var mapping;try { mapping = msg['Credentials']['password'].toString(); }catch (e) { logger.error(e);  mapping = '';}channelMap.put('password', validate( mapping , 'demo', new Array()));
      36: var mapping;try { mapping = msg['Credentials']['productName'].toString(); }catch (e) { logger.error(e);  mapping = '';}channelMap.put('productName', validate( mapping , 'SuperDuperSoftware', new Array()));
      LINE NUMBER:    32
      LINE SOURCE:    var mapping;try { mapping = FileUtil.encode(new java.lang.String(msg['Patient']').getBytes('UTF-8')); }catch (e) { logger.error(e);  mapping = '';}connectorMap.put('patientInfoEncoded', validate( mapping , '', new Array()));
      DETAILS:        missing ) after argument list
      
              at com.mirth.connect.server.util.javascript.JavaScriptUtil.compileAndAddScript(JavaScriptUtil.java:609)
              ... 9 more
      That's occurring because you have a syntax error in your transformer (highlighted in red).
      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.

      Comment


      • #4
        Thanks Nick for getting back to me.
        I can certainly see the secured Web UI login page:

        https://mirthconnect-dev-375423265.u...n/Index.action

        (which is a forward of the AWS server's instance that shows in the mirth.log file: https://172.31.16.10:9443) - pls see attached screenshot as well. If you hav a sec, please try logging in as "admin/admin" - I have reset the password in PERSON_PASSWORD

        I cannot launch the JNLP link b/c of security restrictions of my current location, but it also works for direct Internet connection:

        http://mirthconnect-dev-375423265.us...webstart.jnlp?

        Understood about transformer syntax error (extra ') but that shouldn't prevent logging in to Web and MirthConnect Java clients, correct? Please suggest other areas I can look at. I think there are other users that complain about inability to authenticate into Java client after upgrade to 3.0.2?

        thanks!
        Dan Z
        Attached Files
        Last edited by dzilberman; 04-21-2014, 09:46 AM. Reason: Added screenshot

        Comment


        • #5
          It looks like the server is still starting. Did you just recently restart? And is there anything new in the server log?
          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.

          Comment


          • #6
            No, I have restarted it last night. I unfortunately won't be able to access the MIRTH.LOG until late this afternoon PST, but certainly remember that the last 2 lines in it after a few restarts I performed yesterday and AFTER failed Web UI logins were still:

            INFO 2014-04-20 23:53:48,996 [Thread-2] com.mirth.connect.server.Mirth: Running Java HotSpot(TM) 64-Bit Server VM 1.7.0_51 on Linux (2.6.32-358.el6.x86_64, amd64), mysql, with charset UTF-8.
            INFO 2014-04-20 23:53:48,998 [Thread-2] com.mirth.connect.server.Mirth: Web server running at http://172.31.16.10:9080/ and https://172.31.16.10:9443/
            Is there any additional LOG file that will be able to give me more info perhaps? I have placed a few external JARs into custom-lib folder (xom.jar, some Jason support library jar) - but these should not affect login process either just like transformer errors should not, right?

            thanks Nick.

            Dan Z

            Comment


            • #7
              Add the following lines to your mcserver.vmoptions file (or mcservice.vmoptions, depending on which executable is being run):

              Code:
              -Xdebug
              -Xrunjdwp:transport=dt_socket,address=8001,server=y,suspend=n
              That way you will be able to remotely debug the server and find out exactly what's going on.
              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.

              Comment


              • #8
                Added debugging, still same problem on both UI and Java clients

                OK Nick, I have enabled debugging per you settings above and see that port in netstat - but not sure how to debug Mirth server, I guess I need to forward traffic form that port 8001 out same way I do for ports 9443 and 9080, correct?

                Besides that, no changes in behavior so far (see attached log): starts up and after spitting out few deployment errors shows that:

                com.mirth.connect.server.Mirth: Mirth Connect 3.0.2.7140 (Built on April 15, 2014) server successfully started.
                INFO 2014-04-21 22:30:04,978 [Thread-2] com.mirth.connect.server.Mirth: This product was developed by Mirth Corporation (http://www.mirthcorp.com) and its contributors (c)2005-2014.
                INFO 2014-04-21 22:30:04,978 [Thread-2] com.mirth.connect.server.Mirth: Running Java HotSpot(TM) 64-Bit Server VM 1.7.0_51 on Linux (2.6.32-358.el6.x86_64, amd64), mysql, with charset UTF-8.
                INFO 2014-04-21 22:30:04,982 [Thread-2] com.mirth.connect.server.Mirth: Web server running at http://172.31.16.10:9080/ and https://172.31.16.10:9443/
                I tried taking the thread dump but apparently I don't have "jstack" installed:

                root 4013 1 3 22:29 pts/1 00:00:27 /usr/bin/java -Dinstall4j.jvmDir=/usr -Dexe4j.moduleName=/data/mirthconnect/mcservice -Dinstall4j.launcherId=144 -Dinstall4j.swt=false -server -Xmx256m -Djava.awt.headless=true -Xdebug -Xrunjdwp:transport=dt_socket,address=8001,server=y ,suspend=n -Di4j.vpt=true -classpath /data/mirthconnect/.install4j/i4jruntime.jar:/data/mirthconnect/mirth-server-launcher.jar com.install4j.runtime.launcher.Launcher start com.mirth.connect.server.launcher.MirthLauncher false false true true false true true 0 0 20 20 Arial 0,0,0 8 500 version 3.0.2.7140.b1159 20 40 Arial 0,0,0 8 500 -1
                root 4253 3820 0 22:40 pts/1 00:00:00 tail -f ./logs/mirth.log
                root 4256 4150 0 22:41 pts/2 00:00:00 grep mirth
                [[email protected] ec2-user]# jstack -F 4013 > /tmp/mirththreaddump.txt
                bash: jstack: command not found

                ON Web UI I'm still getting "Invalid login credentials" and on MirthConnect Java client - "Server is still starting, please try again Shortly".

                Nick, please advise further. In the meantime I will try to downgrade back to 3.0.1 in the different directory. REALLY hope to get the 3.0.2 working though..

                Dan Z
                Attached Files

                Comment


                • #9
                  FailedStartupDowngrade301.txtAah, darn it - installed Mirth 3.0.1 to a different folder, copied over mirth.properties and mirth-cli-config.properties

                  ERROR 2014-04-21 23:04:32,059 [Thread-2] com.mirth.connect.server.Mirth: Failed to migrate database schema
                  com.mirth.connect.model.util.MigrationException: Failed to execute script: mysql-0-1.sql
                  at com.mirth.connect.server.migration.Migrator.execut eScript(Migrator.java:87)
                  at com.mirth.connect.server.migration.LegacyMigrator. migrate(LegacyMigrator.java:24)
                  at com.mirth.connect.server.migration.ServerMigrator. migrate(ServerMigrator.java:63)
                  at com.mirth.connect.server.controllers.DefaultMigrat ionController.migrate(DefaultMigrationController.j ava:85)
                  at com.mirth.connect.server.Mirth.startup(Mirth.java: 235)
                  at com.mirth.connect.server.Mirth.run(Mirth.java:154)
                  Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorEx ception: Unknown table 'mirthdb.TRANSPORT'
                  at sun.reflect.NativeConstructorAccessorImpl.newInsta nce0(Native Method)
                  So, I am unable to run either 3.0.1 or 3.0.2 - for various reasons... SOS

                  thanks
                  Dan
                  Attached Files
                  Last edited by dzilberman; 04-21-2014, 10:34 PM. Reason: Attached list of Tables from mirthdb after upgrade to 3.0.2

                  Comment


                  • #10
                    Morning,

                    I need to know how to restore some Mirth environment working ASAP, please!

                    1. What else can be debugged for Mirth 3.0.3 - maybe communications with DB (on a different server) are somehow broken, even though it is all correct in the mirth.properties? (please see output of NETSTAT attached) Has anybody else experienced similar issues (not just MirthConnect client but Web UI login issues) and what was their workaround?

                    2. If I am rolling back to Mirth 3.0.1 (installing it from installer into a separate folder and then copying backed up ./conf directory contents into its /conf folder), why does it give me that "failed to migrate MySQL Db schema.." error? Was mirthdb schema already updated to work with 3.0.2 irreversibly?

                    I understand Mirth is an open source software - but was getting a good support so far and hope to get this urgent issue resolved with the help of Mirth experts like Nick.

                    Dan Z

                    Comment


                    • #11
                      Happening to me also. Does this help tell what is going on?
                      Attached Files

                      Comment


                      • #12
                        Originally posted by KJB View Post
                        Happening to me also. Does this help tell what is going on?
                        What environment are you on? OS, database, Java version, etc. Is it an upgrade, or a fresh install?
                        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.

                        Comment


                        • #13
                          Ubuntu linux 12.04lts
                          mysql

                          java -version
                          java version "1.7.0_51"
                          OpenJDK Runtime Environment (IcedTea 2.4.4) (7u51-2.4.4-0ubuntu0.12.04.2)
                          OpenJDK 64-Bit Server VM (build 24.45-b08, mixed mode)

                          It was an upgrade. 23 channels.

                          Comment


                          • #14
                            I'm still having issues as well. Spent the last day trying to figure this one out with no luck.

                            Using Debian (squeez) 6
                            Mysql 5.1.72-2
                            Mirth 3.0.2
                            Was an upgrade from 3.0.1 to 3.0.2

                            Comment


                            • #15
                              Guys, what do you use for obtaining mirthdump - "jstack"? Where do you get it?
                              I am on UBUNTU (hosted in AWS), MySQL 5.5 on UBUNTU as well, Upgrade 3.0.1 ==> 3.0.2 and no longer can login with "admin" or other users to neither Web UI or MirthConnect.

                              thx,
                              Dan

                              Comment

                              Working...
                              X