facebookarchive / nuclide

An open IDE for web and native mobile development, built on top of Atom
https://nuclide.io
Other
7.79k stars 682 forks source link

NuclideCertificatesGenerator - ERROR - openssl failed: error, no objects specified in config file #1604

Open liaocs2008 opened 6 years ago

liaocs2008 commented 6 years ago

Issue and Steps to Reproduce

npm 5.6.0 node v8.11.4

Actual Behavior

nuclide-start-server --verbose

2018-08-30 18:54:39,663 - root - INFO - Invoked nuclide_server_manager... 2018-08-30 18:54:39,663 - NuclideServerManager - INFO - NuclideServerManager was created with these options: {'certs_dir': None, 'server_cert': None, 'server_key': None, 'verbose': True, 'dump_core': True, 'insecure': False, 'inspect': False, 'quiet': False, 'debug': False, 'json_output_file': None, 'version': None, 'command': u'start', 'timeout': 10, 'common_name': None, 'workspace': None, 'ca': None, 'port': None} 2018-08-30 18:54:39,663 - NuclideServerManager - INFO - Starting to clean up old Nuclide processes/files. 2018-08-30 18:54:39,690 - NuclideServerManager - INFO - Cleaning up old certificate files... 2018-08-30 18:54:39,691 - NuclideServerManager - INFO - Finished cleaning up old Nuclide processes/files. 2018-08-30 18:54:39,691 - root - WARNING - Failed to clean up old core dumps ([Errno 2] No such file or directory: '/var/tmp/cores') 2018-08-30 18:54:39,692 - NuclideServerManager - INFO - Trying to determine the port to use for Nuclide server... 2018-08-30 18:54:39,719 - NuclideServerManager - INFO - Found an open port: 9090. 2018-08-30 18:54:39,719 - NuclideServerManager - INFO - Initialized NuclideServer. 2018-08-30 18:54:39,744 - NuclideServerManager - INFO - Starting NuclideServer... 2018-08-30 18:54:39,744 - NuclideServerManager - INFO - Using https. 2018-08-30 18:54:39,744 - NuclideServerManager - INFO - Checking if certificate dir /home/leo/.certs exists. 2018-08-30 18:54:39,779 - NuclideCertificatesGenerator - ERROR - openssl failed: error, no objects specified in config file problems making Certificate Request Traceback (most recent call last): File "scripts/nuclide_server_manager.py", line 429, in server_start_result = manager.start_nuclide() File "scripts/nuclide_server_manager.py", line 252, in start_nuclide return {'exit_code': self.start_server(server), 'server': server} File "scripts/nuclide_server_manager.py", line 288, in start_server ca, server_cert, server_key = self._generate_certificates() File "scripts/nuclide_server_manager.py", line 222, in _generate_certificates expiration_days=CERTS_EXPIRATION_DAYS) File "/usr/lib/node_modules/nuclide/pkg/nuclide-server/scripts/nuclide_certificates_generator.py", line 86, in init self.generate() File "/usr/lib/node_modules/nuclide/pkg/nuclide-server/scripts/nuclide_certificates_generator.py", line 104, in generate raise RuntimeError('Failed to generate certs.') RuntimeError: Failed to generate certs.

Versions

semmypurewal commented 6 years ago

Hi @liaocs2008! Thanks for reporting this.

Can you tell me which version of Nuclide you're using? From the stack trace it looks like a pretty old version. Specifically, in the latest version we should no longer be using the Python script to generate certificates.

liaocs2008 commented 6 years ago

Following is the version:

/usr/lib ├── npm@5.6.0 └── nuclide@0.341.0

I happened to solve the problem by "source anaconda3/bin/activate py35 && nuclide-start-server", so I think this must be related to the python environment. It's still worthwhile looking into the problem though.

semmypurewal commented 6 years ago

Can you see if you still have this issue with the latest Nuclide?