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

  • #31
    mirth properties

    Properties file attached.

    Also, I notice that when I try to do a "select 1 from channel" mysql complains it does not exist. When I change the table name to upper case "CHANNEL" the query returns fine.
    Attached Files
    Last edited by rastababy; 04-23-2014, 08:52 AM.

    Comment


    • #32
      So mysql on linux is case senstive. The source in the method "DefaultConfigurationContoller.isDatabaseRunning() " :

      statement.execute("SELECT 1 FROM channel");

      'channel' is lowercase and the database table is 'CHANNEL'...upper case in the database. On Unix or Linux mysql is case sensitive so this code will not work in its current state.

      There is a setting with mysql: lower_case_table_names that you can set to 0,1,2 but the database will need to be re-created I believe.

      I did not run into this with 3.0.1, only with 3.0.2. I've overwritten my source from 3.0.1 so I cannot check the method call to see if "CHANNEL" or 'channel' is used.

      Comment


      • #33
        In 3.0.1 lowercase "channel" was also used. Can you try setting lower_case_table_names to 1?

        http://dev.mysql.com/doc/refman/5.5/...nsitivity.html

        If you plan to set the lower_case_table_names system variable to 1 on Unix, you must first convert your old database and table names to lowercase before stopping mysqld and restarting it with the new variable setting. To do this for an individual table, use RENAME TABLE:

        Code:
        RENAME TABLE T1 TO t1;
        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


        • #34
          I have fixed the access issue for the "jakari_emr" DB user right after that exception and few min later have Mirth (brand new instance running against clean MySQL scheme) starting up OK:
          INFO 2014-04-23 08:47:05,803 [Thread-5] com.mirth.connect.server.Mirth: shutting down mirth due to normal request
          INFO 2014-04-23 08:53:56,530 [Thread-2] com.mirth.connect.server.Mirth: Mirth Connect 3.0.2.7140 (Built on April 15, 2014) server successfully started.
          INFO 2014-04-23 08:53:56,534 [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-23 08:53:56,534 [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-23 08:53:56,535 [Thread-2] com.mirth.connect.server.Mirth: Web server running at http://172.31.16.10:9080/ and https://172.31.16.10:9443/
          Webadmin is up and running: but the default credentials do not work the moment I switched to MySQL DB from Derby!

          I have attached mirth.properties for this brand new instance - which is 100% same as for upgraded one except the db url ends with "mirthdbnew" vs/ "mirthdb".

          Where does interactive actions (logins, navigation) get logged - there must be some embedded Web server for that, where is its log file?

          I've been pretty happy with Mirth so far but this somehow became a huge issue as my Dev environment is hosed....
          Attached Files

          Comment


          • #35
            Yes, I will report back once completed.. Thanks..
            Last edited by rastababy; 04-23-2014, 11:52 AM.

            Comment


            • #36
              I don't think that issue of tables case is problem for me - Mirth service does start up after all - but is there ANY WAY to check that encrypted default password value (SHA1?) for "admin" entry in the PERSON_PASSWORD table is indeed what it is supposed to be?
              Is there any way to see messages after confirmation of Mirth startup:
              which is always last line in my mirth.log?

              Comment


              • #37
                Okay do this guys:

                Code:
                CREATE VIEW channel AS SELECT * FROM CHANNEL;
                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


                • #38
                  I've updated the first post in this thread and made it a sticky for now. Look here for more info: MIRTH-3247
                  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


                  • #39
                    Thanks Nick, but is it supposed to resolve my authentication issue with MySQL if that view is created? I am really stuck and need to get that resolved - if with brand new DB, then export form old MYSQL DB and import into the new one. Please advise!

                    Comment


                    • #40
                      Originally posted by dzilberman View Post
                      Thanks Nick, but is it supposed to resolve my authentication issue with MySQL if that view is created? I am really stuck and need to get that resolved - if with brand new DB, then export form old MYSQL DB and import into the new one. Please advise!
                      Yes it should resolve that issue, because it was never really an authentication issue to begin with. That is, your username/password was fine, it was just the servlet code handling the login that was failing.
                      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


                      • #41
                        Thank you nick!!!

                        Comment


                        • #42
                          Originally posted by narupley View Post
                          Yes it should resolve that issue, because it was never really an authentication issue to begin with. That is, your username/password was fine, it was just the servlet code handling the login that was failing.
                          Nick - big thanks again for providing the workaround above. So, the servlet code was looking for "channels" tables vs. "CHANNEL", not finding it and hiding an exception but popping the "Invalid Username of Password" instead?

                          Good "lesson learned" story for all of us, here are a couple of things I would conclude from this experience as a Mirth user/developer:

                          1. Improve error messaging: the Invalid Login was VERY misleading and sent us along the path of checking DB connectivity, resetting "admin" password etc. Something more like "System experienced internal error, please see details in the Log file"?

                          2. Speaking of the log file: despite the fact that logging levels in mirth.properties are all set to DEBUG:

                          # Mirth Connect channel logging
                          log4j.logger.transformer = DEBUG
                          log4j.logger.preprocessor = DEBUG
                          log4j.logger.postprocessor = DEBUG
                          log4j.logger.deploy = DEBUG
                          log4j.logger.shutdown = DEBUG
                          log4j.logger.filter = DEBUG
                          log4j.logger.db-connector = DEBUG
                          log4j.logger.js-connector = DEBUG
                          log4j.logger.attachment = DEBUG
                          there were NO messages about failing servlet in the log, last one was always:
                          INFO 2014-04-23 22:48:53,569 [Thread-2] com.mirth.connect.server.Mirth: Web server running at http://172.31.16.10:9080/ and https://172.31.16.10:9443/
                          and no more details which otherwise would help to get to the root cause.

                          Don't mean this as a criticism, just a feedback - and thanks again for answering all of my questions (except one about the proper input format for XML with namespaces passed into Web Service Listener

                          cheers,
                          Dan Z

                          Comment


                          • #43
                            I second that. Nick thanks for all the help on this one! The view creation works like a charm. Do you think they will update the code to use UPPERCASE or the documentation to let MySQL users know ?

                            Thanks again.

                            Comment


                            • #44
                              Originally posted by rastababy View Post
                              I second that. Nick thanks for all the help on this one! The view creation works like a charm. Do you think they will update the code to use UPPERCASE or the documentation to let MySQL users know ?

                              Thanks again.
                              By "they" do you mean the Mirth Connect developers, of which I am one? haha

                              We're actually already using uppercase everywhere else, it was just this one query that was apparently overlooked. But in this case, we would probably change it from "SELECT 1 FROM channel" to just "SELECT 1". The point of the query is just to verify if the server has connectivity to the database.
                              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

                              Working...
                              X