SMOKE-MOVES installation fail

Hi all,

I am trying to setup MOVES 2014 on a linux system and following the guide below

  1. install Java (version 7 or 8) and MySQL (version 5.5 or newer)
    [jhuang@ncaqc2017 ~/MOVES2014] java -version openjdk version "1.8.0_161" OpenJDK Runtime Environment (build 1.8.0_161-b14) OpenJDK 64-Bit Server VM (build 25.161-b14, mixed mode) [jhuang@ncaqc2017 ~/MOVES2014] mysql -V
    mysql Ver 15.1 Distrib 5.5.60-MariaDB, for Linux (x86_64) using readline 5.1


  1. install MOVES2014a on a windows computer and copy the dir to the linux system
    [jhuang@ncaqc2017 ~/MOVES2014]$ ls
    build.xml MOVESAlgorithms.html NonroadTableFilter.csv
    CalculatorInfo.txt MOVESComputerID.txt PriorMasterID.txt
    HotSoakCursor.txt MOVESConfiguration.Distributed.txt setDistributed.bat
    License.txt MOVESConfiguration.Local.txt setenv.bat
    maketodo.Distributed.txt MOVESConfiguration.original.latest.txt setLocal.bat
    maketodo.Local.txt MOVESConfiguration.Original.txt smallenv.bat
    maketodo.original.latest.txt MOVESConfiguration.txt SVTHCursor.txt
    maketodo.Original.txt MOVES.ico WorkerConfiguration.Distributed.txt
    maketodo.txt moveslog_old.txt WorkerConfiguration.Local.txt
    manyworkers.Distributed.txt moveslog.txt WorkerConfiguration.original.latest.txt
    manyworkers.Local.txt MOVESMaster.bat WorkerConfiguration.Original.txt
    manyworkers.original.latest.txt MOVESWindows.txt WorkerConfiguration.txt
    manyworkers.Original.txt MOVESWorker.bat
    manyworkers.txt mrulist.tmp


  1. Running MySQL as root
    Changing the mysqld user will depend on your system. For example, on an Amazon Linux system, edit the file /etc/init.d/mysqld . Look in the start() section and find the chunk:
$exec   --datadir="$datadir" --socket="$socketfile" \
	--pid-file="$mypidfile" \
	--basedir=/usr --user=mysql >/dev/null 2>&1 &

Change --user=mysql to --user=root and save the file. Restart the MySQL server (the exact command will depend on your system):

sudo /etc/init.d/mysqld restart

However, I cannot find /etc/init.d/mysqld this file I do find

[jhuang@ncaqc2017 init.d]$ ls /bin/mysqld*
/bin/mysqld_multi /bin/mysqld_safe /bin/mysqld_safe_helper /bin/mysqldump /bin/mysqldumpslow

can anyone help me with this?

Thank you

Joey Huang

Environmental Program Consultant, Attainment Planning Branch

Division of Air Quality, Planning Section

North Carolina Department of Environmental Quality

Your Linux box is probably using the newer systemd for launching daemons. Check the status of the mysqld process like so:

$ systemctl status mysqld.service
● mariadb.service - MariaDB 10.2 database server
   Loaded: loaded (/usr/lib/systemd/system/mariadb.service; enabled; vendor preset: disabled)
  Drop-In: /usr/lib/systemd/system/mariadb.service.d
   Active: active (running) since Sun 2018-11-04 13:58:37 EST; 3 days ago

Looking at the service config file (/usr/lib/systemd/system/mariadb.service), it mentions creating a file in /etc/systemd/system/mariadb.service.d/. I haven’t tried this out but here’s my suggestion.

$ sudo touch /etc/systemd/system/mariadb.service.d/root.conf

Edit this file to contain the following:


Then reload the systemd daemon:

$ sudo systemctl --system daemon-reload

And restart mysqld

$ sudo systemctl restart mysqld.service

If it worked, running ps aux | grep mysqld should show the process owner as root instead of mysql.

Hi Catherine,

I am having some questions about the steps you suggest,

  1. mysqld.service is not found
    [jhuang@ncaqc2017 ~]$ systemctl status mysqld.service
    Unit mysqld.service could not be found.

but we have
[jhuang@ncaqc2017 ~]$ systemctl status mariadb.service
● mariadb.service - MariaDB database server
Loaded: loaded (/usr/lib/systemd/system/mariadb.service; enabled; vendor preset: disabled)
Drop-In: /etc/systemd/system/mariadb.service.d
Active: active (running) since Tue 2018-08-28 14:32:30 UTC; 2 months 16 days ago
Process: 123143 ExecStartPost=/usr/libexec/mariadb-wait-ready $MAINPID (code=exited, status=0/SUCCESS)
Process: 123111 ExecStartPre=/usr/libexec/mariadb-prepare-db-dir %n (code=exited, status=0/SUCCESS)
Main PID: 123142 (mysqld_safe)
CGroup: /system.slice/mariadb.service
├─123142 /bin/sh /usr/bin/mysqld_safe --basedir=/usr
└─123583 /usr/libexec/mysqld --basedir=/usr --datadir=/storage/highspeed/mysql --plugin-dir=/usr/lib64/mysql/plug…

  1. this mysql is also used real time for another project, we just wonder if we change
    User=root in /etc/systemd/system/mariadb.service.d/root.conf
    will this impact any other mysql usage?

here is what we have
[jhuang@ncaqc2017 mariadb.service.d]$ ls

is there other way to configure mysql?

Thank you.

Joey Huang

Environmental Program Consultant, Attainment Planning Branch

Division of Air Quality, Planning Section

North Carolina Department of Environmental Quality

We can see from the provided info that you have no MySQL service running. If possible, test as an ‘admin’ so permissions don’t get in your way. However, if you were logged in as admin and these are the messages, you might have a corrupt MySQL installation. You could also try running MariaDB 10.2.xx. If you want to try that, please let us know as we would want to provide a config file for it that has a couple key values.

Permissions wise I would make a super user and group, and associate all the MOVES info to that. So, Ant, MySQL/MariaDB, GO, etc., make sure you export your variables from shell to shell correctly. That will get you further down the road to making MOVES work. Also, you have to compile the Go code and put in a place that MOVES can run it(in the PATH). Oh, and make sure your directories and executable are reachable.

Note that changes to mysql passwords could impact other projects – so you’ll want to be careful with that.

Regarding mysqld.service vs. mariadb.service, no problem there. Some distributions throw in a symlink so mysqld maps to mariadb. But your installation of MariaDB looks fine.

In a shared database situation, switching to running under root is a security risk. You’re allowing other applications that use the database to have root access to your system. In terms of whether running as root would affect the other project, it depends on the specifics of what that project is doing, but most likely it wouldn’t be impacted.

Also of concern in a shared database situation is the configuration parameters you need to add for the database, specifically turning the case-sensitivity off with the lower_case_table_names parameter. Again, I’d say your other project most likely won’t be affected but it could be.

A couple of options I can come up with:

You can work on installing MOVES in a way where the MariaDB service user has the access it needs. The GitHub wiki talks about this a bit. I suspect you’ll need to run MOVES as the MariaDB user so that the temporary directories MOVES creates have the appropriate permissions for the database file reading and writing to work.

A different approach is to run a separate database server instance. I’ve successfully done this on shared compute clusters where I don’t have the ability to run the database as a daemon process. In this configuration, you directly initialize a new data directory and run MariaDB as a regular user on a different port. Then you configure MOVES to talk to that port instead of the main system database. This sidesteps permissions issues and shared configuration problems.