简体   繁体   中英

how to use appcfg.py for google-app-engine projects created using google's eclipse plugin?

I have created a google-app-engine java project in Eclipse using Google's Eclipse plugin. My previous attempt to deploy failed. Now, when I retry, I get the following message:

Unable to update app: Error posting to URL : http://appengine.google.com/api/appversion/create?app_id=mybdaywisherversion=1 409 conflict Another transaction for this user is already in progress for this app and major version. That user can undo the transaction with appcfg.py's "rollback" command.

Now, I have always used the google-app-engine features from inside Eclipse only and have not a clue how to run the appcfg.py command.

Could not get much help from documentation available over the internet. The only thing I could make out was for mac (I'm on mac), the command to be used is appcfg.sh. Inside Eclipse, I looked where App-Engine SDK is located on my machine and went to that location. Even found appcfg.sh there. But when I try to run it, it only reports the error "command not found". Tried various alternatives to run it (like tried running it with sudo, tried running it as ./appcfg.sh by going to whether its located) but no success

Can someone please tell me the step I will have to follow to run the apcfg command?

As the result of an Internal Server Error during app deployment, I am now left with a pending transaction, that I need to rollback before I can deploy again.

Creating staging directory Scanning for jsp files. Scanning files on local disk. Initiating update. java.io.IOException: Error posting to URL: 409 Conflict Another transaction by user is already in progress for this app and major version. That user can undo the transaction with appcfg.py's "rollback" command.

this was how I did it (all from the command line) which is a slightly simpler method, which achieved the same effect.....

C:\\Documents and Settings\\Amit\\My Documents\\newproject>"C:\\Program Files\\eclipse\\plugins\\com.google.appengine.eclipse.sdkbundle_1.2.5.v200909021031\\appengine-java-sdk-1.2.5\\bin\\appcfg" rollback war

Reading application configuration data...

2009-09-17 20:47:35.859::INFO: Logging to STDERR via org.mortbay.log.StdErrLog Beginning server interaction for idebanet... 0% Rolling back the update. Success. Cleaning up temporary files...

C:\\Documents and Settings\\Amit\\My Documents\\newproject>

Courtesy:JOHN

I dont think these answers were that helpful.

  1. using the commmand line cd into you application directory. for me this is

    cd /Sites/appengine_myapp

  2. Now you have done this.

    appcfg.py --no_cookies --email=YOUR_EMAIL_HERE@gmail.com --passin rollback ./

  3. You should be prompted for your password.

对于mac / linux用户:1.cd /“sdkdirectory”/ bin 2. chmod + x appcfg.sh 3. ./appcfg.sh -s appengine.google.com -e XXX@Gmail.com rollback / Users /“。 ...“/工作区/ yourapp /战争

Try running appcfg.py with rollback option. See the docs :

appcfg.py [options] rollback

Undoes a partially completed update for the given application. You can use this if an update was interrupted, and the command is reporting that the application cannot be updated due to a lock.

Better perspective gained about the problem.

Documenting the problem here for the benefit of on-lookers:

I was using Google's Plugin for Eclipse for a Google App Engine project. An attempt to deploy the application on app-engine server failed because of network problems. Subsequent attempts were failing because the previous attempt had created some kind of lock and that transaction had to be rolled back. The plugin does not provide any way to do this. One has to use appcfg program over command line to rollback. http://code.google.com/appengine/docs/java/tools/eclipse.html has details. The problem I was facing was occuring becuase of OS level permissions on appcfg.sh. Ga ve permission to self using chmod and could get it working.

for deploying your application using command line , follow these steps:

cd "/Library/Google/google_appengine"
./appcfg.py update "path-to-project/src"

you will be prompted for your email and password.

I was having issues to run those appcfg provided by Eclipse. I had to install Python+ App Engine sdk for python and benefit from appcfg.py functinnalities. It was on Windows though.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM