Can't login after setting up Mapstore2

524 views
Skip to first unread message

kevin duyang

unread,
Jul 19, 2018, 3:52:37 AM7/19/18
to mapstor...@googlegroups.com



I can't be able to login after I setup Mapstore2 via npm, I used admin admin as username and password.  anyone can help me? Thankyou

kevin duyang

unread,
Jul 19, 2018, 3:54:49 AM7/19/18
to mapstore-users

Lorenzo Natali

unread,
Jul 19, 2018, 7:04:27 AM7/19/18
to mapstor...@googlegroups.com
Hi kevin,
by default, if you're running mapstore using npm start, you will be connected to the remote dev server, that has other credentials. 
You have to follow the instructions here (section: Backend services debugging) to to run also the back-end.
Note that the documentation is not updated, instead of webpack.config.js you have to edit devServer options in the file buildConfig.js

--
You received this message because you are subscribed to the Google Groups "mapstore-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mapstore-user...@googlegroups.com.
To post to this group, send email to mapstor...@googlegroups.com.
Visit this group at https://groups.google.com/group/mapstore-users.
For more options, visit https://groups.google.com/d/optout.

Lorenzo Natali

unread,
Jul 19, 2018, 7:09:37 AM7/19/18
to mapstor...@googlegroups.com
By the way, I fixed the documentation (webpack.config.js --> buildConfig.js) on github right now so it will be updated soon by CI

Ed de la Paz

unread,
Jul 22, 2018, 10:56:09 PM7/22/18
to mapstore-users
I encountered the same issue I cannot login after following the Backend services debugging...admin,admin and user,user doesn't work...but it creates a test.h2.db when running mvn jetty:run

kevin duyang

unread,
Jul 23, 2018, 3:03:36 AM7/23/18
to mapstore-users
Hi Lorenzo, I followed the tutorials you've given, but still, I can't login. do you have any Idea?

Lorenzo Natali

unread,
Jul 23, 2018, 4:05:11 AM7/23/18
to mapstor...@googlegroups.com
Hi Kevin, 
I tested the procedure and actually I needed to configure the devServer in a different way, using mvn jetty:run. 

Probably the documentation refers to a different test configuration (with an existing mapstore running in tomcat, for instance) 
The correct configuration (using jetty:run) is  this:
devServer: { proxy: { '/rest/': { target: "http://localhost:8080" }, '/proxy': { target: "http://localhost:8080", secure: false }, '/docs': { target: "http://localhost:8081", pathRewrite: { '/docs': '/mapstore/docs' } } } },
(you have to restart npm start Please make you sure to run mvn jetty:run and npm start in 2 different consoles).

Please try and let me know if it works for you, so I'm going to update the documentation. 
Thank you. 

kevin duyang

unread,
Jul 23, 2018, 4:37:27 AM7/23/18
to mapstore-users
Hi Lorenzo, Still didn't work. but I think the problem is conflict with a port because the geoserver have already taken the port 8080. isn't it the problem or not? 

Lorenzo Natali

unread,
Jul 23, 2018, 10:14:46 AM7/23/18
to mapstor...@googlegroups.com
Yes, that is a problem for sure. 
To change the port you have to edit the pom.xml in the root of the project.
Add httpConnector entry to the jetty-maven-plugin, like this 
<plugin>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-maven-plugin</artifactId>
<version>9.2.11.v20150529</version>
<configuration>
// add these lines
<httpConnector>
<port>9999</port>
</httpConnector>
// ^^ end of lines to add
<systemProperties>
<systemProperty>
<name>log4j.configuration</name>
<value>log4j-test.properties</value>
</systemProperty>
</systemProperties>
</configuration>
</plugin>


and configure the devServer to use port 9999 for all the 3 entries of the proxy, instead of 8080

kevin duyang

unread,
Jul 23, 2018, 10:18:08 PM7/23/18
to mapstor...@googlegroups.com
Hi Lorenzo,

Gotcha! it work's very well! thank you so much.

Reply all
Reply to author
Forward
0 new messages