if the files are on virtualbox shared folder, that is the component to blame

can you use local files on the vm, nfs, rsync or anything else than
virtualbox shared folder?




On Thu, Jul 31, 2014 at 11:28 AM, Spencer Holleman <
[email protected]> wrote:

> This is happening to everyone at my company who is using Django and
> Vagrant. I don't know why. I typically only workin the .py files and so
> hadn't seen this issue before. We're buying VMWare workstation for Vagrant
> and installing it to get around this issue. There has to be a better way.
> I've Googled but to no avail. Anyone hear of anything like this before?
>
> Repro
>
>    1. in vagrant guest vm, 'python manage.py runserver 0.0.0.0:8000'
>    2. open page in browser, it works
>    3. modify and save any template (.html) file in the django project
>    4. runserver doesn't say, "changes detected, restarting"
>    5. try to open any page, observe 'waiting for...' forever. page never
>    loads.
>    6. observe that the runserver console is not doing anything. no
>    exception, no activity. just sitting
>
> only fix is to ctrl-c the runserver and runserver again. very annoying.
>
> using Virtualbox.
>
> I tried "runserver --noreload" to no avail.
>
> stack trace observed when hitting ctrl-c after hang:
>
> 1; args=(1762032096,)
> [30/Jul/2014 19:19:47] DEBUG [django.db.backends:79] (0.002) SELECT
> `django_site`.`id`, `django_site`.`domain`, `django_site`.`name` FROM
> `django_site` WHERE `django_site`.`id` = 1 ; args=(1,)
> ----------------------------------------
> Exception happened during processing of request from ('10.0.2.2', 52048)
> Traceback (most recent call last):
>   File "/usr/lib64/python2.6/SocketServer.py", line 283, in
> _handle_request_noblock
>     self.process_request(request, client_address)
>   File "/usr/lib64/python2.6/SocketServer.py", line 309, in process_request
>     self.finish_request(request, client_address)
>   File "/usr/lib64/python2.6/SocketServer.py", line 322, in finish_request
>     self.RequestHandlerClass(request, client_address, self)
>   File "/usr/lib64/python2.6/SocketServer.py", line 617, in __init__
>     self.handle()
>   File
> "/var/src/venv/infotron/lib/python2.6/site-packages/werkzeug/serving.py",
> line 200, in handle
>     rv = BaseHTTPRequestHandler.handle(self)
>   File "/usr/lib64/python2.6/BaseHTTPServer.py", line 329, in handle
>     self.handle_one_request()
>   File
> "/var/src/venv/infotron/lib/python2.6/site-packages/werkzeug/serving.py",
> line 235, in handle_one_request
>     return self.run_wsgi()
>   File
> "/var/src/venv/infotron/lib/python2.6/site-packages/werkzeug/serving.py",
> line 177, in run_wsgi
>     execute(self.server.app)
>   File
> "/var/src/venv/infotron/lib/python2.6/site-packages/werkzeug/serving.py",
> line 167, in execute
>     for data in application_iter:
>   File
> "/var/src/venv/infotron/lib/python2.6/site-packages/werkzeug/debug/__init__.py",
> line 89, in debug_application
>     for item in app_iter:
>   File
> "/var/src/venv/infotron/lib/python2.6/site-packages/werkzeug/debug/__init__.py",
> line 88, in debug_application
>     app_iter = self.app(environ, start_response)
>   File
> "/var/src/venv/infotron/lib/python2.6/site-packages/django/contrib/staticfiles/handlers.py",
> line 67, in __call__
>     return self.application(environ, start_response)
>   File
> "/var/src/venv/infotron/lib/python2.6/site-packages/django/core/handlers/wsgi.py",
> line 206, in __call__
>     response = self.get_response(request)
>   File
> "/var/src/venv/infotron/lib/python2.6/site-packages/django/core/handlers/base.py",
> line 196, in get_response
>     response = self.handle_uncaught_exception(request, resolver,
> sys.exc_info())
>   File
> "/var/src/venv/infotron/lib/python2.6/site-packages/django/core/handlers/base.py",
> line 231, in handle_uncaught_exception
>     return debug.technical_500_response(request, *exc_info)
>   File
> "/var/src/venv/infotron/lib/python2.6/site-packages/django_extensions/management/technical_response.py",
> line 5, in null_technical_500_response
>     six.reraise(exc_type, exc_value, tb)
>   File
> "/var/src/venv/infotron/lib/python2.6/site-packages/django/core/handlers/base.py",
> line 114, in get_response
>     response = wrapped_callback(request, *callback_args, **callback_kwargs)
>   File
> "/var/src/venv/infotron/lib/python2.6/site-packages/django/contrib/auth/decorators.py",
> line 21, in _wrapped_view
>     if test_func(request.user):
>   File
> "/var/src/venv/infotron/lib/python2.6/site-packages/django/contrib/auth/decorators.py",
> line 47, in <lambda>
>     lambda u: u.is_authenticated(),
>   File
> "/var/src/venv/infotron/lib/python2.6/site-packages/django/utils/functional.py",
> line 213, in inner
>     self._setup()
>   File
> "/var/src/venv/infotron/lib/python2.6/site-packages/django/utils/functional.py",
> line 298, in _setup
>     self._wrapped = self._setupfunc()
>   File
> "/var/src/venv/infotron/lib/python2.6/site-packages/django/contrib/auth/middleware.py",
> line 18, in <lambda>
>     request.user = SimpleLazyObject(lambda: get_user(request))
>   File
> "/var/src/venv/infotron/lib/python2.6/site-packages/django/contrib/auth/middleware.py",
> line 10, in get_user
>     request._cached_user = auth.get_user(request)
>   File
> "/var/src/venv/infotron/lib/python2.6/site-packages/django/contrib/auth/__init__.py",
> line 144, in get_user
>     user = backend.get_user(user_id) or AnonymousUser()
>   File
> "/var/src/venv/infotron/lib/python2.6/site-packages/fool_auth_for_django/backends.py",
> line 13, in get_user
>     api_user_info = users_api.user_info_for_username(user_id)
>   File
> "/var/src/venv/infotron/lib/python2.6/site-packages/fool_api_kit/users.py",
> line 12, in user_info_for_username
>     return user_info_for_identifier(username)
>   File
> "/var/src/venv/infotron/lib/python2.6/site-packages/fool_api_kit/users.py",
> line 18, in user_info_for_identifier
>     json_payload = __user_info_json(identifier)
>   File
> "/var/src/venv/infotron/lib/python2.6/site-packages/fool_api_kit/users.py",
> line 27, in __user_info_json
>     r = __user_info_for_identifier_request(identifier)
>   File
> "/var/src/venv/infotron/lib/python2.6/site-packages/fool_api_kit/users.py",
> line 38, in __user_info_for_identifier_request
>     return requests_session.get(url, verify=False)
>   File
> "/var/src/venv/infotron/lib/python2.6/site-packages/requests/sessions.py",
> line 347, in get
>     return self.request('GET', url, **kwargs)
>   File
> "/var/src/venv/infotron/lib/python2.6/site-packages/requests/sessions.py",
> line 335, in request
>     resp = self.send(prep, **send_kwargs)
>   File
> "/var/src/venv/infotron/lib/python2.6/site-packages/requests/sessions.py",
> line 438, in send
>     r = adapter.send(request, **kwargs)
>   File
> "/var/src/venv/infotron/lib/python2.6/site-packages/requests/adapters.py",
> line 292, in send
>     timeout=timeout
>   File
> "/var/src/venv/infotron/lib/python2.6/site-packages/requests/packages/urllib3/connectionpool.py",
> line 428, in urlopen
>     body=body, headers=headers)
>   File
> "/var/src/venv/infotron/lib/python2.6/site-packages/requests/packages/urllib3/connectionpool.py",
> line 290, in _make_request
>     httplib_response = conn.getresponse()
>   File "/usr/lib64/python2.6/httplib.py", line 990, in getresponse
>     response.begin()
>   File "/usr/lib64/python2.6/httplib.py", line 391, in begin
>     version, status, reason = self._read_status()
>   File "/usr/lib64/python2.6/httplib.py", line 349, in _read_status
>     line = self.fp.readline()
>   File "/usr/lib64/python2.6/socket.py", line 427, in readline
>     data = recv(1)
>   File "/usr/lib64/python2.6/ssl.py", line 215, in recv
>     return self.read(buflen)
>   File "/usr/lib64/python2.6/ssl.py", line 136, in read
>     return self._sslobj.read(len)
>
> is it getting stuck in ssl.py?
>
>
> contents of vagrantfile:
> # -*- mode: ruby -*-
> # vi: set ft=ruby :
>
> Vagrant::Config.run do |config|
>   # All Vagrant configuration is done here. The most common configuration
>   # options are documented and commented below. For a complete reference,
>   # please see the online documentation at vagrantup.com.
>
>   # Every Vagrant virtual environment requires a box to build off of.
>   config.vm.box = "squeeze"
>
>   # The url from where the 'config.vm.box' box will be fetched if it
>   # doesn't already exist on the user's system.
>    config.vm.box_url = "squeeze32-4.1.4.box"
>
>   # Boot with a GUI so you can see the screen. (Default is headless)
>   # config.vm.boot_mode = :gui
>
>   # Assign this VM to a host-only network IP, allowing you to access it
>   # via the IP. Host-only networks can talk to the host machine as well as
>   # any other machines on the same network, but cannot be accessed
> (through this
>   # network interface) by any external networks.
>   # config.vm.network :hostonly, "192.168.33.10"
>
>   # Assign this VM to a bridged netgwork, allowing you to connect directly
> to a
>   # network using the host's network device. This makes the VM appear as
> another
>   # physical device on your network.
>   # config.vm.network :bridged
>
>   # Forward a port from the guest to the host, which allows for outside
>   # computers to access the VM, whereas host only networking does not.
>   config.vm.forward_port 8000, 8001
>   # Share an additional folder to the guest VM. The first argument is
>   # an identifier, the second is the path on the guest to mount the
>   # folder, and the third is the path on the host to the actual folder.
>   # config.vm.share_folder "v-data", "/vagrant_data", "../data"
>   config.vm.share_folder "vagrant-root", "/var/src/infotron", "."
>   config.vm.customize ["setextradata", :id,
> "VBoxInternal2/SharedFoldersEnableSymlinksCreate/v-root", "1"]
>   packages_path = "../packages"
>   if File.exists?(packages_path) and File.directory?(packages_path)
>     config.vm.share_folder "v-packages", "/var/src/packages", "../packages"
>   end
> end
>
> any assistance is greatly appreciated. I can't believe this is happening
> to everyone here but not anyone else on the internet.
>
> For a minute it appeared that this only occurs when I use "runserver_plus"
> instead of "runserver". However, it's now happening in both cases. :-/
>
> Thanks,
> spencer
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Vagrant" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to