Hello
I am trying to installing OpenMRS Standalone 12.2.2 on my MacbookPro
I do not have experience in programming
it gives an error.
I have copied this file below. Can you please tell me whether this installation can be done or its not easy for a non-programmer?
Thanks in advance
Kumara
Initial configuration needed
Deleting active database
Unzipping database from demodatabase.zip
Resetting connection.password to ‘test’
Attempting to load properties file in current directory: openmrs-standalone-runtime.properties
Using runtime properties file: openmrs-standalone-runtime.properties
Attempting to load properties file in current directory: openmrs-standalone-runtime.properties
Using runtime properties file: openmrs-standalone-runtime.properties
Working directory is /Applications/referenceapplication-standalone-2.12.2/.
Opening MySQL connection to create openmrs/test users
[MysqldResource] launching mysqld (driver_launched_mysqld_1)
Exception in thread “driver_launched_mysqld_1” com.mysql.management.util.WrappedException: java.io.IOException: Cannot run program “/Applications/referenceapplication-standalone-2.12.2/database/bin/mysqld”: error=86, Bad CPU type in executable
at com.mysql.management.util.Exceptions.toRuntime(Exceptions.java:55)
at com.mysql.management.util.Exceptions$Block.exec(Exceptions.java:89)
at com.mysql.management.util.RuntimeI$Default.exec(RuntimeI.java:180)
at com.mysql.management.util.Shell$Default.run(Shell.java:140)
at java.lang.Thread.run(Thread.java:750)
Caused by: java.io.IOException: Cannot run program “/Applications/referenceapplication-standalone-2.12.2/database/bin/mysqld”: error=86, Bad CPU type in executable
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1048)
at java.lang.Runtime.exec(Runtime.java:621)
at com.mysql.management.util.RuntimeI$Default$1.inner(RuntimeI.java:177)
at com.mysql.management.util.Exceptions$Block.exec(Exceptions.java:86)
… 3 more
Caused by: java.io.IOException: error=86, Bad CPU type in executable
at java.lang.UNIXProcess.forkAndExec(Native Method)
at java.lang.UNIXProcess.(UNIXProcess.java:247)
at java.lang.ProcessImpl.start(ProcessImpl.java:134)
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029)
… 6 more
Hi - I’m getting the same error messages, and can’t find an answer to this issue on the site. I’m on MacOS Ventura 13.4.1. I’ve installed Java v8 update 3.8.1. I am a technopeasant and have no programming knowledge whatsoever.
I followed the link to Paste Bin but couldn’t figure out how to use it to share on this site. (I think I’ve maxed out on doing stuff I do not remotely understand for today!)
Thank you for your email.
No. I have up. I support my team mostly remotely, so if I can’t work out setup remotely, then OpenMRS is too hard to set up for the team. It looked great
sorry too hard for this volunteer
Ann
Dr Ann M Clarke
Businesses for Health Papua New Guinea
Unfortunately, the OpenMRS Standalone doesn’t work on newer Macbook Pro’s; while it works on Intel-based MacBooks, it does not work on Apple Silicon (so any MacBook Pro released after 2021 or 2020 for the 13in model). The technology we relied on to make the standalone work has not been updated in some time and there’s currently no replacement for it.
Sorry for slow reply! Wondering if you had the same problem as I did? I found eventually that the problem was the version of Java I’d installed - my Mac has an M1 chip, not Intel, so I needed the ARM64 version, not the 64-bit Intel one.
Once I’d sorted that out, I could install and open the standalone version. Now to learn how to use it…
Sorry for slow reply, have been away for a bit. THanks for following up, I found the problem! I’d downloaded Java for macOS Intel, not ARM64 for M1 chip.
It seems like there are several issues in the provided error message. Kindly let us break it down and address each problem:
Missing Resource Exception:Caused by: java.util.MissingResourceException: Resource '5-5-9/Mac_OS_X-aarch64/mysqld' not found
This error indicates that a required resource, specifically the MySQL executable (mysqld ), is not found. To fix this make sure that the MySQL executable is available in the specified location. It seems like it’s looking for the executable under '5-5-9/Mac_OS_X-aarch64/mysqld' . Ensure that the MySQL installation is complete and that the executable is in the expected path.
MySQL Connection Exception:Exception in thread "main" com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: Could not create connection to database server. Attempted reconnect 3 times. Giving up.
This error suggests that the application is unable to establish a connection to the MySQL database server. Possible reasons include incorrect database server credentials, database server not running, or network issues.
Ensure that the MySQL server is running.
Verify that the database connection properties (such as username, password, and database name) in the openmrs-standalone-runtime.properties file are correct.
Check if there are any firewall or network issues preventing the application from connecting to the MySQL server.
Other Information:
Unzipping database from demodatabase.zip
Resetting connection.password to 'test'
These lines indicate that the application is unzipping a database from a ZIP file (demodatabase.zip ) and resetting the MySQL connection password to ‘test’. Ensure that the database ZIP file exists and is not corrupted. Also, confirm that the specified password is correct and matches the MySQL server configuration.
In short, address the missing resource issue by ensuring the MySQL executable is in the expected location. Then, troubleshoot the MySQL connection issue by verifying server availability, credentials, and network connectivity and you will be good to go.
Thanks very much for this. It’s over my head, but I’m trying…
Missing resource exception: Is that file path specified by the reference application?
Can you tell me how to find where MySQL executable is sitting on my computer? I googled it, couldn’t find anything; have also searched the hard drive for “mysqld” - nothing - although MySQL is installed
MySQL Connection Exception: The MySQL server is definitely running. I couldn’t find an app to open the .properties file
I thought the standalone app was usable by those of us with no tech background, but apparently not!! If this all sounds like my knowledge gap is too large, let me know. I will see if I can find an extremely patient person to help me with the set up.
To find the MySQL Executable on your computer try the following steps basing on your OS:
On Windows OS:
Check the MySQL Installation Directory:
By default, MySQL is often installed in C:\Program Files\MySQL\MySQL Server\ or C:\Program Files (x86)\MySQL\MySQL Server\.
Check System Path:
MySQL executable might be added to the system path. Open a command prompt and type mysql or mysqld and press Enter. If MySQL is in the path, the command should execute.
Check Services:
Open the Services application (services.msc) and look for the MySQL service. The executable path should be mentioned there.
On Linux machine:
MySQL is often installed in /usr/bin or /usr/sbin . You can use the which command to find the location of the executable. This is the command: which mysql
Also you can use this command service mysql status to check the MySQL service status and find the executable path:
Am sorry your MySQL server is running but you are having trouble connecting, kindly do mind making sure that you have the correct connection properties in your application. Check the following:
Hostname and Port:
Ensure that you are connecting to the correct hostname and port where MySQL is running.
Username and Password: Double-check the username and password used for the MySQL connection.
Lastly, you can open a .properties file and to find a specific application, you can use a text editor to open it. .properties files are often plain text files and can be edited with any text editor like Notepad (Windows), TextEdit (Mac), or editors like VSCode, Sublime Text, etc.
If you are on the command line, you can use commands like cat or vi (on Linux) or type (on Windows) to view or edit the file i.e
cat filename.properties # Linux
type filename.properties # Windows
kindly make sure to replace filename.properties with the actual name of your .properties file.