Skip to content
This repository has been archived by the owner on Dec 13, 2018. It is now read-only.

Remote development => utils - ERROR - Unexpected error: <type 'exceptions.AttributeError'> #1341

Open
fanch317 opened this issue Oct 13, 2017 · 7 comments

Comments

@fanch317
Copy link

Issue and Steps to Reproduce

When I try to add a Remote Project Folder, it returns this error:
Unexpected error occurred: The log file can be found at /tmp/nuclide-dev-logs/server-start/nuclide-2017-10-13T21:54:04.nohup.out. We can see many entries utils - ERROR - Unexpected error: <type 'exceptions.AttributeError'> on server log.

Expected Behavior

Starts and works remotely over nuclide server.

Actual Behavior

I start a remote connection from client Atom, and see many error log "Unexpected error" (101 entries on 10s).

This is log with verbose mode : nuclide-start-server -v

nuclide.log

2017-10-13 21:49:25.455 INFO (pid:29103) nuclide-server - NuclideServer started on port 9090.
2017-10-13 21:49:25.457 INFO (pid:29103) nuclide-server - Using node v8.7.0.
2017-10-13 21:49:25.457 INFO (pid:29103) nuclide-server - Server ready time: 236ms

server-start/nuclide.log

2017-10-13 21:49:25,081 - root - INFO - Invoked nuclide_server_manager...
2017-10-13 21:49:25,081 - NuclideServerManager - INFO - NuclideServerManager was created with these options: {'certs_dir': None, 'json_output_file': None, 'timeout': 10, 'dump_core': True, 'insecure': False, 'inspect': False, 'quiet': False, 'debug': False, 'command': 'start', 'workspace': None, 'common_name': None, 'port': None, 'verbose': True}
2017-10-13 21:49:25,081 - NuclideServerManager - INFO - Starting to clean up old Nuclide processes/files.
2017-10-13 21:49:25,099 - NuclideServerManager - INFO - Cleaning up old certificate files...
2017-10-13 21:49:25,100 - NuclideServerManager - INFO - Finished cleaning up old Nuclide processes/files.
2017-10-13 21:49:25,100 - root - WARNING - Failed to clean up old core dumps ([Errno 2] No such file or directory: '/var/tmp/cores')
2017-10-13 21:49:25,100 - NuclideServerManager - INFO - Trying to determine the port to use for Nuclide server...
2017-10-13 21:49:25,117 - NuclideServerManager - INFO - Found an open port: 9090.
2017-10-13 21:49:25,117 - NuclideServerManager - INFO - Initialized NuclideServer.
2017-10-13 21:49:25,133 - NuclideServerManager - INFO - Starting NuclideServer...
2017-10-13 21:49:25,134 - NuclideServerManager - INFO - Using https.
2017-10-13 21:49:25,134 - NuclideServerManager - INFO - Checking if certificate dir /home/dev/.certs exists.
2017-10-13 21:49:25,201 - NuclideServerManager - INFO - Initialized NuclideCertificatesGenerator with common_name: dev.nuclide.faucheuse
2017-10-13 21:49:25,202 - NuclideServer - INFO - NuclideServer start/restarting with the following arguments:
timeout: 10
cert: /home/dev/.certs/nuclide.9CtRTn.server.crt
key: /home/dev/.certs/nuclide.9CtRTn.server.key
ca: /home/dev/.certs/nuclide.9CtRTn.ca.crt
force: False
quiet: False
debug: False
inspect: False
expiration_days: 15
2017-10-13 21:49:25,217 - NuclideServer - INFO - Opening node server subprocess.
2017-10-13 21:49:25,218 - NuclideServer - INFO - Trying to ping the Nuclide server...
2017-10-13 21:49:25,240 - utils - ERROR - Unexpected error: <type 'exceptions.AttributeError'>
2017-10-13 21:49:25,344 - utils - ERROR - Unexpected error: <type 'exceptions.AttributeError'>
2017-10-13 21:49:25,448 - utils - ERROR - Unexpected error: <type 'exceptions.AttributeError'>
[..]
2017-10-13 21:49:25,448 - utils - ERROR - Unexpected error: <type 'exceptions.AttributeError'>
2017-10-13 21:49:35,993 - NuclideServer - ERROR - Attempted to start Nuclide server on port 9090, but timed out after 10 seconds.

Versions

  • Atom: 5.21.1
  • Nuclide: 0.260.0
  • Client OS: Debian 4.9.30-2+deb9u5 (2017-09-19) x86_64 GNU/Linux
  • Server OS (optional): Debian 4.9.30-2+deb9u5 (2017-09-19) x86_64 GNU/Linux

Additional Details

  • Python 2.7.13
    Also tested today on a remote Debian 8 x64 (and a Windows 7 for atom client), and have the same issue.
@hansonw
Copy link
Contributor

hansonw commented Oct 13, 2017

For some reason it seems like your httplib.HTTPSConnection isn't available in Python. We're explicitly using python2.7 so maybe you can try

import httplib
httplib.HTTPSConnection

to double-check if that's actually working.

@hansonw
Copy link
Contributor

hansonw commented Oct 13, 2017

Note that you can use nuclide-start-server -k to start up an unsecured server, which might unblock you for now.

@fanch317
Copy link
Author

fanch317 commented Oct 17, 2017

Hi. Thanks for response.
Indeed, it's work when a use -k param on client atom. (My bad, I should have tried, but I do not see the relevance with the error message).

I have check if the https is working, seems ok.

fanch@faucheuse:~$ python
Python 2.7.13 (default, Jan 19 2017, 14:48:08)
[GCC 6.3.0 20170118] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import httplib
>>> conn = httplib.HTTPSConnection("check.qth.fr")
>>> conn.request("GET", "/")
>>> r1 = conn.getresponse()
>>> print r1.status, r1.reason
200 OK

I have make few tests and find a python connection to host 'None' line 63 on nuclide_server.py. Its work when I overwrite host var by the ip passed from atom client.
I suspect this function and watch more later for suggest a solution.

fanch317 added a commit to fanch317/nuclide that referenced this issue Oct 17, 2017
@russellporter
Copy link

@fanch317 your fix (fanch317@7022f9a) did the trick for me! Any chance you can make a pull request so this gets fixed on master as well?

@jjh42
Copy link

jjh42 commented Jan 16, 2018

I just setup on a new server running update Debian linux and I ran into the same issue which was also resolved by @fanch317 's change (thanks). Comparing with my previous server, I believe the formating of openssl has changed slightly inserting an extra space hence the new for the change in the regular expression.

It would be great to get this accepted into the mainline.

@Empornium
Copy link

@hansonw This Fix also worked for us, any update on when it might be merged?

@hansonw
Copy link
Contributor

hansonw commented Mar 21, 2018 via email

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants