Mirth Community

Mirth Community (http://www.mirthcorp.com/community/forums/index.php)
-   Support (http://www.mirthcorp.com/community/forums/forumdisplay.php?f=6)
-   -   Unable to login to Administrator with 3.0.2 running on MySQL in Unix/Linux (http://www.mirthcorp.com/community/forums/showthread.php?t=10388)

dzilberman 04-20-2014 11:24 PM

Unable to login to Administrator with 3.0.2 running on MySQL in Unix/Linux
 
3 Attachment(s)
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)

Quote:

...
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.

dzilberman 04-20-2014 11:26 PM

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)

narupley 04-21-2014 06:56 AM

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).

dzilberman 04-21-2014 09:44 AM

1 Attachment(s)
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

narupley 04-21-2014 10:16 AM

It looks like the server is still starting. Did you just recently restart? And is there anything new in the server log?

dzilberman 04-21-2014 10:43 AM

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:

Quote:

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

narupley 04-21-2014 12:00 PM

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.

dzilberman 04-21-2014 09:53 PM

Added debugging, still same problem on both UI and Java clients
 
2 Attachment(s)
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:

Quote:

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
[root@app-01 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

dzilberman 04-21-2014 10:18 PM

2 Attachment(s)
Attachment 1851Aah, darn it - installed Mirth 3.0.1 to a different folder, copied over mirth.properties and mirth-cli-config.properties

Quote:

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

dzilberman 04-22-2014 10:11 AM

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


All times are GMT -8. The time now is 06:15 AM.

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