Error 504 ECONNREFUSED

1,402 views
Skip to first unread message
Assigned to lorenzo...@geosolutionsgroup.com by me

wesley mezine

unread,
Jul 13, 2022, 2:54:21 PM7/13/22
to mapstore-developers
Hello,

Can you help me with error 504?

[HPM] Error occurred while trying to proxy request /rest/geostore/extjs/search/category/CONTEXT/***/thumbnail,details,featured?start=0&limit=1 from localhost:8081 to http://localhost:8080/mapstore (ECONNREFUSED) (https://nodejs.org/api/errors.html#errors_common_system_errors)
[HPM] Error occurred while trying to proxy request /rest/geostore/extjs/search/category/DASHBOARD/***/thumbnail,details,featured?start=0&limit=12 from localhost:8081 to http://localhost:8080/mapstore (ECONNREFUSED) (https://nodejs.org/api/errors.html#errors_common_system_errors)
[HPM] Error occurred while trying to proxy request /rest/geostore/extjs/search/category/MAP/***/thumbnail,details,featured?start=0&limit=12&includeAttributes=true from localhost:8081 to http://localhost:8080/mapstore (ECONNREFUSED) (https://nodejs.org/api/errors.html#errors_common_system_errors)    
[HPM] Error occurred while trying to proxy request /rest/geostore/extjs/search/category/GEOSTORY/***/thumbnail,details,featured?start=0&limit=12 from localhost:8081 to http://localhost:8080/mapstore (ECONNREFUSED) (https://nodejs.org/api/errors.html#errors_common_system_errors)
[HPM] Error occurred while trying to proxy request /rest/geostore/extjs/search/list?includeAttributes=true&start=0&limit=4 from localhost:8081 to http://localhost:8080/mapstore (ECONNREFUSED) (https://nodejs.org/api/errors.html#errors_common_system_errors)
[HPM] Error occurred while trying to proxy request /rest/geostore/extjs/search/list?includeAttributes=true&start=0&limit=4 from localhost:8081 to http://localhost:8080/mapstore (ECONNREFUSED) (https://nodejs.org/api/errors.html#errors_common_system_errors)
[HPM] Error occurred while trying to proxy request /rest/geostore/extjs/search/category/DASHBOARD/***/thumbnail,details,featured?start=0&limit=12 from localhost:8081 to http://localhost:8080/mapstore (ECONNREFUSED) (https://nodejs.org/api/errors.html#errors_common_system_errors)
[HPM] Error occurred while trying to proxy request /rest/geostore/extjs/search/category/GEOSTORY/***/thumbnail,details,featured?start=0&limit=12 from localhost:8081 to http://localhost:8080/mapstore (ECONNREFUSED) (https://nodejs.org/api/errors.html#errors_common_system_errors)
[HPM] Error occurred while trying to proxy request /rest/geostore/extjs/search/category/CONTEXT/***/thumbnail,details,featured?start=0&limit=1 from localhost:8081 to http://localhost:8080/mapstore (ECONNREFUSED) (https://nodejs.org/api/errors.html#errors_common_system_errors)
[HPM] Error occurred while trying to proxy request /rest/geostore/extjs/search/category/MAP/***/thumbnail,details,featured?start=0&limit=12&includeAttributes=true from localhost:8081 to http://localhost:8080/mapstore (ECONNREFUSED) (https://nodejs.org/api/errors.html#errors_common_system_errors)    
[HPM] Error occurred while trying to proxy request /rest/geostore/extjs/search/list?includeAttributes=true&start=0&limit=4 from localhost:8081 to http://localhost:8080/mapstore (ECONNREFUSED) (https://nodejs.org/api/errors.html#errors_common_system_errors)
[HPM] Error occurred while trying to proxy request /rest/geostore/extjs/search/list?includeAttributes=true&start=0&limit=4 from localhost:8081 to http://localhost:8080/mapstore (ECONNREFUSED) (https://nodejs.org/api/errors.html#errors_common_system_errors)
[HPM] Error occurred while trying to proxy request /rest/geostore/extjs/search/category/CONTEXT/***/thumbnail,details,featured?start=0&limit=1 from localhost:8081 to http://localhost:8080/mapstore (ECONNREFUSED) (https://nodejs.org/api/errors.html#errors_common_system_errors)
[HPM] Error occurred while trying to proxy request /rest/geostore/extjs/search/category/DASHBOARD/***/thumbn[HPM] Error occurred while trying to proxy request /rest/geostore/session/login from localhost:8081 to http://localhost:8080/mapstore (ECONNREFUSED) (https://nodejs.org/api/errors.html#errors_common_system_errors)  
[HPM] Error occurred while trying to proxy request /rest/geostore/session/login from localhost:8081 to http://localhost:8080/mapstore (ECONNREFUSED) (https://nodejs.org/api/errors.html#errors_common_system_errors)  

Thanks a lot!
Captura de tela 2022-07-07 053117.png

Lorenzo Natali

unread,
Jul 25, 2022, 3:48:31 AM7/25/22
to mapstore-developers
Hi,
It seems like your backend is not running on port 8080. To make it run, you should run `npm run backend` or install mapstore.war in a tomcat hosted running on port 8080.

wesley mezine

unread,
Jul 28, 2022, 2:17:37 AM7/28/22
to mapstore-developers
Hello Lorenzo,

My backend does not run on port 8080.

My buildConfig.js:

},
    devServer: devServer || {
        publicPath: "/dist/",
        proxy: proxy || {
            '/rest': {
                target: "https://localhost:8080/mapstore",
                secure: false
            },

            '/proxy': {
                target: "https://localhost:8080/mapstore",
                secure: false
            }
        }
    },



And my localConfig.json

"authenticationRules": [{
        "urlPattern": ".*geostore.*",
        "method": "bearer"
      }, {
        "urlPattern": ".*rest/config.*",
        "method": "bearer"
    }],

Are these settings ok? They were the only ones I changed after cloning the Mapstore from GIT.

Regards,

Wesley

Lorenzo Natali

unread,
Jul 28, 2022, 4:26:30 AM7/28/22
to mapstore-developers
buildConfig.js part configures how front-end dev environment communicates with the back-end. localConfig.json configures the front-end itself.
They are ok, but they are not involved in starting the back-end. From the logs you sent, the back-end is not running, so this is the problem.

You should look at the output of the `npm run backend` command, or to the logs of tomcat (depending on the strategy you used to setup your dev env), to see if there there is some error that doesn't make the back-end start. 

I can suggest make sure that you fulfilled the requirements and to communicate the information about your environment, to help us to understand.

wesley mezine

unread,
Aug 18, 2022, 5:44:15 AM8/18/22
to mapstore-...@googlegroups.com
Hi Lorenzo,

I ran npm run backend and I ran npm start on my frontend. I have the results in my prompt command attached in this email.

Thanks a lot,

Wesley



--
You received this message because you are subscribed to the Google Groups "mapstore-developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mapstore-develo...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/mapstore-developers/00fc185a-adc1-4118-99ba-d2f9dddba457n%40googlegroups.com.
npm_start.txt
npm_run_backend.txt

wesley mezine

unread,
Aug 18, 2022, 5:53:49 AM8/18/22
to mapstore-...@googlegroups.com
Hi Lorenzo

My dev env used:

npm --v
6.13.4

node
Welcome to Node.js v12.16.1.

java -version
java version "11.0.13" 2021-10-19 LTS
Java(TM) SE Runtime Environment 18.9 (build 11.0.13+10-LTS-370)
Java HotSpot(TM) 64-Bit Server VM 18.9 (build 11.0.13+10-LTS-370, mixed mode)

mvn -version
Apache Maven 3.6.3 (cecedd343002696d0abb50b32b541b8a6ba2883f)
Maven home: C:\apache-maven-3.6.3\bin\..
Java version: 11.0.13, vendor: Oracle Corporation, runtime: C:\Program Files\Java\jdk-11.0.13
Default locale: pt_BR, platform encoding: Cp1252
OS name: "windows 10", version: "10.0", arch: "amd64", family: "windows"

Regards,

Wesley

Em qui., 28 de jul. de 2022 às 05:26, Lorenzo Natali <lorenzo...@geosolutionsgroup.com> escreveu:
--

Lorenzo Natali

unread,
Aug 22, 2022, 6:10:33 AM8/22/22
to mapstore-...@googlegroups.com
Unfortunately I can't replicate it.
I tested creating, on windows, a brand new project from branch 2022.01.xx and it worked. 

Can you try this way?


wesley mezine

unread,
Aug 25, 2022, 6:43:25 AM8/25/22
to mapstore-developers
I tested  creating a brand new project from branch 2022.01.xx and not worked.

I use windows 11, is this a problem?

I have other question, which path path localConfig.json do i use?

localConfig.png

Lorenzo Natali

unread,
Aug 26, 2022, 4:21:10 AM8/26/22
to mapstore-...@googlegroups.com
Good to know,
If you created a new project and you want to customize localConfig.json, you have to copy it from web/client/configs into /configs in the root of your project and modify js/app.jsx to point to your new file (you can find the instructions in comments in your new app.jsx

wesley mezine

unread,
Aug 27, 2022, 5:49:43 AM8/27/22
to mapstore-...@googlegroups.com
Hello, Lorenzo!

I used ./build.sh and my backend worked now.

Thanks a lot!

Reply all
Reply to author
Forward
0 new messages