How do I run 2 different licensed instances of JumpstartPro?
I have two licenses for two apps: A and B. How do I `foreman start` the first instance, open a new another terminal window, go to B and run `foreman start` on that app successfully. Second app fails:
16:32:44 web.1 | started with pid 14064 16:32:44 webpack.1 | started with pid 14065 16:32:47 webpack.1 | ✖ 「wds」: Error: listen EADDRINUSE: address already in use 127.0.0.1:3035 16:32:47 webpack.1 | at Server.setupListenHandle [as _listen2] (net.js:1318:16) 16:32:47 webpack.1 | at listenInCluster (net.js:1366:12) 16:32:47 webpack.1 | at GetAddrInfoReqWrap.doListen [as callback] (net.js:1503:7) 16:32:47 webpack.1 | at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:69:8) { 16:32:47 webpack.1 | code: 'EADDRINUSE', 16:32:47 webpack.1 | errno: -48, 16:32:47 webpack.1 | syscall: 'listen', 16:32:47 webpack.1 | address: '127.0.0.1', 16:32:47 webpack.1 | port: 3035 16:32:47 webpack.1 | } 16:32:47 web.1 | => Booting Puma 16:32:47 web.1 | => Rails 6.1.1 application starting in development 16:32:47 web.1 | => Run `bin/rails server --help` for more startup options 16:32:48 web.1 | Puma starting in single mode... 16:32:48 web.1 | * Puma version: 5.2.1 (ruby 2.7.2-p137) ("Fettisdagsbulle") 16:32:48 web.1 | * Min threads: 5 16:32:48 web.1 | * Max threads: 5 16:32:48 web.1 | * Environment: development 16:32:48 web.1 | * PID: 14064 16:32:48 web.1 | Exiting 16:32:48 web.1 | /Users/bobwalsh/.rvm/gems/ruby-2.7.2/gems/puma-5.2.1/lib/puma/binder.rb:288:in `initialize': Address already in use - bind(2) for "127.0.0.1" port 5000 (Errno::EADDRINUSE)
. . . [followed by many lines of error messsages.
Thanks Tabish
But I see:
But I see:
16:39:11 webpack.1 | started with pid 20426 16:39:13 webpack.1 | ✖ 「wds」: Error: listen EADDRINUSE: address already in use 127.0.0.1:3035 16:39:13 webpack.1 | at Server.setupListenHandle [as _listen2] (net.js:1318:16) 16:39:13 webpack.1 | at listenInCluster (net.js:1366:12) 16:39:13 webpack.1 | at GetAddrInfoReqWrap.doListen [as callback] (net.js:1503:7) 16:39:13 webpack.1 | at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:69:8) { 16:39:13 webpack.1 | code: 'EADDRINUSE', 16:39:13 webpack.1 | errno: -48, 16:39:13 webpack.1 | syscall: 'listen', 16:39:13 webpack.1 | address: '127.0.0.1', 16:39:13 webpack.1 | port: 3035 16:39:13 webpack.1 | }
it works, but I suspect the next css/js change I make will cause an issue...
Found this instead:
Taking the second answer to https://stackoverflow.com/questions/35004195/specifying-a-default-port-in-a-procfile worked well for me:
1. Leave A unchanged.
2. For B, create a .env file foreman will use. single line in it:
PORT=3001
3. change in Procfile.dev [the procfile in use while running on localhost]:
web: bundle exec rails s to web: bundle exec rails s -p $PORT on line 1.
4. Done!
Notifications
You’re not receiving notifications from this thread.