I am trying to deploy one of my applications on dotcloud. However, I keep getting:
uWSGI Error
wsgi application not found
Somebody could hint at some useful docs where this issue is discussed? My application is here:
https://github.com/kfk/datacrowd
and I do think everything is done by the tutorials.
Not sure if you looked at this page or not, but it is a good resource for deploying flask apps onto dotCloud. http://flask.pocoo.org/snippets/48/
Looking at your application, it looks like most things are setup correctly the only thing that looks a little odd is your wsgi.py file.
Have you tried to change your wsgi.py file so that it looks like this.
import sys
sys.path.append('/home/dotcloud/current')
from datacrowd.app import app as application
application.config.update(DEBUG=True)
basically I removed the if statement at the end. Try that and see if it helps at all.
If not, try commenting out the application.config.update(DEBUG=True) line and see if that helps as well.
oh yeah one more thing, it looks like you have a static file instead of a static directory, not sure if you did that on purpose or not, but usually static is a directory where you put your static media, so that is most likely suppose to be symlink to datacrowd/static
Update:
Since you had the same error, then it is most likely something wrong with your application.
ssh into your service.
$ dotcloud ssh <app.service>
And then look at your logs in /var/log/supervisor/uwsgi.log, you will most likely see a syntax error, and a stack trace, telling you where the error is.
Common issues are usually
dependencies not being installed
Using features from a new version of python. (python 2.7, 3.x, features) when the python version on dotCloud is only 2.6.x.
syntax typos (indent issues, etc)
Related
I'm trying out MassTransit. I wrote a small console application as showed in documentation (http://docs.masstransit-project.com/en/latest/configuration/quickstart.html).
What I first ran the app, it opened another console windows, and did something that looked like an installation proccess, or some kind of file copy. I remember seeing something done in the windows directory, but it was too fast to read and understand what exactly it did.
I couldn't find any information about it. I tried starting a new .NET project and running the same code - it did not repeat.
Does MassTransit install something on the system at first run? does someone knows what exactly happens on first tun?
Thanks
I've written a post explaining how to get a quick hello world Mass Transit application up and running.
It uses RabbitMQ, but the same principles apply to MSMQ.
http://nodogmablog.bryanhogan.net/2015/04/mass-transit-with-rabbitmq-hello-world/
If you included the call to the method VerifyMsmqConfiguration() as in the quick start, then MassTransit initates any required MSMQ component installation.
The required MSMQ components are Core, LocalStorage, and Multicast.
I'm trying to mimic some basic functionality of the Todos example. After reading spinejs.com, many articles, and taking a few attempts and not getting off the ground, I do need to ask and get some help here. I wish this was more clear-cut, and I'd like to help others as well. I'm on Windows7 and I'm using spine.app to create my app, controllers, models - also using jQuery.tmpl
I'm using CS, but pretty new to it.
I'm not really sure where I need to use require (if at all) - I'm using an modules.exports = .... statement on all M, C
so index.coffee should be able to find, I assume
Maybe this is not the case - I see even though controllers/contacts used a modules.exports statement, the index still used a require.
Is index.coffee just particular about visibility ?
I see Contacts uses Contact without any require statement.
I've seen the main.App Controller be instantiated, from CS, as in Todos
or in the jQuery() script in the html, as in Contacts.
I'm assuming you should either
-build the whole thing and include application.js OR
-use the jQuery() function to create your App via javascript.
If this does compile, will it end up in public/application.js ??
I'm getting a nasty parse error,
and yes, I'm aware you consistently have to use spaces (no tabs)
That being out of the way, I'm getting hung up on the 1st require line
require('lib/setup')
Am I going to need some Cygwin stuff ? I can get it if it helps.
and I've seen the Google Groups, guillaume86's comments, contrib and CS irc channel.
I'm not sure what (date) version of hem I have
but I did try the minify: false, option and a few other things, to try to debug this.
The good news: I'm pretty stubborn and will get this to work, if I can get a little help here.
More to come, but I'm going to close at this point.
Thanks in advance for your suggestions.
I don't think this will help the OP too much, but thought I'd write this up to help anyone else who is looking to get started with these awesome tools.
Before you go further: I've rewritten this with updates at How to manage client-side JavaScript dependencies?
Here's a basic list for getting set up with a Spine, hem, coffeescript app. I only develop on Linux, so I'm not sure if some of these steps would have problems on windows, namely npm commands. Should work fine on Mac; I know other who use the same toolchain.
Install NPM: curl http://npmjs.org/install.sh | sh on a *nix system. I'll assume it's available from the command line.
npm install -g spine.app will make spine available as a global command
spine app folder will make a Spine project called app in folder, generating the right directory structure and a bunch of skeleton files to get started.
cd to folder and edit dependencies.json for the libraries you need. Add them to slug.json so that hem knows where to find them as well. You can install hem globally (npm install -g hem) or locally, as in the next step.
npm install . to download all the dependencies you just entered in, including hem.
If you take a look at the default spine config, there is a app/lib/setup.coffee where you require all the libraries you need from your dependencies. Examples:
# Spine.app had these as dependencies by default
require('json2ify')
require('es5-shimify')
require('jqueryify')
require('spine')
require('spine/lib/local')
require('spine/lib/ajax')
require('spine/lib/manager')
require('spine/lib/route')
# d3 was installed via dependencies.json
require 'd3/d3.v2'
In index.coffee, you just require lib/setup and load the main controller for your app. In addition, you need to require any other classes in those other controllers.
The default generated index.html will usually be fine for loading your app, but modify as necessary.
From folder, run node_modules/hem/bin/hem server to start a hem server, and navigate to localhost:9294 to see your app. If you installed hem globally (npm install -g hem), then hem server by itself may work, but sometimes it gets confused about the path.
Build the rest of your app using proper MVC techniques, and use stylus for CSS and eco for views.
One more thing: normally, hem server will update automatically as you update your code and save files, which makes it a cinch to debug. Running hem build will compile your app into two files, application.js, which is minified and application.css. If you run hem server after this, it will use those files and no longer update automatically. So don't hem build until you actually need a minified version of your app for deployment.
See this other thread about that: Spine.js & hem getting started
Windows is supported (there were concerns in the past, but they have been resolved). There is actually a branch of hem that being more actively developed, since the original branch is no longer being maintained by the developer. You can check out branches version0_2 or version0_3 which have been getting updates and may eventually get windows support.
HTH.
So I am attempting to modify an application written by another programmer. The program is written in Perl and apparently uses the Catalyst framework neither of which I have any experience with.
The code is well documented and my modifications seem pretty straightforward however when I try to change something (in the the controllers to be specific) the same to take no effect. Am I missing a step? I open the file edit it, save it, and try to load the web app in my browser. I've even deleted the entire contents of one of the controllers to see if it would break the application and it did not.
Please Help.
Thanks,
Ken
If the application was set-up in a sane way (using uri_for(_action) in templates and not specifically relying on the server/env/etc) you should be developing with the dev server. There are some practices that can make this difficult:impossible without modifications. This is all you should have to do–
cd {APPLICATION DIRECTORY}
# Read about it-
perldoc script/*_server.pl
# Run it-
script/*_server.pl -r -d
Unless there is something wonky in the setup, you’ll get http://localhost:3000/ running with your app.
Or, what is probably a good idea, run the application as the webuser in your apache setup. If there are files or access expected to be for that user, it might be important (e.g., if session or cache files are used and restricted to the user)–
sudo -u www script/*_server.pl -r -d
The flags turn on debugging output and the restarter so that every time you change files in the application, the server will restart automatically (if it compiles).
Catalyst is a joy to develop with and the dev server is part of why.
I'm kinda puzzled how does a unix path looks like. I have followed an example to write a simple fileuploader using GWT. But the guide was written with Windows in mind. Say if I have C drive. In windows I would told the program to save the files to C:\save_here\
But in unix, I'm using ubuntu, there are no C drives or other drives with a single letter representation. So I wonder what do I write instead? I'm getting error 500 all the time now. And I can't figure out how the path should be.
The guide I've been following is found here
EDIT
It was not some problem duo to the path. Still need help though with fixing this problem. I basically followed the steps in the url I posted on this question.
unix paths start at a common root , denoted / and separates directories with a /
e.g. /home/starcom might be your home directory. So create a new directory, mkdir /home/starcom/uploaded and use that as the path. Or for testing you could perhaps just use /tmp
You can get more info here
When you get a 500 return code, that means the server encountered an error. This means that you should see an error message from the server somewhere. If you're running from Eclipse, you'll see the error on the Console tab. If you're running Tomcat, look for those logs.
You want to find the error message, since it'll probably explain what went wrong.
I have a small Sinatra app I'm running on a shared hosting account using Passenger. However, the first time the app is accessed after a while, I get a Passenger error page saying the application could not be started. Usually because Sinatra could not be found.
I am assuming this is just a normal delay from when a new instance is spawned. However, is there a way to delay trying to load Siantra until it Passenger has fully loaded?
I seem to have solved the issue by setting the GEMS_PATH environment variable in the .htaccess file. I haven't encountered the error again. YET!
I took this up with Dreamhost support recently (not a great experience) and eventually they recommended freezing the gems into the application. This is at best a partial solution, because it seems to work for some gems and not for others.
Instead of
require 'sinatra'
I have:
require 'vendor/gems/sinatra-0.9.4/lib/sinatra'
Freezing gems is covered elsewhere, but briefly: to prepare for this, one needs to do
mkdir vendor/gems
cd vendor/gems
gem unpack sinatra
As a result of this change, I never get the startup failure screen quoting sinatra as the file it can't load. However, I still get it for some other gems which require themselves or parts of other gems. Not too clear about the details, but I'm working on the idea of hacking the installed gems to make every "require" use a path directly out of my "vendor" library.
I think you may need to add Gem.clear_paths! in there
I had a similar problem a long time ago. Updating to a newer Sinatra gem helped me - what version are you running?