strongloop / strong-pm

deployer for node applications
http://strong-pm.io
Other
1k stars 71 forks source link

slc deploy, server listen on different port #309

Closed mike-aungsan closed 4 years ago

mike-aungsan commented 8 years ago

slc deploy http://127.0.0.1:8701/

Often have this error.

Error connecting to server: { [Error: Error: 503] statusCode: 503, details: '\r\nNetwork Error\r\n\r\n\r\n\r\n
\r\n
\r\n

\r\n\r\n\r\n\r\n\r\n\r\n
\r\n\r\nNetwork Error (tcp_error)\r\n
\r\n
\r\n
\r\n
\r\n\r\nA communication error occurred: "Connection refused"\r\n\r\n
\r\n\r\nThe Web Server may be down, too busy, or experiencing other problems preventing it from responding to requests. You may wish to try again at a later time.\r\n\r\n
\r\n\r\n
\r\nFor assistance, contact your network support team.\r\n
\r\n
\r\n
\r\n\r\n\r\n' } Failed to deploy ../dev-1.0.0.tgz as dev to http://127.0.0.1:8701/ via http://127.0.0.1:8701/

Once it was successful.

slc deploy http://localhost:8701/

Deployed ../dev-1.0.0.tgz as dev to `http://localhost:8701/

But the web server is listening on port 3006. In the config.json, port is 80. What wrong?

slc pm
slc pm(2684): StrongLoop PM v5.1.0 (API v6.1.0) on port 8701 slc pm(2684): Base folder /home/grp_ddoservice/.strong-pm slc pm(2684): Applications on port 3000 + service ID Browse your REST API at http://127.0.0.1:8701/explorer

../lib/kerberosgss.c:36:0: warning: ignoring #pragma clang diagnostic [-Wunknown-pragmas]

pragma clang diagnostic push

^ ../lib/kerberosgss.c:37:0: warning: ignoring #pragma clang diagnostic [-Wunknown-pragmas]

pragma clang diagnostic ignored "-Wdeprecated-declarations"

^ ../lib/kerberosgss.c: In function ‘authenticate_gss_client_wrap’: ../lib/kerberosgss.c:362:19: warning: variable ‘server_conf_flags’ set but not used [-Wunused-but-set-variable] char buf[4096], server_conf_flags; ^ ../lib/kerberosgss.c: At top level: ../lib/kerberosgss.c:930:0: warning: ignoring #pragma clang diagnostic [-Wunknown-pragmas]

pragma clang diagnostic pop

^ ../lib/kerberosgss.c:36:0: warning: ignoring #pragma clang diagnostic [-Wunknown-pragmas]

pragma clang diagnostic push

^ ../lib/kerberosgss.c:37:0: warning: ignoring #pragma clang diagnostic [-Wunknown-pragmas]

pragma clang diagnostic ignored "-Wdeprecated-declarations"

^ ../lib/kerberosgss.c: In function ‘authenticate_gss_client_wrap’: ../lib/kerberosgss.c:362:19: warning: variable ‘server_conf_flags’ set but not used [-Wunused-but-set-variable] char buf[4096], server_conf_flags; ^ ../lib/kerberosgss.c: At top level: ../lib/kerberosgss.c:930:0: warning: ignoring #pragma clang diagnostic [-Wunknown-pragmas]

pragma clang diagnostic pop

^ ../lib/kerberosgss.c:36:0: warning: ignoring #pragma clang diagnostic [-Wunknown-pragmas]

pragma clang diagnostic push

^ ../lib/kerberosgss.c:37:0: warning: ignoring #pragma clang diagnostic [-Wunknown-pragmas]

pragma clang diagnostic ignored "-Wdeprecated-declarations"

^ ../lib/kerberosgss.c: In function ‘authenticate_gss_client_wrap’: ../lib/kerberosgss.c:362:19: warning: variable ‘server_conf_flags’ set but not used [-Wunused-but-set-variable] char buf[4096], server_conf_flags; ^ ../lib/kerberosgss.c: At top level: ../lib/kerberosgss.c:930:0: warning: ignoring #pragma clang diagnostic [-Wunknown-pragmas]

pragma clang diagnostic pop

^ ../lib/kerberosgss.c:36:0: warning: ignoring #pragma clang diagnostic [-Wunknown-pragmas]

pragma clang diagnostic push

^ ../lib/kerberosgss.c:37:0: warning: ignoring #pragma clang diagnostic [-Wunknown-pragmas]

pragma clang diagnostic ignored "-Wdeprecated-declarations"

^ ../lib/kerberosgss.c: In function ‘authenticate_gss_client_wrap’: ../lib/kerberosgss.c:362:19: warning: variable ‘server_conf_flags’ set but not used [-Wunused-but-set-variable] char buf[4096], server_conf_flags; ^ ../lib/kerberosgss.c: At top level: ../lib/kerberosgss.c:930:0: warning: ignoring #pragma clang diagnostic [-Wunknown-pragmas]

pragma clang diagnostic pop

^ npm WARN package.json dev@1.0.0 No README data npm WARN package.json dev@1.0.0 No license field. Run request for commit "default/npm-pack" on current (none) Start Runner: commit default/npm-pack 2016-01-22T23:28:16.044Z pid:8880 worker:0 INFO strong-agent v2.0.2 profiling app 'dev' pid '8880' 2016-01-22T23:28:16.054Z pid:8880 worker:0 INFO strong-agent[8880] started profiling agent 2016-01-22T23:28:16.056Z pid:8880 worker:0 INFO supervisor starting (pid 8880) 2016-01-22T23:28:16.059Z pid:8880 worker:0 INFO strong-agent strong-agent using strong-cluster-control v2.2.1 2016-01-22T23:28:16.063Z pid:8880 worker:0 INFO supervisor reporting metrics to internal: 2016-01-22T23:28:16.075Z pid:8880 worker:0 INFO strong-agent not profiling, agent metrics requires a valid license. 2016-01-22T23:28:16.075Z pid:8880 worker:0 Please contact sales@strongloop.com for assistance. 2016-01-22T23:28:16.078Z pid:8880 worker:0 INFO supervisor size set to 2 2016-01-22T23:28:16.151Z pid:8880 worker:0 INFO supervisor started worker 1 (pid 8885) 2016-01-22T23:28:16.245Z pid:8880 worker:0 INFO supervisor started worker 2 (pid 8890) 2016-01-22T23:28:16.246Z pid:8880 worker:0 INFO supervisor resized to 2 2016-01-22T23:28:16.543Z pid:8885 worker:1 INFO strong-agent v2.0.2 profiling app 'dev' pid '8885' 2016-01-22T23:28:16.548Z pid:8885 worker:1 INFO strong-agent[8885] started profiling agent 2016-01-22T23:28:16.594Z pid:8890 worker:2 INFO strong-agent v2.0.2 profiling app 'dev' pid '8890' 2016-01-22T23:28:16.600Z pid:8890 worker:2 INFO strong-agent[8890] started profiling agent 2016-01-22T23:28:18.844Z pid:8890 worker:2 cookieSecret

2016-01-22T23:28:18.878Z pid:8890 worker:2 Web server listening at: http://0.0.0.0:3006 2016-01-22T23:28:18.879Z pid:8890 worker:2 Browse your REST API at http://0.0.0.0:3006/explorer slc pm: Service "6" listening on 0.0.0.0:3006

2016-01-22T23:28:18.970Z pid:8885 worker:1 INFO strong-agent not profiling, agent metrics requires a valid license. 2016-01-22T23:28:18.970Z pid:8885 worker:1 Please contact sales@strongloop.com for assistance. 2016-01-22T23:28:18.980Z pid:8885 worker:1 Web server listening at: http://0.0.0.0:3006 2016-01-22T23:28:18.981Z pid:8885 worker:1 Browse your REST API at http://0.0.0.0:3006/explorer

sam-github commented 8 years ago

slc deploy http://127.0.0.1:8701/ Often have this error. Error connecting to server: { [Error: Error: 503] ... etc

Are you saying that slc deploy printed the messages Error connecting to server: .... to the console? That does not look like any of our error messages to me, where did it come from?

slc deploy http://localhost:8701/ Deployed ../dev-1.0.0.tgz as dev to `http://localhost:8701/ slc pm slc pm(2684): StrongLoop PM v5.1.0 (API v6.1.0) on port 8701 slc pm(2684): Base folder /home/grp_ddoservice/.strong-pm slc pm(2684): Applications on port 3000 + service ID

But the web server is listening on port 3006. In the config.json, port is 80. What wrong?

Your app is being run on the HTTP port described (3000 + service ID). pm is overriding the config.json, because those defaults are unimplementable: if two apps have the same config.json, as they usually do, then pm couldn't run them, they would be trying to use the same port.

If you wish to override this, and force port to 80, set the PORT env var to 80, see https://docs.strongloop.com/display/SLC/Setting+and+viewing+environment+variables

stale[bot] commented 4 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] commented 4 years ago

This issue has been closed due to continued inactivity. Thank you for your understanding.