Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The default port chosen by Corda 5 worker crashes the default port that is used by AirPlay on macOS #38

Open
dicksonchow opened this issue Jan 30, 2023 · 0 comments

Comments

@dicksonchow
Copy link

I have discovered that when I execute the startCorda gradle task on macOS, the Corda log always complains that port 7000 is already in used by some other process.

After some googling, I found that 7000 port is used by AirPlay on macOS by default. In order to run the startCorda task, I have to switch off AirPlay in my system setting to make it works.

I suggest making the listening port number configurable such that we can choose other port number other than port 7000 to avoid the problem.

	at io.javalin.Javalin.start(Javalin.java:184) ~[?:?]
	at io.javalin.Javalin.start(Javalin.java:148) ~[?:?]
	at net.corda.applications.workers.workercommon.internal.WorkerMonitorImpl$startServer$1$1.invoke(WorkerMonitorImpl.kt:114) ~[?:?]
	at net.corda.applications.workers.workercommon.internal.WorkerMonitorImpl$startServer$1$1.invoke(WorkerMonitorImpl.kt:113) ~[?:?]
	at net.corda.utilities.LogUtilsKt.executeWithStdErrSuppressed(LogUtils.kt:46) ~[?:?]
	at net.corda.applications.workers.workercommon.internal.WorkerMonitorImpl$startServer$1.invoke(WorkerMonitorImpl.kt:113) ~[?:?]
	at net.corda.applications.workers.workercommon.internal.WorkerMonitorImpl$startServer$1.invoke(WorkerMonitorImpl.kt:109) ~[?:?]
	at net.corda.utilities.classload.ClassLoadingUtilsKt.executeWithThreadContextClassLoader(ClassLoadingUtils.kt:11) ~[?:?]
	at net.corda.applications.workers.workercommon.internal.WorkerMonitorImpl.startServer(WorkerMonitorImpl.kt:109) ~[?:?]
	at net.corda.applications.workers.workercommon.internal.WorkerMonitorImpl.listen(WorkerMonitorImpl.kt:65) ~[?:?]
	at net.corda.applications.workers.workercommon.WorkerHelpers$Companion.setupMonitor(WorkerHelpers.kt:108) ~[?:?]
	at net.corda.applications.workers.combined.CombinedWorker.startup(CombinedWorker.kt:118) ~[?:?]
	at net.corda.osgi.framework.OSGiFrameworkWrap.startApplication(OSGiFrameworkWrap.java:588) ~[corda-combined-worker-5.0.0.0-Fox1.0.jar:?]
	at net.corda.osgi.framework.OSGiFrameworkMain.main(OSGiFrameworkMain.java:168) ~[corda-combined-worker-5.0.0.0-Fox1.0.jar:?]
Caused by: java.io.IOException: Failed to bind to 0.0.0.0/0.0.0.0:7000
	at org.eclipse.jetty.server.ServerConnector.openAcceptChannel(ServerConnector.java:349) ~[?:?]
	at org.eclipse.jetty.server.ServerConnector.open(ServerConnector.java:310) ~[?:?]
	at org.eclipse.jetty.server.AbstractNetworkConnector.doStart(AbstractNetworkConnector.java:80) ~[?:?]
	at org.eclipse.jetty.server.ServerConnector.doStart(ServerConnector.java:234) ~[?:?]
	at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:73) ~[?:?]
	at org.eclipse.jetty.server.Server.doStart(Server.java:401) ~[?:?]
	at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:73) ~[?:?]
	at io.javalin.jetty.JettyServer.start(JettyServer.kt:65) ~[?:?]
	at io.javalin.Javalin.start(Javalin.java:174) ~[?:?]
	... 13 more
Caused by: java.net.BindException: Address already in use
	at sun.nio.ch.Net.bind0(Native Method) ~[?:?]
	at sun.nio.ch.Net.bind(Net.java:552) ~[?:?]
	at sun.nio.ch.ServerSocketChannelImpl.netBind(ServerSocketChannelImpl.java:336) ~[?:?]
	at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:294) ~[?:?]
	at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:88) ~[?:?]
	at org.eclipse.jetty.server.ServerConnector.openAcceptChannel(ServerConnector.java:344) ~[?:?]
	at org.eclipse.jetty.server.ServerConnector.open(ServerConnector.java:310) ~[?:?]
	at org.eclipse.jetty.server.AbstractNetworkConnector.doStart(AbstractNetworkConnector.java:80) ~[?:?]
	at org.eclipse.jetty.server.ServerConnector.doStart(ServerConnector.java:234) ~[?:?]
	at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:73) ~[?:?]
	at org.eclipse.jetty.server.Server.doStart(Server.java:401) ~[?:?]
	at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:73) ~[?:?]
	at io.javalin.jetty.JettyServer.start(JettyServer.kt:65) ~[?:?]
	at io.javalin.Javalin.start(Javalin.java:174) ~[?:?]```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant