I am unable to start react-native server - 'react-native start'
It says there is already a process running.
Is there a way to run the same on an alternate port?
There is this MACAFEE anti'virus' running on my Mac. And in no way I am able to kill it(Even though I should not be killing it, I tried it, and looks like it never dies! Sudo has no power after all!)
Referred to #7308 and this stackoverflow
It didn't help much.
Please suggest a way to run apps on a different port.
bozzmob:Twitter bozzmobusr$ sudo lsof -n -i4TCP:8081 | grep LISTEN
macmnsvc 87518 mfe 24u IPv6 0x935b5ff42ebea7bf 0t0 TCP *:sunproxyadmin (LISTEN)
bozzmob:Twitter bozzmobusr$ react-native start
Scanning 595 folders for symlinks in /Users/bozzmobusr/collection/work/github/reactnative/Twitter/node_modules (5ms)
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Running packager on port 8081. โ
โ โ
โ Keep this packager running while developing on any JS projects. Feel โ
โ free to close this tab and run your own packager instance if you โ
โ prefer. โ
โ โ
โ https://github.com/facebook/react-native โ
โ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Looking for JS files in
/Users/bozzmobusr/collection/work/github/reactnative/Twitter
[4:33:12 PM] <START> Building Dependency Graph
[4:33:12 PM] <START> Crawling File System
ERROR Packager can't listen on port 8081
Most likely another process is already using this port
Run the following command to find out which process:
lsof -n -i4TCP:8081
You can either shut down the other process:
kill -9 <PID>
or run packager on different port.
See http://facebook.github.io/react-native/docs/troubleshooting.html
for common problems and solutions.
bozzmob:Twitter bozzmobusr$ sudo kill -9 87518
bozzmob:Twitter bozzmobusr$ sudo lsof -n -i4TCP:8081 | grep LISTEN
macmnsvc 88265 mfe 24u IPv6 0x935b5ff457ed6d3f 0t0 TCP *:sunproxyadmin (LISTEN)
bozzmob:Twitter bozzmobusr$
Dug a lot deeper and found out the answer.
--port=
react-native start --port=8088
But, I still see RED Screen of Death :( Need help.
What is happening - react-native start --port=8088 works fine. Haste Map and Dependency Graph is getting generated. App gets installed fine when I do react-native run-android.
But, the red screen still shows up which says-
Could not connect to development server
Have you set the host/port up to point to the new non-default location in the app dev menu?

Hey there! It's probably best to post this to https://www.facebook.com/groups/react.native.community/ or StackOverflow :) If it turns out that this is actually a bug with React Native, feel free to repost here.
@bozzmob I just ran into the same problem, thanks McAfee ๐
this is how I stopped the macmn process
sudo lsof -n -i4TCP:8081 # get the process' PID
sudo launchctl list | grep 5693 # find the launchd endpoint
sudo launchctl remove com.mcafee.agent.macmn
Most helpful comment
@bozzmob I just ran into the same problem, thanks McAfee ๐
this is how I stopped the macmn process