Glide/Gaelyk/Groovy: Error deploying to Google App Engine: Can’t enter oauth2 token - google-app-engine

As part of the deployment process of a Glide project (http://glide-gae.appspot.com/docs/intro step 3 of 2nd section) you need to authenticate using oauth2. My browser popped up with the token as expected but the process didn’t wait for me to copy the code in, it just carried on with the following error...
22:30:12.713 [DEBUG] [org.gradle.launcher.daemon.server.DaemonStateCoordinator] Daemon is busy, sleeping until state changes.
22:30:12.733 [INFO] [org.gradle.launcher.daemon.server.exec.LogToClient] About to start relaying all logs to the client via the connection.
22:30:12.734 [INFO] [org.gradle.launcher.daemon.server.exec.LogToClient] The client will now receive all logging from the daemon (pid: 12557). The daemon log file: /.gradle/daemon/1.8/daemon-12557.out.log
22:30:12.739 [DEBUG] [org.gradle.launcher.daemon.server.SynchronizedDispatchConnection] thread 14: received class org.gradle.launcher.daemon.protocol.CloseInput
22:30:12.740 [DEBUG] [org.gradle.launcher.daemon.server.DefaultDaemonConnection] Received IO message from client: CloseInput[id=069864b2-2948-4a9d-abea-0705274136a1.2]
22:30:12.741 [INFO] [org.gradle.launcher.daemon.server.exec.ForwardClientInput] Closing daemon's stdin at end of input.
22:30:12.742 [INFO] [org.gradle.launcher.daemon.server.exec.ForwardClientInput] The daemon will no longer process any standard input.
22:30:12.747 [INFO] [org.gradle.launcher.daemon.server.exec.ExecuteBuild] Executing build with daemon context: DefaultDaemonContext[uid=3901cff0-8d50-41b6-9459-e31f7b78f1e3,javaHome=/Library/Java/JavaVirtualMachines/jdk1.7.0_51.jdk/Contents/Home,daemonRegistryDir=.gradle/daemon,pid=12557,idleTimeout=10800000,daemonOpts=-XX:MaxPermSize=256m,-Xmx512m,-Dfile.encoding=UTF-8]
Please enter code: Encountered a problem: No line found
Please see the logs [/var/folders/c8/vx2jf50j68x1z3_pysy6kxjm0000gp/T/appcfg2389447403250678065.log] for further information.
Daemon vm is shutting down... The daemon has exited normally or was terminated in response to a user interrupt.
----- End of the daemon log -----
org.gradle.tooling.GradleConnectionException: Could not execute build using Gradle distribution 'http://services.gradle.org/distributions/gradle-1.8-bin.zip'.
What can I do to be able to deploy my application? How can I force the process to wait for me to enter the code?

If that's (glide deploy) not working for you, the easiest option is to export the app as a standard gradle project and then execute the gaeUpdate task.
glide -a somedir/yourapp -o where/you/want/to/export/app export
Note that the export is command at the end, -o tell the location where it should be exported.
Then from the exported project run: gradle gaeUpdate

A work around is to manually set your credentials in the GAE build.gradle file.
Update the following file:
/glide/install/generated/app-name/build.gradle
appcfg {
email = ‘email-address'
password = ‘password'
app {
id = ‘app-id'
}
}
This means that the values from the __glide.groovy file are ignored, but at least you can get the application deployed

Related

Setting up a Flink cluster with Podman for a beampipeline with flinkrunner

My goal is to create a streaming pipeline to read data from Apache Kafka, process the data, and write back to it.
Because of security reasons, I want to avoid Docker and use Podman.
I have set up a minimal cluster via a docker-compose.yml with a jobmanager, taskmanager and a Python SDK harness worker. The SDK harness worker seems to get stuck when i try to execute a pipeline.
Running the pipeline (reading a multi-line .txt file and writing it back in a file) it gets transferred to the jobmanager and taskmanager correctly, but then goes idle. When I look in the pythonsdk container, the logs show the following message repeatedly:
2022/12/04 16:13:02 Starting worker pool 1: python -m
apache_beam.runners.worker.worker_pool_main --service_port=50000
--container_executable=/opt/apache/beam/boot
Starting worker with command ['/opt/apache/beam/boot', '--id=1-1',
'--logging_endpoint=localhost:45087',
'--artifact_endpoint=localhost:35323',
'--provision_endpoint=localhost:36435',
'--control_endpoint=localhost:33237']
2022/12/04 16:16:31 Failed to obtain provisioning information: failed to
dial server at localhost:36435
caused by:
context deadline exceeded
Here is a link to a test pipeline that was created:
Example on github
Environment:
Debian 11;
Podman;
Python 3.2.9;
apache-beam==2.38.0; and
podman-compose
The setup of the cluster defined in:
docker-compose.yml
1x flink-jobmanager (flink version 1.14)
1x flink-taskmanager
1x Python Harness SDK
I chose to create a SDK container manually because I don't have Docker installed and Flink fails when it tries to create a container
over Docker.
I suspect that I have made a mistake in the network setup or there are some configurations missing for the harness worker, but I could not figure out the problem. Any thoughts?
Crossposted in user mailing list of beam.apache.org

XINETD Cannot Launch NSCA Daemon Unless XINETD Started Via Command Line

I have configured xinetd to launch NSCA when a connection on port 5667 is made.
I can start xinetd by command line as root and things work correctly:
/usr/sbin/xinetd -stayalive -pidfile /var/run/xinetd.pid
I can send a test NSCA message to myself, and /var/log/messages shows NSCA daemons getting spun up, writing to nagios.cmd pipe, etc.
But, when run by systemctl start xinetd, my test messages fail with "Server closed connection before init packet was received"
The xinetd service appears the same in ps -ef | grep xinetd regardless of which way it's run.
I don't think its a user or permissions problem, as it should be running as root.
Not having much luck getting NSCA or XINETD to log any relevant info on why its attempting to spin up the NSCA daemon but immediately exiting...
See below for my nsca file for xinetd
service nsca
{
flags = REUSE
socket_type = stream
wait = no
user = root
group = root
server = /usr/sbin/nsca
server_args = -c /usr/local/nagios/etc/nsca.cfg --inetd
log_on_failure += USERID
disable = no
only_from = <list of allowed hosts>
instances = UNLIMITED
per_source = UNLIMITED
cps = 5000 0
}
Solution:
I learned that when systemd launches a process, its in a clean slate environment. So, anything run by xinetd that requires environment variables needs those env vars passed in xinetd's environment file (a field in /lib/systemd/system/xinetd.service called "EnvironmentFile"). For me that lives at: /etc/sysconfig/xinetd
To find which vars I need, in the bash window in which running xinetd manually was WORKING, 'env' spit out all the vars.
Copied them all into /etc/sysconfig/xinetd, then 'systemctl restart xinetd' and all worked.
Then just through process of elimination determined the envvar I was missing was:
LD_LIBRARY_PATH=:/usr/local/libmcrypt/lib

Socket connection getting close while creating room on kurento

I have configure kurento on WS. Its spring boot application running on https://localhost:8443 (tomcat).
Logs:
s.b.c.e.t.TomcatEmbeddedServletContainer : Tomcat started on port(s): 8443 (https)
DEBUG 4730 --- [apterApp.main()] o.s.w.c.s.StandardServletEnvironment : Adding [server.ports] PropertySource with highest search precedence
INFO 4730 --- [apterApp.main()] com.io.AdapterApp : Started AdapterApp in 14.041 seconds (JVM running for 29.346)
Start boot application using below command:
sudo mvn compile exec:java Dkms.url=ws://io-storage:8888/kurento
Websocket running on 8888 port. (not secure WS).
While creating room the request is ws://io-storage:8888/call
But getting following error while request send to the kurento server
2018-10-31 13:12:23,252181 2009 [0x00007fe37ce5b700] error KurentoWebSocketTransport WebSocketTransport.cpp:455 openHandler() Invalid path "/call", closing connection
Kurento Media Server doesn't listen for RPC commands on the /call endpoint. Why are you requesting that URL?
Just use the Java API client by following any of the Java tutorials; this library does all of the RPC commands for you.
If you still need to work without libraries and program directly against the RPC API, then check the protocol docs.

firebase deploy is slow and not responding

Running the deploy command to a site just makes the Terminal blink as if it was stuck in some heavy operation.
And nothing would happen. I actually didn't try running with the --debug flag.
First thought is that I'm behind a company proxy. So I setup a "pure" connection and it's still not connecting. So what is the problem?
Open the firebase-debug.log file it contains the logs you may find an error in there.
logs similar to this
[debug] [2020-09-26T07:53:15.852Z] > command requires scopes: ["email","openid","https://www.googleapis.com/auth/cloudplatformprojects.readonly","https://www.googleapis.com/auth/firebase","https://www.googleapis.com/auth/cloud-platform"]
[debug] [2020-09-26T07:53:15.854Z] > authorizing via signed-in user
[debug] [2020-09-26T07:53:15.855Z] [iam] checking project testproject for permissions ["firebase.projects.get","firebasehosting.sites.update"]
[debug] [2020-09-26T07:53:15.861Z] > refreshing access token with scopes: ["email","https://www.googleapis.com/auth/cloud-platform","https://www.googleapis.com/auth/cloudplatformprojects.readonly","https://www.googleapis.com/auth/firebase","openid"]
[debug] [2020-09-26T07:53:15.861Z] >>> HTTP REQUEST POST https://www.googleapis.com/oauth2/v3/token
In my case, it was due to a slow internet connection thus connection could not be established.
Running firebase --help there should be an info popping up if there is an update available.
If it is you should update and then deploy again.
npm update -g firebase-tools
firebase deploy
If that isn't working, list the projects and check if you are logged in
firebase list
firebase login

Error message "You do not have permission to modify this app" from a Google App Engine deployment

I am following the instructions on http://beta.appinventor.mit.edu/learn/reference/other/tinywebdb.html , trying to create a custom TinyWebDB for a grade 10 class I teach. After creating a new Project (the instructions say create an Application, but I only see a Create a new project button), I change the project name in the local file app.yaml file, load it in, and click on Deploy. I get the following error message:
Starting update of app: npicswebdb, version: 1
01:35 PM Getting current resource limits.
2016-03-09 13:35:26,727 ERROR appcfg.py:2396 An error occurred processing file '': HTTP Error 403: Forbidden Unexpected HTTP status 403. Aborting.
Error 403: --- begin server output ---
You do not have permission to modify this app (app_id=u's~npicswebdb').
--- end server output ---
2016-03-09 13:35:26 (Process exited with code 1)
Is there some way I need to log in to the App Engine Launcher so it connects with my App Engine in the cloud? There is nothing in the instructions about doing that, and I don't see any way to do that in the launcher.
Thanks for your help.
Try adding "--no_cookies":
appcfg.py -A projectname update app.yaml --no_cookies
Delete cookie file something like this: ~/.appcfg_oauth2_tokens_java.
Re-run your command, it will prompt to login from browser and copy-paste a token back to the terminal.
Similar to the other answers. I run into the same issue and removing those stored credentials helped me, i.e:
rm ~/.appcfg_oauth2_tokens_java
rm ~/.appcfg_cookies
Found more details here: IT Code Hub - AppEngine deployment

Resources