openshift

Openshift MySQL “Communications Link Failure”

╄→гoц情女王★ 提交于 2019-12-12 04:59:03
问题 I get the following error message when trying to connect a web app running on EAP6 to MySQL in OpenShift. javax.persistence.PersistenceException: org.hibernate.exception.JDBCConnectionException: Communications link failure How do I fix this? 回答1: The same issue was discussed at https://community.jboss.org/thread/202318. The solution is to append "?autoReconnect=true" to the connection URL. You do this in the standalone.xml file, found in the .openshift/config folder in your OpenShift Maven

where to put wordpress htaccess on openshift

孤人 提交于 2019-12-12 04:58:02
问题 I have cloned my wordpress application from openshift with git, in my cloned application there is php folder, when i put my htaccess file in it then i commit my changes like this : git add -A git commit -m 'ok' git push My htaccess file is not pushed in the application repository folder on openshift, but when i put it via ftp with filezilla it works, not with git. I don't know where i have to put .htaccess file ? if it is in php folder, why it's not uploaded ? 回答1: If you used our official

System.getenv() returns null

余生颓废 提交于 2019-12-12 04:49:58
问题 I'm trying through a Java applet to connect to a Mysql database set up on OpenShift. String dbHost = System.getenv("OPENSHIFT_MYSQL_DB_HOST"); String dbPort = System.getenv("OPENSHIFT_MYSQL_DB_PORT"); both of those strings return NULL when the application is online. If I connect through ssh to the database everything seems to be working fine, I can see the database and I can work on it. What am I missing? 回答1: 1) what does echo $OPENSHIFT_MYSQL_DB_HOST give if you connect via ssh? You might

How can I deploy changes to my drupal gear when the mysql DB holds customer data?

断了今生、忘了曾经 提交于 2019-12-12 04:49:28
问题 My openshift drupal gear has live customer data, but my test site has just test data. When I develop a new feature, fix a bug, add a view or change a field in a content type (on test site), it will makes changes to the mysql database. How do I upload these changes to the gear w/o wiping out the tables that hold customer data? So far I have not had to write any custom code, just added modules and configured them. So I'd rather avoid a PHP solution. Thanks. 回答1: You will either have to write

How do I develop node js on localhost whilst connecting to remote mongo db

这一生的挚爱 提交于 2019-12-12 04:47:45
问题 I'm using OpenShift with node js and mongo db. I'd like to develop updates locally and then push them to the server. How can I develop node js locally and connect to a remote mongo db. I've tried port forwarding. This forwards everything for some reason so runs node js server instance. Which is no good. I want to run the localhost node js. rhc port-forward appname This port forwads just mongodb, but if I then run node js in a separate terminal, it's unable to connect. rhc port-forward appname

How can I force a bundle install on OpenShift Online when my RAILS_ENV is set to development?

人走茶凉 提交于 2019-12-12 04:43:19
问题 I have a Rails app on OpenShift Online that I'm trying to setup with RAILS_ENV = development as opposed to the default env of production . The idea being later on I'll add test, staging and production domains. My problem is that because the env is set to development the OpenShift process that runs when I do a git push says it's skipping "bundle install": remote: NOTE: Skipping 'bundle install' because running in development mode. I got it to do the bundle install by setting RAILS_ENV to

How to get openshift oc command working on Raspberry pi 3?

こ雲淡風輕ζ 提交于 2019-12-12 04:39:36
问题 I'm trying to compile openshift origin source on my raspberry pi 3 but it keeps timing out. The tutorial I'm following is from here Reason I'm doing this is because I get the error ./oc: cannot execute binary file: Exec format error when I download the file directly from here and use it. So can anyone tell me what I have to do to make this work or how I fix the errors? With openshift 2 being discontinued soon, I cannot access my application with rhc anymore (which works fine on my RPi3). 回答1:

RewriteRule Apache Directives in .htaccess not working

风流意气都作罢 提交于 2019-12-12 04:31:39
问题 My .htaccess file for my PHP wordpress app is in clone-directory/php/ and I could say that it was recognized by the OpenShift server. But some of the RewriteRules and RewriteCond doesn't seem to work. Since the app is accessible by both http and https by crawlers, I'm trying to create separate robots.txt for ssl and http connections. I've been researching hours and hours with several different codes but none of them work. Some of them are as follows ... 1 <IfModule mod_rewrite.c>

how can i using openshift environment variables in hibernate.cfg.xml

别来无恙 提交于 2019-12-12 04:24:12
问题 I am using Hibernate on OpenShift now. In hibernate.cfg.xml When I use: <property name="connection.url">jdbc:mysql://10.143.140.62:52016/yoodp</property> It works. But when I use: <property name="connection.url">jdbc:mysql://${env.OPENSHIFT_MYSQL_DB_HOST}:${env.OPENSHIFT_MYSQL_DB_PORT}/${env‌​.OPENSHIFT_APP_NAME}</property> or <property name="connection.url">jdbc:mysql://${OPENSHIFT_MYSQL_DB_HOST}:${OPENSHIFT_MYSQL_DB_PORT}/${OPENSHIFT_APP_NAME}</property> It doesn't work. How can I fix it?

Openshift node app error when restarting

时间秒杀一切 提交于 2019-12-12 03:24:17
问题 I have a node/socket.io chat app hosted on openshift, and while it starts correctly if i ssh into the server and do "node main.js" (where main.js is the server script that starts the chat), I can't start the app on the server by web interface, where it would go on automatically; If i just start the app by ssh, it would stop working as soon as i exit the terminal. I get this error when starting the app by the web interface: Starting Node.js application... Application is already stopped.