straight55b / app-engine-patch

Automatically exported from code.google.com/p/app-engine-patch
0 stars 0 forks source link

Unable to deploy AEP Sample as version 2 if java app version 1 exists #171

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Unable to deploy AEP Sample as version 2 if java app version 1 exists

What steps will reproduce the problem?
1. Deploy a Java app as version 1 ( for example, The Guestbook app in 
appengine-java-sdk\demos\guestbook ). This will be shown as the default app 
in app engine dashboard.

2. Deploy AEP Sample as version 2 ( set version: 2 in app.yaml and 
manage.py update). Deployment fails.

------------------WORK AROUND------------------
3. Check GAE dashboard, shows app version 2. ( not the app default )

4. In GAE Dashboard, make app version 2 as the default app.

5. RE-Deploy AEP Sample as version 2 ( set version: 2 in app.yaml and 
manage.py update). Deployment succeeds.
-----------------------------------------------

What is the expected output? What do you see instead?
Would expect AEP Sample to be deployed as version 2
but deployment fails. (output included in additional information section)

What version of the product are you using? On what operating system?
AEP 1.0.2.1
GAE 1.2.3
Py 2.5.4
WinXP SP3

Please provide any additional information below.
-------------------Output----------------------
C:\app-engine-patch-sample>manage.py update
WARNING:root:Could not initialize images API; you are likely missing the 
Python "PIL" module. ImportError: No module named _imaging
Running on app-engine-patch 1.0.2.1
Scanning files on local disk.
Scanned 500 files.
Initiating update.
Cloning 79 static files.
Cloning 530 application files.
Cloned 100 files.
Cloned 200 files.
Cloned 300 files.
Cloned 400 files.
Cloned 500 files.
Deploying new version.
Checking if new version is ready to serve.
Will check again in 1 seconds.
Checking if new version is ready to serve.
Closing update: new version is ready to start serving.
Uploading index definitions.
Running syncdb.
Traceback (most recent call last):
  File "C:\app-engine-patch-sample\manage.py", line 18, in <module>
    execute_manager(settings)
  File "C:\app-engine-patch-sample\__init__.py", line 362, in 
execute_manager

  File "C:\app-engine-patch-sample\__init__.py", line 317, in execute

  File "C:\app-engine-patch-sample\common\zip-packages\django-
1.0.2.zip\django\core\management\commands\update.py", line 70, in 
run_from_argv
  File "C:\app-engine-patch-sample\common\zip-packages\django-
1.0.2.zip\django\core\management\commands\update.py", line 53, in 
run_appcfg
  File "C:\app-engine-patch-sample\__init__.py", line 180, in call_command

  File "C:\app-engine-patch-sample\common\zip-packages\django-
1.0.2.zip\django\core\management\base.py", line 224, in execute
  File "C:\app-engine-patch-sample\common\zip-packages\django-
1.0.2.zip\django\core\management\base.py", line 353, in handle
  File "C:\app-engine-patch-sample\common\zip-packages\django-
1.0.2.zip\django\core\management\commands\syncdb.py", line 65, in 
handle_noargs
  File "C:\google_appengine\google\appengine\ext\db\__init__.py", line 
1401, in count
    return self._get_query().Count(limit=limit)
  File "C:\google_appengine\google\appengine\api\datastore.py", line 979, 
in Count
    self._ToPb(limit=limit), resp)
  File "C:\google_appengine\google\appengine\api\apiproxy_stub_map.py", 
line 72, in MakeSyncCall
    apiproxy.MakeSyncCall(service, call, request, response)
  File "C:\google_appengine\google\appengine\api\apiproxy_stub_map.py", 
line 244, in MakeSyncCall
    stub.MakeSyncCall(service, call, request, response)
  File 
"C:\google_appengine\google\appengine\ext\remote_api\remote_api_stub.py", 
line 184, in MakeSyncCall
    response)
  File 
"C:\google_appengine\google\appengine\ext\remote_api\remote_api_stub.py", 
line 147, in MakeSyncCall
    request_pb.Encode()))
  File "C:\google_appengine\google\appengine\tools\appengine_rpc.py", line 
344, in Send
    f = self.opener.open(req)
  File "C:\Python25\lib\urllib2.py", line 387, in open
    response = meth(req, response)
  File "C:\Python25\lib\urllib2.py", line 498, in http_response
    'http', request, response, code, msg, hdrs)
  File "C:\Python25\lib\urllib2.py", line 425, in error
    return self._call_chain(*args)
  File "C:\Python25\lib\urllib2.py", line 360, in _call_chain
    result = func(*args)
  File "C:\Python25\lib\urllib2.py", line 506, in http_error_default
    raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)
urllib2.HTTPError: HTTP Error 404: Not Found

Original issue reported on code.google.com by Ingenutrix@gmail.com on 23 Jun 2009 at 5:31

GoogleCodeExporter commented 9 years ago
Sorry for the duplicate submission. I got an submission error on earlier submit 
and re-
posted, but found the first submit had gone thru. Please close either one as 
duplicate.

Original comment by Ingenutrix@gmail.com on 23 Jun 2009 at 5:34

GoogleCodeExporter commented 9 years ago
Did you try to set remote_host in your settings.DATABASE_SETTINGS?

Original comment by wkornew...@gmail.com on 23 Jun 2009 at 7:38

GoogleCodeExporter commented 9 years ago
All settings were default. 

Only changes done to AEP Sample before deployment were in app.yaml
1) application: changed-to-my-app-id
2) version: 2

If version = 1 in app.yaml, the AEP Sample deployment works fine for both 
version = 1, and version = 
2. ( deploy AEP sample first with version = 1 overwriting the existing java app 
with version = 1, 
then deploy AEP Sample with version = 2, no problems )

The problem only happens when version 1 is an already deployed java app, and 
then AEP sample is 
deployed as version = 2 ( without deploying AEP Sample with version = 1 )

Original comment by Ingenutrix@gmail.com on 23 Jun 2009 at 9:45

GoogleCodeExporter commented 9 years ago
Could you please try to set settings.DATABASE_SETTINGS['remote_host'] (see 
bottom of 
settings.py)?

Original comment by wkornew...@gmail.com on 23 Jun 2009 at 9:59

GoogleCodeExporter commented 9 years ago
Enabled remote_url. Deployment fails.
but the work-around works. ( steps #3,#4,#5 mentioned in bug description )

DATABASE_OPTIONS = {
    # Override remoteapi handler's path (default: '/remote_api').
    # This is a good idea, so you make it not too easy for hackers. ;)
    # Don't forget to also update your app.yaml!
    'remote_url': '/remote_api',

handlers:
- url: /remote_api
  script: $PYTHON_LIB/google/appengine/ext/remote_api/handler.py
  login: admin

Original comment by Ingenutrix@gmail.com on 23 Jun 2009 at 10:21

GoogleCodeExporter commented 9 years ago
OK, I'll better explain the problem: By default, the remote *host* (not url) is 
<appid>.appspot.com, but in your case that would be the java version, so you 
have to 
change the remote_host to <version>.latest.<appid>.appspot.com.

Original comment by wkornew...@gmail.com on 23 Jun 2009 at 10:33

GoogleCodeExporter commented 9 years ago
wkornewald, thanks. Your suggestion to change the remote_host to 
<version>.latest.<appid>.appspot.com *worked*. ( in this case <version> = 2 )

I kept reading 'host' but for some reason, kept thinking as 'url'!?

btw, I tried greping for DATABASE_SETTINGS in settings.py and in the AEP Sample 
but  
couldn't find DATABASE_SETTINGS['remote_host']. In the comment #4, I guess you 
meant DATABASE_OPTIONS in settings.py. (just mentioning it here if someone else 
bumps into 
this same problem and searches for DATABASE_SETTINGS.)

Original comment by Ingenutrix@gmail.com on 23 Jun 2009 at 1:41

GoogleCodeExporter commented 9 years ago
Oh, yeah sorry for the typo (DATABASE_OPTIONS). Great it's fixed.

Original comment by wkornew...@gmail.com on 23 Jun 2009 at 1:47