Cannot login on new install
-
Hi,
Installed free-m2m2-core-3.3.0.zip on linux (Fedora 27).I added a line to ma.sh as mango would not start, as it was trying to connect to the x11 display.
$ grep JAVAOPTS *.sh
ma.sh:JAVAOPTS=" -Djava.awt.headless=true"I connect to http://localhost:8080 and get the mango login screen, but cannot connect as admin/admin.
The log on the terminal screen shows
WARN 2018-02-04T17:43:39,781 (com.serotonin.m2m2.web.mvc.spring.security.MangoAuthenticationFailureHandler.saveExceptionImpl:81) - Failed login attempt on user 'admin' from IP +0:0:0:0:0:0:0:1
Any tips for next steps
Thanks
-
Hi rob987,
You may have been able to solve the X11 issue by changing the env.properties setting
web.openBrowserOnStartup=true
to false, although this shouldn't prevent starting.You can try logging in on the /login.shtm page.
You can shut Mango down, move your Mango/databases/ directory, and start again, which will start on a clean, new database.
You can see if this topic has useful information, such as setting a user's password through the database, https://forum.infiniteautomation.com/topic/2926/forget-the-password-of-admin-how-to-get-it-back
-
Hi,
Moving the /databases directory solved the problem.
I first started mango (ma.sh start) as a user, and it appeared to start OK, but I could not login, so the database user creation must have failed !!After moving the database, I started with
$sudo ./bin/ma.sh start
Connected to localhost:8080 and logged in as admin :-)
Fedora 27, by default uses the wayland display server, which will not let root processes attach to it, if it is running as an ordinary user.
see
[link text](https://docs.fedoraproject.org/f27/system-administrators-guide/Wayland.html
and
[link text](https://ask.fedoraproject.org/en/question/97856/why-do-i-get-an-error-launching-gedit-with-sudo-in-fedora-25/Maybe a new option should be added to the env.properties to allow the server to start in "headless mode", so when I upgrade mango, I do not lose my "-Djava.awt.headless=true" hack
Thanks for the prompt help
-
Certainly!
Check out the ext scripts in Mango/bin/ext-available. You can write an ext script to append that to the JAVAOPTS and it won't be removed at upgrade. Scripts in Mango/bin/ext-enabled are executed at various points in the script lifecycle with $1 like 'start' or 'init' or 'restart' or 'stop'