You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I added a second HTTP function in my serverless-devs project and tried to run "s local start" but would receive the error:
Error: listen EADDRINUSE: address already in use :::7305
This appears to be because the local function compute server starts up the functions on the same localhost port, causing the second function to fail because the first function already occupies a port.
Is there any way to have multiple HTTP functions running locally?
Full stack trace below:
~/ros-cdk-typescript/function/start-fc-http-nodejs14$ s local start
[2023-08-11 19:18:49] [INFO] [S-CORE] - It is detected that your project has the following projects < helloworld,next-function > to be execute
[2023-08-11 19:18:49] [INFO] [S-CORE] - Start executing project helloworld
[2023-08-11 19:18:49] [INFO] [FC-LOCAL-INVOKE] - Using trigger for start:
name: httpTrigger
type: http
config:
authType: anonymous
methods:
- GET
[2023-08-11 19:18:49] [INFO] [FC-LOCAL-INVOKE] - CustomDomain localhost:1234 of hello-world-service/start-fc-http-nodejs14 was registered
url: http://localhost:7305/
methods: GET
authType: anonymous
Tips for next step
======================
* Deploy Resources: s deploy
[2023-08-11 19:18:49] [INFO] [S-CORE] - Project helloworld successfully to execute
[2023-08-11 19:18:49] [INFO] [S-CORE] - Start executing project next-function
function compute app listening on port 7305!
[2023-08-11 19:18:49] [INFO] [FC-LOCAL-INVOKE] - Using trigger for start:
name: httpTrigger
type: http
config:
authType: anonymous
methods:
- GET
[2023-08-11 19:18:49] [INFO] [FC-LOCAL-INVOKE] - HttpTrigger httpTrigger of hello-world-service/next-function-example was registered
url: http://localhost:7305/
methods: GET
authType: anonymous
Tips for next step
======================
* Deploy Resources: s deploy
[2023-08-11 19:18:49] [INFO] [S-CORE] - Project next-function successfully to execute
helloworld:
status: succeed
next-function:
status: succeed
node:events:491
throw er; // Unhandled 'error' event
^
Error: listen EADDRINUSE: address already in use :::7305
at Server.setupListenHandle [as _listen2] (node:net:1740:16)
at listenInCluster (node:net:1788:12)
at Server.listen (node:net:1876:7)
at Function.listen (/home/qstevens/.s/components/devsapp.cn/devsapp/fc-local-invoke/dist/index.js:71795:24)
at FcLocalInvokeComponent.startExpress (/home/qstevens/.s/components/devsapp.cn/devsapp/fc-local-invoke/dist/index.js:236088:34)
at FcLocalInvokeComponent.<anonymous> (/home/qstevens/.s/components/devsapp.cn/devsapp/fc-local-invoke/dist/index.js:236238:18)
at Generator.next (<anonymous>)
at fulfilled (/home/qstevens/.s/components/devsapp.cn/devsapp/fc-local-invoke/dist/index.js:236029:58)
Emitted 'error' event on Server instance at:
at emitErrorNT (node:net:1767:8)
at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {
code: 'EADDRINUSE',
errno: -98,
syscall: 'listen',
address: '::',
port: 7305
}
The text was updated successfully, but these errors were encountered:
I added a second HTTP function in my serverless-devs project and tried to run "s local start" but would receive the error:
This appears to be because the local function compute server starts up the functions on the same localhost port, causing the second function to fail because the first function already occupies a port.
Is there any way to have multiple HTTP functions running locally?
Full stack trace below:
The text was updated successfully, but these errors were encountered: