mvn appengine:update will not deploy due to permissions error - maven

I am trying to deploy a basic app engine web app with maven.
As a part of the deployment process, I am required to authenticate via a web browser.
I am using 2 different google accounts. 1 for home. 1 for work. When maven opened up the browser tab to ask me to authenticate, it selected the wrong account. I didn't notice this and clicked the "Allow" button.
This account does not have the right credentials so I got an access denied error.
😈 >mvn appengine:update
...
Beginning interaction for module default...
Apr 01, 2016 4:47:32 PM com.google.appengine.tools.admin.AbstractServerConnection send1
WARNING: Error posting to URL: https://appengine.google.com/api/appversion/getresourcelimits?app_id=maven-1268&version=1&
403 Forbidden
You do not have permission to modify this app (app_id=u's~maven-1268').
This is try #0
Apr 01, 2016 4:47:32 PM com.google.appengine.tools.admin.AbstractServerConnection send1
WARNING: Error posting to URL: https://appengine.google.com/api/appversion/getresourcelimits?app_id=maven-1268&version=1&
403 Forbidden
You do not have permission to modify this app (app_id=u's~maven-1268').
This is try #1
Apr 01, 2016 4:47:32 PM com.google.appengine.tools.admin.AbstractServerConnection send1
WARNING: Error posting to URL: https://appengine.google.com/api/appversion/getresourcelimits?app_id=maven-1268&version=1&
403 Forbidden
You do not have permission to modify this app (app_id=u's~maven-1268').
This is try #2
Apr 01, 2016 4:47:33 PM com.google.appengine.tools.admin.AbstractServerConnection send1
WARNING: Error posting to URL: https://appengine.google.com/api/appversion/getresourcelimits?app_id=maven-1268&version=1&
403 Forbidden
You do not have permission to modify this app (app_id=u's~maven-1268').
This is try #3
So I think "no biggee", I'll just run it again. Somehow I'll get maven to select the correct account (maybe I'll temporarily logout of the incorrect one) and that will solve the problem.
Unfortunately, I am no longer being prompted to authenticate. It just keeps giving me accessed denied errors.
I am presuming there is a file somewhere on the file system that I need to delete in order to get prompted for my authorization again.
Does anyone know where this file is?
UPDATE
I tried completely recreating my project from scratch in a different directory, and I still get the access denied errors.
By running this command ...
mvn help:describe -Dplugin=appengine -Ddetail
I have discovered that there is an additional parameter that I can pass to the update goal that will do exactly what I need it to do, but I don't know how the correct syntax to use to actually pass this additional parameter.
appengine:update
Description: Create or update an app version.
Implementation: com.google.appengine.appcfg.Update Language: java
Before this mojo executes, it will call:
Phase: 'package'
Available parameters:
additionalParams
User property: appengine.additionalParams
Additional parameters to pass through to AppCfg.
noCookies
User property: appengine.noCookies
Do not save/load access credentials to/from disk.
I think this might be the correct syntax ...
😈 >mvn appengine:update -DadditionalParams="--noCookies"
However, this does NOT solve the problem as the update seems to ignore the parameter.

I fixed the error using this command before mvn appengine:update command:
rm ~/.appcfg_oauth2_tokens_java

I was able to solve this problem by using the appcfg.sh tool instead of maven.
😈 >appcfg.sh --no_cookies update /path/to/maven/project/first_project_second_try/guestbook/target/guestbook-1.0-SNAPSHOT
I suspect that it is possible to do this with maven as well, but I am uncertain as to how pass the "--no_cookies" option to maven.

Related

can't open pom.xml and application.properties in eclipse

I create a simple login program,
but when I tried to open application.properties to initialize the data base it won't,
and I found this error
"An error has occurred. See error log for more details.
Cannot invoke "org.eclipse.e4.core.contexts.IEclipseContext.activate()" because the return value of "org.eclipse.e4.ui.model.application.ui.basic.MPart.getContext()" is nullé
I installed some snapshots files but it doesn't work
and also I tried to write into the file directly from the notepad but also not working
this is the result when I try to open it enter image description here
I was too facing similar issue. Closing and opening the Eclipse again resolved my issue. My Eclipse version was
Version: 2022-09 (4.25.0)
Build id: 20220908-1902
Probably, try restarting the Eclipse by closing all the processes and applications related to Eclipse.
This was my error:
An error has occurred. See error log for more details.
Cannot invoke "org.eclipse.e4.core.contexts.IEclipseContext.activate()" because the return value of "org.eclipse.e4.ui.model.application.ui.basic.MPart.getContext()" is null

Issue installing openwhisk with incubator-openwhisk-devtools

I have a blocking issue installing openwhisk with docker
I typed make quick-start right after a git pull of the project incubator-openwhisk-devtools. My OS is Fedora 29, docker version is 18.09.0, docker-compose version is 1.22.0. JDk 8 Oracle.
I get the following error:
[...]
adding the function to whisk ...
ok: created action hello
invoking the function ...
error: Unable to invoke action 'hello': The server is currently unavailable (because it is overloaded or down for maintenance). (code ciOZDS8VySDyVuETF14n8QqB9wifUboT)
[...]
[ERROR] [#tid_sid_unknown] [Invoker] failed to ping the controller: org.apache.kafka.common.errors.TimeoutException: Expiring 1 record(s) for health-0: 30069 ms has passed since batch creation plus linger time
[ERROR] [#tid_sid_unknown] [KafkaProducerConnector] sending message on topic 'health' failed: Expiring 1 record(s) for health-0: 30009 ms has passed since batch creation plus linger time
Please note that controller-local-logs.log is never created.
If I issue a touch controller-local-logs.log in the right directory the log file is always empty after I try to issue make quick-start again.
http://localhost:8888/ping gives me the right answer: pong.
http://localhost:9222 is not reacheable.
Where am I wrong?
Thank you in advance

Sonarqube : The 'report' parameter is missing

I am using MSBuild. I have Java 8 installed.
I am running the following commands:
SonarQube.Scanner.MSBuild.exe begin /k:"ABC" /d:sonar.host.url="http://localhost:9000" /d:sonar.login="8b839xxxxxxxxxxxxxxxxxxxxxxx6b00125bf92" /d:sonar.verbose=true
"C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\15.0\Bin\msbuild.exe" /t:rebuild
SonarQube.Scanner.MSBuild.exe end /d:sonar.login="8b839xxxxxxxxxxxxxxxxxxxxxxx6b00125bf92"
The last step fails:
ERROR: Error during SonarQube Scanner execution
ERROR: The 'report' parameter is missing
ERROR:
ERROR: Re-run SonarQube Scanner using the -X switch to enable full debug logging.
The SonarQube Scanner did not complete successfully
12:53:21.909 Creating a summary markdown file...
12:53:21.918 Post-processing failed. Exit code: 1
The MSBuild version is greater than 14.
Java 8 is properly installed. Documentation indicates that Java 8 is adequate.
Any idea on what could be wrong?
Where do I add the -X switch? I tried on all 3 statements
Update :I installed Java SDK 9. Still same issue.
Update :With verbose logging and using /n naming parameter:
INFO: Analysis report generated in 992ms, dir size=4 MB
INFO: Analysis reports compressed in 549ms, zip size=1 MB
INFO: Analysis report generated in C:\ABC\.sonarqube\out\.sonar\scanner-report
DEBUG: Upload report
DEBUG: POST 400 http://localhost:9000/api/ce/submit?projectKey=ABC | time=1023ms
INFO: ------------------------------------------------------------------------
INFO: EXECUTION FAILURE
INFO: ------------------------------------------------------------------------
INFO: Total time: 54.833s
INFO: Final Memory: 51M/170M
INFO: ------------------------------------------------------------------------
DEBUG: Execution getVersion
DEBUG: Execution stop
ERROR: Error during SonarQube Scanner execution
ERROR: The 'report' parameter is missing
ERROR:
ERROR: Re-run SonarQube Scanner using the -X switch to enable full debug logging.
Process returned exit code 1
The SonarQube Scanner did not complete successfully
Creating a summary markdown file...
Post-processing failed. Exit code: 1
I've struggled the same problem with SonarQube and I've finally found a solution:
You need to restart sonar service after using evaluation token.
Please note this isn't the answer, however I feel this feedback is valuable to getting this question answered.
I can reproduce this issue in POSTMan with a POST request to:
http://localhost:9000/api/ce/submit?projectKey=myProjectKey
This returns
{
"errors": [
{
"msg": "The 'report' parameter is missing"
}
]
}
You can get a similar error by removing the projectKey query parameter. I tried adding a report query parameter and received the same error:
http://localhost:9000/api/ce/submit?projectKey=brian3016&report=report
Given this, I feel there is a problem with their code. It should have included a report parameter when creating the POST request, but it failed to do so.
Verbose output seems to have changed from using the -X switch to /d:sonar.verbose=true. E.G.
SonarScanner.MSBuild.exe begin /k:"myProjectKey" /d:sonar.host.url="http://localhost:9000" /d:sonar.login="myLogin" /d:sonar.verbose=true
Note the verbose logging didn't give me any valuable insight.
(Also note that the documentation currently says to use SonarQube.Scanner.MSBuild.exe, but the verbose logger told me to switch to SonarScanner.MSBuild.exe)
SO...how we we report this issue to someone that can fix it? Their documentation says to go to Stackoverflow. So here we are.
I thought it may have been an issue with a project. So I created a new project with nothing other than the startup template Console Application. Same error.
In my case SonarQube 7.9.1 (deployed with Helm to Kubernetes cluster) was missing temp directory /opt/sonarqube/temp/tc/work/Tomcat/localhost/ROOT after Helm rollback. No idea what happened to it.
Logfile /opt/sonarqube/logs/web.log inside SonarQube pod had this error:
2021.02.02 06:57:03 WARN web[AXdZ6l6MParQCncJACv3][o.s.s.w.ServletRequest] Can't read file part for parameter report
java.io.IOException: The temporary upload location [/opt/sonarqube/temp/tc/work/Tomcat/localhost/ROOT] is not valid
The fix was to exec into pod and create the missing directory. Would like to know the reason though...
The issue is with the sonar service starting up.
First try to stop the SonarStart.bat by using Ctrl+c, and then try to open localhost:9000 ( or whichever port you configured sonar server).
If it is still opening then go to task manager and search for wrapper.exe service and stop the service. If no service is found then go to:
Task manager>Details> and stop all java.exe process.
Note: If you running many Java applications, right-click the java.exe and choose goto service, and stop only those java.exe that belongs to AppX deployment.services
Now start sonarstart.bat as administrator..
today i face the same error when using jenkins to scanner the code.
get the error when POST /api/ce/submit and get 400 code by add the sonar.verbose=true
i use the below step to check reason
first to restart the sonarqube => failed
check the report file size by using "du -sh" get 108m and DB server support 1G => failed
login the sonar-qube server and check the access.log, web.log and another log, finally find the error reason " Processing of multipart/form-data request failed. No space left on device", so i check the server by command "df -h", some devices are used 100% => so i remove some no-using file and fix it!!!
check if you have enough memory
ex: free -m
In my case I had to upgrade memory.

Magento before install on centos 7 getting 500 internal server error

Hi I am trying to install magento 1.9.x and magento2 in my centos operating system.. the following links help to configure apache2.4, php7 and mysql5.7 in centos.
Install magento link
after configure web server, php, mysql, magento files and all. I create database for magento2. Based on above link i did all steps one-by-one. After i run in browser localhost/magento2/
it show 500 Internal server error in firebug and blank browser.
I am beginner of centos and magento
Please any one help how to solve this problem i was spend past two days.
Apache error log:
[Sat Sep 10 14:22:33.728848 2016] [:error] [pid 2809] [client
::1:45432] PHP Fatal error: Uncaught Zend_Cache_Exception: cache_dir
"/var/www/html/magento2/var/page_cache" is not writable in
/var/www/html/magento2/vendor/magento/zendframework1/library‌​/Zend/Cache.php:209\‌​nStack
trace:\n#0
/var/www/html/magento2/vendor/magento/zendframework1/library‌​/Zend/Cache/Backend/‌​File.php(180):
Zend_Cache::throwException('cache_dir "/var...')\n#1
/var/www/html/magento2/vendor/colinmollenhour/cache-backend-‌​file/File.php(87):
Zend_Cache_Backend_File->setCacheDir('/var/www/html/m...')\n‌​#2
/var/www/html/magento2/vendor/magento/zendframework1/library‌​/Zend/Cache.php(153)‌​:
Cm_Cache_Backend_File->__construct(Array)\n#3
/var/www/html/magento2/vendor/magento/zendframework1/library‌​/Zend/Cache.php(94):
Zend_Cache::_makeBackend('Cm_Cache_Backen...', Array, true, true)\n#4
/var/www/html/magento2/lib/internal/Magento/Framework/App/Ca‌​che/Frontend/Factory‌​.php(158):
Zend_Cache::factory('Magento\\Framewo...', 'Cm_Cache_Backen...',
Array, Array, true, true, true)\n#5
/var/www/html/magento2/lib/internal/Magento/Framework/App/Ca‌​che/Frontend
in
/var/www/html/magento2/vendor/magento/zendframework1/library‌​/Zend/Cache.php
on line 209
To me this look like the main problem:
Uncaught Zend_Cache_Exception: cache_dir
"/var/www/html/magento2/var/page_cache" is not writable in /var/www/html/magento2/vendor/magento/zendframework1/library‌​/Zend/Cache.php:209\‌​nStack
You have the wrong permissions or wrong owner for this folder. You can fix this using chown for fixing the owner of that folder or chmod for fixing writing permissions for that folder.
Try this:
chown -R apache.apache /var/www/html/magento2/
This sets the whole magento2 folder to have apache as owner and group. It is not the best security measure but for testing is fine.

Error: EACCES, unlink...

I'm trying to get my meteor app up and running, but I don't understand the error that its throwing at all, which is:
/Users/ten3/.meteor/packages/meteor- tool/.1.1.10.1b51q9m++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/lib/node_modules/fibers/future.js:278
throw(ex);
^
Error: EACCES, unlink '/Users/ten3/Desktop/git/ten/website/prospect-recovery/prospect-recovery/.meteor/local/db/mongod.lock'
at Object.Future.wait (/Users/ten3/.meteor/packages/meteor-tool/.1.1.10.1b51q9m++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/lib/node_modules/fibers/future.js:398:15)
at /tools/fs/files.js:1331:28
at Object.wrapper [as unlink] (/tools/fs/files.js:1334:20)
at findMongoAndKillItDead (/tools/runners/run-mongo.js:318:11)
at launchOneMongoAndWaitForReadyForInitiate (/tools/runners/run-mongo.js:400:7)
at launchMongo (/tools/runners/run-mongo.js:656:7)
at [object Object]._.extend._startOrRestart (/tools/runners/run-mongo.js:756:19)
at [object Object]._.extend.start (/tools/runners/run-mongo.js:714:10)
at /tools/runners/run-all.js:168:26
- - - - -
I'm running a shell script before I try to run a local copy of my meteor app. It supposed to stop my application from interacting with other APIs. When I run the script (I'm on a mac) through my terminal, it returns '0' which as I read means that there are zero errors. I know that the error message is guiding me to certain lines of code, but I don't understand why I would change them if my co-worker could get his copy up and running. He is running his application on a windows computer. Thank you. I'm pretty new to this.
It was a permission error just as #thatgibbyguy first suggested. I was able to run it buy using sudo meteor to override the permission restrictions. I wasn't about to remove my mongod.lock file since that my coworker had the file and was able to get it up and running.

Resources