JRuby on Appengine: jar splitting not working? - google-app-engine

I need to upload a jruby web application to appengine, so I use these commands:
cd my/app/path
jruby -S appcfg.rb update .
This throws an error saying:
Found a file too large to upload: "/var/folders/Qv/QvM5YWsvGP84UoFhrVmLyE+++TM/-Tmp-/appcfg5196464172432329417.tmp/vendor/gems/jruby/1.8/cache/jruby-jars-1.6.0.gem". Must be under 10000000 bytes.
Browsing around I found that I need to pass a --enable_jar_splitting flag like this:
jruby -S appcfg.rb
--enable_jar_splitting update .
Still this command fails, with a different error:
INFO: Opening new file: /var/folders/Qv/QvM5YWsvGP84UoFhrVmLyE+++TM/-Tmp-/appcfg7137125152681466424.tmp/WEB-INF/lib/jruby-core-1.6.0-0000.jar
Apr 11, 2011 1:08:12 PM com.google.appengine.tools.util.JarSplitter run
INFO: Closing file after writing 9991985 bytes.
Apr 11, 2011 1:08:12 PM com.google.appengine.tools.util.JarSplitter createOutFile
INFO: Opening new file: /var/folders/Qv/QvM5YWsvGP84UoFhrVmLyE+++TM/-Tmp-/appcfg7137125152681466424.tmp/WEB-INF/lib/jruby-core-1.6.0-0001.jar
Apr 11, 2011 1:08:13 PM com.google.appengine.tools.util.JarSplitter run
INFO: Closing file after writing 9990346 bytes.
Apr 11, 2011 1:08:13 PM com.google.appengine.tools.util.JarSplitter createOutFile
INFO: Opening new file: /var/folders/Qv/QvM5YWsvGP84UoFhrVmLyE+++TM/-Tmp-/appcfg7137125152681466424.tmp/WEB-INF/lib/jruby-core-1.6.0-0002.jar
Apr 11, 2011 1:08:14 PM com.google.appengine.tools.util.JarSplitter run
INFO: Closing file after writing 1316596 bytes.
java.lang.IllegalStateException: Found a file too large to upload: "/var/folders/Qv/QvM5YWsvGP84UoFhrVmLyE+++TM/-Tmp-/appcfg7137125152681466424.tmp/vendor/gems/jruby/1.8/cache/jruby-jars-1.6.0.gem". Must be under 10000000 bytes.
Seems like it's splitting something... but it's still failing.
Any ideas?

Related

Errors and seg fault when using device provisioning service

I am trying to use the device provisioning service from my device to connect to the hub, using the c SDK. I am using individual enrollment and X.509. I created an individual enrollment on the hub using a certificate I generated using the "dice_device_enrollment" tool of the SDK. I also installed the certificate on the device. When I run the code I get (OpenSSL) errors when executing the Prov_Device_LL_DoWork() function. When I call Prov_Device_LL_DoWork() the second time, the program seg faults.
Output:
08:11:25 10-10-2018 [info] Prov_Device_LL_DoWork
Error: Time:Wed Oct 10 08:11:25 2018 File:/home/tijmen/azure-iot-sdk-c/c-utility/adapters/x509_openssl.c Func:log_ERR_get_error Line:29 Failure creating private key evp_key
Error: Time:Wed Oct 10 08:11:25 2018 File:/home/tijmen/azure-iot-sdk-c/c-utility/adapters/x509_openssl.c Func:log_ERR_get_error Line:36 [0] error:0906D06C:PEM routines:PEM_read_bio:no start line
Error: Time:Wed Oct 10 08:11:25 2018 File:/home/tijmen/azure-iot-sdk-c/c-utility/adapters/x509_openssl.c Func:log_ERR_get_error Line:36 [1] error:0906D064:PEM routines:PEM_read_bio:bad base64 decode
Error: Time:Wed Oct 10 08:11:25 2018 File:/home/tijmen/azure-iot-sdk-c/c-utility/adapters/tlsio_openssl.c Func:log_ERR_get_error Line:428 unable to use x509 authentication
Error: Time:Wed Oct 10 08:11:25 2018 File:/home/tijmen/azure-iot-sdk-c/c-utility/adapters/tlsio_openssl.c Func:tlsio_openssl_open Line:1251 Failed creating the OpenSSL instance.
Error: Time:Wed Oct 10 08:11:25 2018 File:/home/tijmen/azure-iot-sdk-c/umqtt/src/mqtt_client.c Func:mqtt_client_connect Line:1000 Error: io_open failed
Error: Time:Wed Oct 10 08:11:25 2018 File:/home/tijmen/azure-iot-sdk-c/provisioning_client/src/prov_transport_mqtt_common.c Func:create_connection Line:567 Failure connecting to mqtt server
Error: Time:Wed Oct 10 08:11:25 2018 File:/home/tijmen/azure-iot-sdk-c/provisioning_client/src/prov_transport_mqtt_common.c Func:prov_transport_common_mqtt_dowork Line:874 unable to create amqp connection
08:11:25 10-10-2018 [info] Prov_Device_LL_DoWork
Segmentation fault
The same code does work on my dev machine, but using slightly different version of OpenSSL:
On the dev machine OpenSSL 1.0.1t 3 May 2016
On the device OpenSSL 1.0.2d 9 Jul 2015
Are there requirements on the OpenSSL version I missed?
It turns out that upgrading OpenSSL solves this problem.
I built OpenSSL version 1.0.2q from https://github.com/openssl/openssl/tree/OpenSSL_1_0_2-stable and linked it to my app. This solved the error. It seems the SDK, at least X.509 functionality requires an higher version of OpenSSL than 1.0.2d 9 Jul 2015.

app engine go deploy failed

It works well yesterday afternoon, but it does not work now.
I use goapp deploy MY_DIR/app.yaml to deploy, and this is the message of deploy
02:38 PM Host: appengine.google.com
02:38 PM Application: MY_APP; module: MY_MOD; version: MY_VER
02:38 PM Starting update of app: exp-lkl, module: MY_MOD, version: MY_VER
02:38 PM Getting current resource limits.
02:38 PM Scanning files on local disk.
02:38 PM Scanned 500 files.
02:38 PM Scanned 1000 files.
02:38 PM Cloning 1085 application files.
02:38 PM Compilation starting.
02:38 PM Compilation: 1081 files left.
02:38 PM Compilation completed.
02:38 PM Starting deployment.
02:38 PM Checking if deployment succeeded.
02:38 PM Will check again in 1 seconds.
02:38 PM Checking if deployment succeeded.
02:38 PM Will check again in 2 seconds.
02:38 PM Checking if deployment succeeded.
02:38 PM Will check again in 4 seconds.
02:38 PM Checking if deployment succeeded.
02:38 PM Will check again in 8 seconds.
02:38 PM Checking if deployment succeeded.
02:38 PM Will check again in 16 seconds.
02:38 PM Checking if deployment succeeded.
02:39 PM Deployment successful.
02:39 PM Checking if updated app version is serving.
02:39 PM Rolling back the update.
Error 500: --- begin server output ---
Server ErrorA server error has occurred.
--- end server output ---
I tried also:
1/ update sdk to the lastest version
2/ update go version (I tried go1.6 and go1.8)
3/ use appcfg.py
But I get the same error
Someone can help?
Finally I fixed this issue.
It seems that app engine changed the error message for the no buildable code. My project does not build, app engine showed the path of the no buildable code before, but now app engine returns 500 error
Error 500:
--- begin server output ---
<h3>Server Error</h3><p>A server error has occurred.</p>
--- end server output ---

Installing Solr 5 on Debian 8

I followed the instructions on https://ctors.net/2015/07/14/solr5_java8_debian8.
As the root
First I installed Java 8:
mkdir -p /opt/java
wget --no-cookies --no-check-certificate --header "Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com%2F; oraclelicense=accept-securebackup-cookie" "http://download.oracle.com/otn-pub/java/jdk/8u45-b14/jdk-8u45-linux-x64.tar.gz"
tar xvf jdk-8u45-linux-x64.tar.gz -C /opt/java
update-alternatives --install /usr/bin/java java /opt/java/jdk1.8.0_45/bin/java 1
update-alternatives --set java /opt/java/jdk1.8.0_45/bin/java
Then I installed Solr:
wget http://apache.belnet.be/lucene/solr/5.2.1/solr-5.2.1.tgz
tar xvf solr-5.2.1.tgz
./solr-5.2.1/bin/install_solr_service.sh solr-5.2.1.tgz
But the installation ends up with the following error message:
solr.service - LSB: Controls Apache Solr as a Service
Loaded: loaded (/etc/init.d/solr)
Active: failed (Result: exit-code) since Wed 2015-11-18 02:29:36 TMT; 5s ago
Process: 1679 ExecStart=/etc/init.d/solr start (code=exited, status=1/FAILURE)
Nov 18 02:29:36 solrhost su[1681]: Successful su for solr by root
Nov 18 02:29:36 solrhost su[1681]: + ??? root:solr
Nov 18 02:29:36 solrhost su[1681]: pam_unix(su:session): session opened for user solr by (uid=0)
Nov 1`enter code here`8 02:29:36 solruser solr[1679]: This script requires extracting a WAR file with either the jar or unzip utility, please install these utilities or con...assistance.
Nov 18 02:29:36 solrhost su[1681]: pam_unix(su:session): session closed for user solr
Nov 18 02:29:36 solrhost systemd[1]: solr.service: control process exited, code=exited status=1
Nov 18 02:29:36 solrhost systemd[1]: Failed to start LSB: Controls Apache Solr as a Service.
Nov 18 02:29:36 solrhost systemd[1]: Unit solr.service entered failed state.
Hint: Some lines were ellipsized, use -l to show in full.
Service solr installed.
Does anyone have any idea what is going on?
solr needs unzip to work. Install unzip if it isn't available on the system.
apt-get install unzip
It should fix the problem.
I got my colleague to have a look at the issue. He found two causes of error:
1) Insufficient memory (my box had 512 MB RAM memory). Additional memory resolved the issue.
2) Wrong jdk package, that is, wrong architecture choice. For different JDK packages look here: http://www.oracle.com/technetwork/java/javase/downloads/java-se-6u24-download-338091.html.
Hope someday this will save someone else's time and nerves.
As for Debian and Solr developers, it would be great if you could come up with simple receipt about how to install Solr 5 under Debian 8. For example, https://www.digitalocean.com/community/tutorials/how-to-install-solr-5-2-1-on-ubuntu-14-04.

java.net.UnknownHostException: appengine.google.com

Got this error. Any idea how to get rid of it?
Yesterday it was working fine but today I got these errors. I saw a known issue with this - link. But I didn't find any solution yet..
Oct 16, 2012 4:01:59 PM com.google.appengine.tools.info.RemoteVersionFactory getVersion
INFO: Unable to access https://appengine.google.com/api/updatecheck?runtime=java&release=1.7.1&timestamp=1345058163&api_versions=['1.0']
java.net.UnknownHostException: appengine.google.com
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:195)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
at java.net.Socket.connect(Socket.java:529)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.connect(SSLSocketImpl.java:559)
at com.sun.net.ssl.internal.ssl.BaseSSLSocketImpl.connect(BaseSSLSocketImpl.java:141)
at sun.net.NetworkClient.doConnect(NetworkClient.java:163)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:395)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:530)
at sun.net.www.protocol.https.HttpsClient.<init>(HttpsClient.java:272)
at sun.net.www.protocol.https.HttpsClient.New(HttpsClient.java:329)
at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.getNewHttpClient(AbstractDelegateHttpsURLConnection.java:172)
at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:911)
at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:158)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1172)
at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:234)
at java.net.URL.openStream(URL.java:1010)
at com.google.appengine.tools.info.RemoteVersionFactory.getVersion(RemoteVersionFactory.java:76)
at com.google.appengine.tools.info.UpdateCheck.checkForUpdates(UpdateCheck.java:99)
at com.google.appengine.tools.info.UpdateCheck.doNagScreen(UpdateCheck.java:174)
at com.google.appengine.tools.info.UpdateCheck.maybePrintNagScreen(UpdateCheck.java:142)
at com.google.appengine.tools.development.DevAppServerMain$StartAction.apply(DevAppServerMain.java:289)
at com.google.appengine.tools.util.Parser$ParseResult.applyArgs(Parser.java:48)
at com.google.appengine.tools.development.DevAppServerMain.<init>(DevAppServerMain.java:249)
at com.google.appengine.tools.development.DevAppServerMain.main(DevAppServerMain.java:225)
Oct 16, 2012 4:01:59 PM com.google.apphosting.utils.jetty.JettyLogger info
INFO: Logging to JettyLogger(null) via com.google.apphosting.utils.jetty.JettyLogger
Oct 16, 2012 4:02:00 PM com.google.apphosting.utils.config.AppEngineWebXmlReader readAppEngineWebXml
INFO: Successfully processed D:\WorkSpace\GAE\GST\war\WEB-INF/appengine-web.xml
Oct 16, 2012 4:02:00 PM com.google.apphosting.utils.config.AbstractConfigXmlReader readConfigXml
INFO: Successfully processed D:\WorkSpace\GAE\GST\war\WEB-INF/web.xml
Oct 16, 2012 4:02:02 PM com.google.appengine.tools.development.DevAppServerImpl start
If you are using Java 8 in your app engine application, you will need to include
<url-stream-handler> urlfetch </ url-stream-handler>
in appengine-web.xml.
appengine-web.xml Reference
I am assuming that you are seeing this in your Eclipse IDE when you are trying to run the Eclipse Project as a Web Application.
The GAE plugin simply checks if there is an updated AppEngine SDK available for download. If there is a newer one than the one you are currently using then it lets you know that. The error is because at that instance, there was probably a network error and it got not connect through. It is harmless as far as running your application is concerned.
But if your application is dependent on accessing some external network services, then chances are that they might fail also if the network issue persists in your development environment.
got it working.. : cmd->goto your home directory >mkdir .appcfg_no_nag this will stop checking for the update and yourweb app willrun locally atleast..
This error is related to internet connection. I changed to other connection, it works
You should add in appengine-web.xml:
<url-stream-handler> urlfetch </ url-stream-handler>
And also start using java.net.URLConnection,
Apache HttpClient is not gonna work for example.
https://cloud.google.com/appengine/docs/standard/java/issue-requests#java_8_runtime_vs_java_7_behavior

Google App Engine Local instance never loads but no error shown

I'm using Eclipse to develop and test a new GWT application. Everything appears to work, however when I click the URL to launch it, it leaves the browser in a "loading" status and never actually displays the application. There is no indication of an error in the console.
I've tried accessing the admin url and get the same thing -- just hangs forever with a "loading status" despite the fact that the last line console output reads:
"INFO: The admin console is running at [URL removed so I can post...]"
Full output is below. Any idea what might be wrong or where I could look to figure out how to fix this?
My console output is this:
Dec 19, 2011 4:20:47 PM com.google.apphosting.utils.jetty.JettyLogger info
INFO: Logging to JettyLogger(null) via com.google.apphosting.utils.jetty.JettyLogger
Dec 19, 2011 4:20:48 PM com.google.apphosting.utils.config.AppEngineWebXmlReader readAppEngineWebXml
INFO: Successfully processed C:\Documents and Settings\dhamilton\My Documents\Test1\war\WEB-INF/appengine-web.xml
Dec 19, 2011 4:20:48 PM com.google.apphosting.utils.config.AbstractConfigXmlReader readConfigXml
INFO: Successfully processed C:\Documents and Settings\dhamilton\My Documents\Test1\war\WEB-INF/web.xml
Dec 19, 2011 10:20:53 AM com.google.appengine.tools.development.DevAppServerImpl start
INFO: The server is running at http://localhost:8888/
Dec 19, 2011 10:20:53 AM com.google.appengine.tools.development.DevAppServerImpl start
INFO: The admin console is running at http://localhost:8888/_ah/admin

Resources