ubuntu,openshift,openshift-enterprise , Uploaded files getting deleted while redeploying in Openshift server


Uploaded files getting deleted while redeploying in Openshift server

Question:

Tag: ubuntu,openshift,openshift-enterprise

After pushing the whole application, The whole application is working fine. Then I upload some files to my uploads folder via my web interface.

If I push the code via git, All the files in uploads folder is deleting automaticaly. Is there a way to stop this in my openshift server ?


Answer:

Your application should be storing any persistent files in the $OPENSHIFT_DATA_DIR, which is usually ~/app-root/data. Your application is likely storing these "uploads" into the $OPENSHIFT_REPO_DIR, where your code lives. This directory is overwritten with your new code every time you git push.

You need to configure your application to store the uploads in $OPENSHIFT_DATA_DIR to store them persistently.


Related:


cuMemcpyDtoH yields CUDA_ERROR_INVALID_VALUE


java,scala,ubuntu,cuda,jcuda
I have a very simple scala jcuda program that adds a very large array. Everything compiles and runs just fine until I want to copy more than 4 bytes from my device to host. I am getting CUDA_ERROR_INVALID_VALUE when I try to copy more than 4 bytes. // This does...

Error in reading Ubuntu 14.04 mouse event file (/dev/input/event3) with java programmig


java,events,ubuntu,terminal,mouse
I want to handle mouse event in Linux terminal via java programming. I wrote two program via c++ and java that they do same process. when i use c++ programming to open and read file ("/dev/input/event3"-mouse event file), there is no problem while running executable file. (Ubuntu 14.04 terminal and...

Ubuntu 14.04 - An error occurred while installing pg (0.18.2), and Bundler cannot continue


ruby-on-rails,postgresql,ubuntu,heroku,sqlite3
This issue doesn't let me go ahead and I don't know whether it's possible for me to deploy my Rails App ever on Heroku. When I try bundle install by having gem 'pg' in my Gemfile it gives following error. An error occurred while installing pg (0.18.2), and Bundler cannot...

Kill command in UNIX


linux,bash,shell,unix,ubuntu
If I execute the Following command all the process will be killed and the account is logged out. Command: kill -9 -1 It is similar to the logout command. In Unix, no such process having the pid as "-1". So, what is the reason for this result?...

What is version of cuda for nvidia 304.125


ubuntu,cuda,ubuntu-14.04,nvidia
I am using ubuntu 14.04. I want to install CUDA. But I don't know which version is good for my laptop. I trace my drive that is $cat /proc/driver/nvidia/version NVRM version: NVIDIA UNIX x86_64 Kernel Module 304.125 Mon Dec 1 19:58:28 PST 2014 GCC version: gcc version 4.8.2 (Ubuntu 4.8.2-19ubuntu1)...

How does one install MarkLogic 8 on Ubuntu 14.04?


ubuntu,install,marklogic
What are the steps to install MarkLogic 8 on Ubuntu 14.04?

Can't install Composer on Ubuntu behind proxy


php,ubuntu,proxy,composer-php
I'm trying to install Composer, in order to use Laravel, but I'm behind the company proxy. The proxy is already configured in the system, so wget --proxy-user=<my_user_name> --proxy-password=<my_password> https://getcomposer.org/installer works (curl doesn't!), and I get the 270kB "installer" file. Next, I'm trying to run php installer as the manual says,...

Protobuf cannot be linked on ubuntu


c++,ubuntu,linker,cmake,protocol-buffers
I try to use protobuf but somehow the linking fails (here just snippet): Linking CXX executable app CMakeFiles/app.dir/msg.pb.cc.o: In function `evoswarm::protobuf_AssignDesc_a_5fto_5fb_2eproto()': msg.pb.cc:(.text+0x133): undefined reference to `google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection(google::protobuf::Descriptor const*, google::protobuf::Message const*, int const*, int, int, int, int, int, int)' msg.pb.cc:(.text+0x190): undefined reference to...

How can I run a libGDX application on a non-GUI server environment?


java,linux,ubuntu,libgdx,server
I built a libGDX application that runs well on my PC desktop but when I try to run it on my Ubuntu server, it raises the following error: "LwjglApplication: Couldn't initialize audio, disabling audio java.lang.UnsatisfiedLinkError: /tmp/libgdxroot/31ce78a2/liblwjgl64.so: /usr/lib/jvm/java-7-openjdk-amd64/jre/bin/../lib/amd64/libjawt.so: symbol awt_Unlock, version SUNWprivate_1.1 not defined in file libmawt.so with link time reference"....

Python3 input() error: can't initialize sys standard streams


ubuntu,python-3.x
I'm running Python 3.4.3 on Ubuntu 15.04 and just encountered a very strange problem when trying to use the input() function. To isolate the problem Iv'e created a file called test.py contaning: print(input()) When running it, I receive this error: $ python3 test.py Fatal Python error: Py_Initialize: can't initialize sys...

Openshift trustwave intermediate ssl cert issue


ssl,https,ssl-certificate,openshift
So I have got an application on openshift and I am trying to enable SSL on there. I already have an SSL cert from my previous host which is with Trustwave and seemed to work fine. So I have setup an alias for my-domain.com and have put a CNAME redirect...

Write Access for user on all repos on Gitolite


git,ubuntu,gitolite
I'm trying to add access to read, write and create new repos from my local to a gitolite server. I have the following config on my gitolite server, but it doesn't want to let me push to a new repo: repo @all RW+ = git repo gitolite-admin RW+ = git...

Pylucene 4.9.0 Ubuntu 14.04 Installation ImportError


python,ubuntu,lucene,pylucene
I've been trying to install Pylucene on my Mac for a little over a week, and have given up on that in favor of trying to install it with Ubuntu through a virtual machine. I thought the installation process had gone well, so I fired up Python in the terminal...

issues with installing newer cabal version for haskell vim now


ubuntu,haskell,vim,ubuntu-14.04,cabal
I would like to install this vim plugin: https://github.com/begriffs/haskell-vim-now When trying to run the suggested installation script: curl -o - https://raw.githubusercontent.com/begriffs/haskell-vim-now/master/install.sh | bash I get: --- Cabal version 1.18 or later is required. Aborting. I then try to install a newer version of cabal: [email protected]:~/Downloads/cabal-install-1.22.6.0$ ./bootstrap.sh The response I get:...

Openshift - trigger Jenkins build on git push


jenkins,openshift
I work with Openshift now and I have a problem. I created an application server with Jenkins and when I push to the master branch of the git repository the Jenkins build is triggered automatically. The point is that the build isn't triggered when I push to another branch (not...

Openshift redirect to https using flask-base example


python,.htaccess,flask,openshift
I'm trying to run my flask based app on free gear on Openshift only on https. Following this - I have added the .htaccess file to the root of my repo but it seems to be ignored, as it is not redirecting. The article talks about a wsgi directory but...

Creating a docker swarm cluster in Vagrant


ubuntu,vagrant,virtual-machine,docker-swarm
I'm trying to create a swarm cluster of diffferent ubuntu VMs running in Vagrant. These have docker enabled via the vagrant file that boots them. Of the three VM's I started the swarm cluster on one machine in the following way docker pull swarm docker run --rm swarm create This...

Remote debugging tomcat with OpenShift


eclipse,tomcat,openshift,remote-debugging
I am using openshift for my tomcat webapp. I am able to run the app but unable to debug it. As openshift starts tomcat in debug mode, I was expecting I'll be able to debug. Host: $OPENSHIFT_JBOSSEWS_IP Value of this is 127.5.20.129 for me which I got from command: rhc...

Would using Vagrant be overkill? [on hold]


python,windows,ubuntu,vagrant,virtualbox
I'm a developer-hobbyist running Windows 8.1 on a Yoga 2 Pro. I mostly do Python/Django work but I think I'm gonna pick up Ruby soon. The thing is, Windows always seems to be the limiting factor for any project I want to pick up. Last time I tried to install...

Flask Project root directory on openshift


python,flask,openshift
I'm getting started with flask and I'm deploying my app to openshift. My apps code: def get_users(): f = open('./users.txt') .... when I run: $ rhc tail flaskpq I see: [Sun Jun 21 09:05:20 2015] [error] [client 127.2.78.1] f = open('./user.txt') [Sun Jun 21 09:05:20 2015] [error] [client 127.2.78.1] IOError:...

JApplet does not receive mouse-events


java,ubuntu,mouselistener
I'm trying to listen to MouseEvents in Java on a JApplet in a JFrame. My program is actually doing more stuff, but I've simplified it for you to this: import java.awt.*; import java.awt.event.*; import java.awt.geom.*; import javax.swing.*; public class mouse extends JApplet implements MouseListener, MouseMotionListener { static final private int...

pyreport LaTeX formulae not working


python,ubuntu,latex,pyreport
I'm trying to create a HTML report using pyreport and it works up to the single point, that the LaTeX formulae are not generated. Here is the input file I use for testing: #$ This is \LaTeX : $c = 2\cdot(a+b)$ Than I run pyreport -l -t html --verbose file.py,...

Access binaries inside docker


ubuntu,meteor,docker
I am using Meteor and Meteur Up package to push a bundle to server. It uses docker. The problem is that I cannot access graphicsmagick or imagemagick from inside a docker to use it in my app. However it is installed on the server and I can access it when...

Boost unit test dynamic linking on Ubuntu


c++,ubuntu,singleton,dynamic-linking,boost-unit-test-framework
I am trying to build a unit test using Boost's unit test framework. I would like to dynamically link test suite libraries with the auto generated test module that Boost provides. Here is the basic construction I've been using: test_main.cpp: #define BOOST_TEST_DYN_LINK #define BOOST_TEST_MAIN #include <boost/test/unit_test.hpp> lib_case.cpp: #define BOOST_TEST_DYN_LINK #include...

Is it possible to dump the core but not exit the process?


c++,c,ubuntu,core
I want to be able to generate a core dump but not exit the process afterwards. I don't need it to continue execution, just not die. This is a C++ Ubuntu process. I believe I'm dumping the core in a pretty standard way: I catch the offending signal via setting...

How do I respond to a prompt for password in a shell script?


bash,ubuntu,vnc
I'm writing a shell script to set a VNC password using vncpasswd. The only way to use vncpasswd is in interactive mode (enter password, return, confirm password, return). How can I respond to the prompts in my shell script so I can set the password automatically? (i.e. non-interactive). Thanks! Chris....

Can not increase max_open_files for Mysql max-connections in Ubuntu 15


php,mysql,performance,ubuntu
I am running this version of Mysql Ver 14.14 Distrib 5.6.24, for debian-linux-gnu (x86_64) On this version of Ubuntu Distributor ID: Ubuntu Description: Ubuntu 15.04 Release: 15.04 Codename: vivid This is the config I set for Mysql: key_buffer_size = 16M max_allowed_packet = 16M thread_stack = 192K thread_cache_size = 8 innodb_buffer_pool_size=20G...

Error installing gem twitter on Ubuntu 15.04


ruby-on-rails,ruby,ubuntu,twitter
Am trying to install twitter gem on Ubuntu 15.04 and this error keeps popping up gem install twitter Building native extensions. This could take a while... ERROR: Error installing twitter: ERROR: Failed to build gem native extension. /usr/bin/ruby2.1 extconf.rb mkmf.rb can't find header files for ruby at /usr/lib/ruby/include/ruby.h extconf failed,...

Unable to connect to mariadb database server with qt 4.8.5 and Ubuntu 12.04


mysql,qt,ubuntu,mariadb
I use the following code to connect to a MySQL server database. QSqlDatabase db_Server = QSqlDatabase::database("Test"); //find mysql driver db_Server = QSqlDatabase::addDatabase("QMYSQL","Test"); db_Server.setHostName("188.**.***.***"); db_Server.setPort(3306); db_Server.setDatabaseName("Test"); db_Server.setUserName("Test"); db_Server.setPassword("*********"); bool ret = db_Server.open(); if(ret) qDebug() << "Database open" else qDebug() << db_Server.lastError().text(); Lately they changed the server to mariadb and I assumed...

How do I switch between different versions of Julia (specifically between v0.3 and v0.4 on Ubuntu)?


linux,ubuntu,ubuntu-14.04,julia-lang
I am working on some projects using Julia v0.3. However, I'd like to test my code in both v0.3 and v0.4 (since some of the people that are going to be using it are already using v0.4). I'm running Ubuntu 14.04 and have installed Julia using apt-get. I know v0.4...

Fail to build Mono.Addins with the latest Mono 4.3.0 and GTK# on Ubuntu 14.04


ubuntu,mono
Trying to build the latest Monodevelop with latest Mono. I have successfully installed Mono 4.3.0 and GTK#. As I can see, Monodevelop needs Mono.Addins installed, but when I trying to install latest Mono.Addins, it fails with next errors: Mono.Addins.Gui/AddinManagerDialog.cs(189,24): error CS0506: `Mono.Addins.Gui.AddinManagerDialog.Dispose()': cannot override inherited member `GLib.Object.Dispose()' because it is...

PHP Autoloader doesn't work on Ubuntu production server


php,ubuntu,composer-php
I have to environments i'm working developing my API (PHP based): Local development: Mac OS Yosemite - running PHP 5.5.20 Production server: Ubuntu server - running PHP 5.5.9 My code uses composer for auto loading as followed: { "require": { "facebook/php-sdk": "@stable", "everyman/neo4jphp": "dev-master", "predis/predis": "1.0.1", "aws/aws-sdk-php": "2.*" }, "autoload":...

connect to mysql database which is in ubuntu server


php,mysql,ubuntu,azure,virtual-machine
I am using below code to connect MySQL database in PHP. try { shell_exec("ssh -f -L 3307:127.0.0.1:3306 [email protected]_ip sleep 60 >> logfile"); $this->_conn = $this->dbh = new PDO('mysql:host=127.0.0.1;dbname=my_db', DB_USER, DB_PASS); $this->dbh->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); } catch (PDOException $e) { die("Couldn't connect to database. Please try again!"); } I want to direct connect...

Pretty URLs aren't working after upgrade to Mediawiki 1.24.2


.htaccess,ubuntu,mediawiki
So I am moving a Mediawiki site of mine to a new server. The version 1.20.3 worked fine on the old server running Ubuntu 12.04. However, when I copied everything over to my new server running Ubuntu 14.04 it didn't. So after messing with it for a while I decided...

Cartridge Python2.7 on OPenshift


python,django,openshift
I try to install Django 1.5 on host Openshift. I use cartridge Python 2.7. I read https://developers.openshift.com/en/python-getting-started.html. I did not understand where this code should be. virtenv = os.environ['OPENSHIFT_PYTHON_DIR'] + '/virtenv/' virtualenv = os.path.join(virtenv, 'bin/activate_this.py') try: # See: http://stackoverflow.com/questions/23418735/using-python-3-3-in-openshifts-book-example?noredirect=1#comment35908657_23418735 #execfile(virtualenv, dict(__file__=virtualenv)) # for Python v2.7...

Openshift port-forwarding [on hold]


java,git,netbeans,ssh,openshift
After many hours and many attempts, remains now your help. Im trying to do port-forwarding to access my DB in Openshift on Neatbeans. I've already done lots of tutorials, upgrade and downgrade versions of net-ssh, uninstall rhc and so on. I have read a lot git solutions (ssh_options[]...) and doesn't...

How do I make all files executable that have the file extension .cgi?


ubuntu,file-permissions
My server downloads its files from git hub to make sure they are up to date and make it easier for me to edit the files. I have set up a cron job that will update the files every few minutes. However I am having a problem as the CGI...

shell script to start conky and plank


bash,shell,ubuntu,conky
I have just started to learn shell scripting on Ubuntu and thought of writing a basic script which starts conky and plank and placing it in /usr/bin so that I can run it as a command.I did make it an executable too. #!/bin/bash echo `conky -q &` echo `plank &`...

Cannot set PHP include_path


php,ubuntu,path,include-path
I have uploaded all my files in var/www/html and in one of my php files I have this line : require_once('libraries/stripe/init.php'); the structure of my folders are list this: www -html/ -libraries -> Stripe -> init.php -register.php I keep getting this error message: Warning: require_once(libraries/Stripe/init.php): failed to open stream: No...

Openshift does not react on INTERVAL of MySQL


openshift
I have tested the table test on the locanhost and Openshift and I am facing problem that on openshift I am not getting anything back when I query the data like this WHERE arrivaltime BETWEEN curtime() - INTERVAL 2 MINUTE AND curtime() + INTERVAL 2 MINUTE although on the localhost...

JFrame wrong location with Ubuntu (Unity ?)


java,swing,ubuntu,jframe,location
It seems that there is a bug with Ubuntu (maybe only unity). The decoration of the JFrame is taken into account for getLocation() and getSize(), but not for setLocation() and setSize(). This leads to weird behaviour. For instance, if you use pack() after the frame is displayed and the dimensions...

Error execute studio.sh unrecognized vm option 'MaxPermSize=350m' on Ubuntu 14.04


ubuntu,android-studio,ubuntu-14.04
Error to Execute/Install studio.sh on Ubuntu: [email protected]:~$ cd android-studio/bin [email protected]:~/android-studio/bin$ ./studio.sh Unrecognized VM option 'MaxPermSize=350m' Error: Could not create the Java Virtual Machine. Error: A fatal exception has occurred. Program will exit. And with some knowledge after searching on search engines, I open the studio.vmoptions file in edit mode and...

how to ssh run a tail and then send data to a mysql database


linux,bash,unix,ubuntu,ssh
This code SSH's and then runs a tail command on a remote hots. I would now like to pass that tailed data into a mysql database using a local script called insertPerfmon.sh. How do I pass data generated in a ssh session into the local shell script insertPerfmon.sh. The local...

Ubuntu down load a package and all of its dependencies without installing them


ubuntu,download,package
I need to download a package and all of its dependencies without installing any of them. I'm looking for a command like apt-get -R --download-only install package-name Or any solution that would produce the same result. Based on my research I could not find a solution that produces this and...

Bash: Loop through file and read substring as argument, execute multiple instances


linux,bash,ubuntu,lftp
How it is now I currently have a script running under windows that frequently invokes recursive file trees from a list of servers. I use an AutoIt (job manager) script to execute 30 parallel instances of lftp (still windows), doing this: lftp -e "find .; exit" <serveraddr> The file used...

In ubuntu unable to write file in specified directory using java


java,ubuntu,io
While trying to write file in specified directory i am getting exception. Java code :- public void jsonToYaml(JSONObject json, String studioName) throws JSONException, org.codehaus.jettison.json.JSONException, IOException { Yaml.dump(Yaml.dump(JsonToMap.jsonToMap(json)), new File("config.yml")); BufferedReader br = new BufferedReader(new FileReader("config.yml")); String line; studioName = studioName.toLowerCase(); File writeFile = new File("sudo /var/iprotecs/idns2.0","" + studioName + ".yaml");...

Zip all subdirectories using python


python,linux,unix,ubuntu
I am attempting to create a script that zips all of the subdirectories of a folder, then deletes the folders which have now been zipped import shutil import os loc = "foldertzipfilesin" path = "/whereparentis/" + loc + "/" dirs = os.listdir( path ) for file in dirs: name =...

C++ Ubuntu select() if serial interface has data on asynchronous read


c++,multithreading,ubuntu,asynchronous,serial-port
I´m writing an asynchronous serial data reader class for Ubuntu using C++ and termios and I´m facing difficulties checking is there is data available. Here is my code: #include <iostream> #include <string> #include <sstream> #include <vector> #include <stdio.h> #include <fcntl.h> #include <unistd.h> #include <termios.h> class MySerialClass { public: MySerialClass(std::string port);...

Error installing nokogiri in ubuntu 14.0.4 (Ruby 1.8.7)


ruby,ubuntu,gem,install,nokogiri
I'm trying to install the bundle(bundle install) in Ubuntu 14.0.4 installed Ruby 1.8.7.And it fails to install the bundle and displayed the error: An error occurred while installing nokogiri (1.4.7), and Bundler cannot continue. Make sure that `gem install nokogiri -v '1.4.7'` succeeds before bundling. so now I tried to...

How to redirect standard output to a file — what's wrong with this code?


c,linux,ubuntu
I'm using a C program on my raspberry pi2 with a 433mhz receiver to read codes that are transmitted. This program sniffing 433mhz codes. To run it, I use the following command: sudo ./RFSniffer and if a code is found, the program displays in the console something like : Received...