Open kentor opened 9 years ago
Changing -U for -u fixes it somehow in freebsd but I think it breaks macOS. In macOS -u is for ID and -U for username. It doesn't hurt much linux because -u is for effective user (name or ID) and -U for real user (name or ID). Anyway in freebsd there is another bug hidden by this.
$ /usr/local/bin/nuclide-start-server
Traceback (most recent call last):
File "scripts/nuclide_server_manager.py", line 401, in <module>
print(json.dumps(result))
File "/usr/local/lib/python2.7/json/__init__.py", line 244, in dumps
return _default_encoder.encode(obj)
File "/usr/local/lib/python2.7/json/encoder.py", line 207, in encode
chunks = self.iterencode(o, _one_shot=True)
File "/usr/local/lib/python2.7/json/encoder.py", line 270, in iterencode
return _iterencode(o, 0)
File "/usr/local/lib/python2.7/json/encoder.py", line 184, in default
raise TypeError(repr(o) + " is not JSON serializable")
TypeError: <logging.LogRecord object at 0x801962850> is not JSON serializable
I tracked it to nuclide_server_manager.py unabled to connect to the node https server. The node server is started but doesn't respond to nuclide_server_manager.py
.
$ ps |grep nuclide
4282 3 S 0:00.44 node /usr/local/lib/node_modules/nuclide/pkg/nuclide-server/lib/nuclide-main.js --port 9090 --stack-trace-limit=50 --cert /home/freebsduser/.certs/nuclide._fNYjG.server.crt --key /ho
Using nuclide-start-server -k
(unsecure http) doesn't have the same problem.
$ /usr/local/bin/nuclide-start-server -k
{"success": true, "version": "195", "pid": "4333", "port": 9091, "workspace": null}
The log file can be found at /tmp/nuclide-freebsduser-logs/server-start/nuclide-2017-01-07T03:35:30.nohup.out.
On BSD, you have to pass -U instead of -u, and -w -w. The command column gets truncated otherwise. See man ps. I should probably go write a decent patch for this...
I believe in FreeBSD the
-u
flag needs to be-U
.