When trying to start my meteor application through passenger, I am recieivng the following error;
The Phusion Passenger application server tried to start the web >application, but Passenger encountered an internal error while performing >preparation work.
Error details:
Error parsing /var/www/timportDB/bundle/Passengerfile.json: * Line 9, Column 16
Missing '}' or object member name
in 'Passenger::AppLocalConfig Passenger::parseAppLocalConfigFile(Passenger::StaticString)' (AppLocalConfigFileUtils.h:102)
in 'void Passenger::SpawningKit::Spawner::setConfigFromAppPoolOptions(Passenger::SpawningKit::Config*, Passenger::Json::Value&, const AppPoolOptions&)' (Spawner.h:83)
in 'virtual Passenger::SpawningKit::Result Passenger::SpawningKit::DirectSpawner::spawn(const AppPoolOptions&)' (DirectSpawner.h:242)
in 'void Passenger::ApplicationPool2::Group::spawnThreadRealMain(const SpawnerPtr&, const Passenger::ApplicationPool2::Options&, unsigned int)' (SpawningAndRestarting.cpp:95)
Originally it seemed to be related to where I set the envvars, however I have commented them out and set them using command line variables rather then the settings file.
These variables are ```--envvar MONGO_URL=mondgodb://localhost:27017/timportDB --envar ROOT_URL=http://timportDB
According to the passenger guide the program should be run with sudo passenger start
The program is being run on Ubuntu 18.04.03.LTS. I am using the standalone version of Passenger
This is my Passengerfile.json;
{
// Tell Passenger that this is a Meteor app.
"app_type": "node",
"startup_file": "main.js",
// Store log and PID file in parent directory
"log_file": "../passenger.log",
"pid_file": "../passenger.pid"
// Run the app in a production environment. The default value is "development".
"environment": "production",
// Run Passenger on port 80, the standard HTTP port.
"port": 80,
// Tell Passenger to daemonize into the background.
"daemonize": true,
// Tell Passenger to run the app as the given user. Only has effect
// if Passenger was started with root privileges.
"user": "timportdb",
//better errors
"friendly_error_pages":true
// "envvars": {"MONGO_URL": "mongodb://localhost:27017/timportDB", "ROOT_URL": "http://timportDB",}
}
When the program starts I should be able to access my web app at 0.0.0.0:80, or (Assuming DNS has been set correctly) at 'http://timportDB'.
Welcome to Stack Overflow.
This is a rookie problem (no offence intended)
The json file format does not allow any kind of comments, it is a data only format.
So to fix this, delete all lines beginning with //
Related
I've been trying to deploy a meteor app to Digital Ocean. I've configured mup.js like this:
module.exports = {
servers: {
one: {
host: '[droplet ip address]',
username: '[username]',
password: '[password]'
}
},
// Install MongoDB on the server. Does not destroy the local MongoDB on future setups
"setupMongo": true,
// WARNING: Node.js is required! Only skip if you already have Node.js installed on server.
"setupNode": true,
// WARNING: nodeVersion defaults to 0.10.36 if omitted. Do not use v, just the version number.
"nodeVersion": "0.10.36",
// Install PhantomJS on the server
"setupPhantom": true,
// Application name (no spaces).
"appName": "pichaprint",
// Location of app (local directory). This can reference '~' as the users home directory.
// i.e., "app": "~/Meteor/my-app",
// This is the same as the line below.
"app": ".",
// Configure environment
// ROOT_URL must be set to https://YOURDOMAIN.com when using the spiderable package & force SSL
// your NGINX proxy or Cloudflare. When using just Meteor on SSL without spiderable this is not necessary
"env": {
"PORT": 80,
"ROOT_URL": "http://pichaprint.com",
},
"deployCheckWaitTime": 15
};
When I try to run mup setup, I get the following error:
error: no configs found for meteor
I'm currently working live by using PuTTY and I'm within the meteor project folder which contains the mup.js file (that's the reason the app property value is a period). What could I be doing wrong?
It turns out that even though I initialized mup by entering mup init, it did not actually generate a mup.json. So I had to create that manually by entering the following command: cat > mup.json in the root of my project folder
I'm trying to send multiple nginx logs to loggly...
Config file: /etc/rsyslog.d/21-nginx.conf
$ModLoad imfile
#$InputFilePollInterval 10
$InputFileMode inotify
$WorkDirectory /var/spool/rsyslog
$PrivDropToGroup adm
# nginx access file:
$InputFileName /var/log/nginx/*access.log
$InputFileTag nginx-access:
$InputFileStateFile stat-nginx-access
$InputFileSeverity info
$InputFilePersistStateInterval 20000
$InputRunFileMonitor
# other stuff continues......
after restart i get this error in log syslog:
imfile: The to-be-monitored file "/var/log/nginx/*access.log" contains wildcards. This is not supported in polling mode. [v8.16.0 try http://www.rsyslog.com/e/2420 ]
activation of module imfile failed [v8.16.0 try http://www.rsyslog.com/e/-3 ]
did i make something wrong?
Are there other places in your rsyslog configuration where the file mode is changed to pulling or the file poll interval is active? The problem with using this kind of legacy syntax is that all the configuration is loaded globally, so things in other configuration files can interact. You might consider using the new action syntax so that the inotify mode is applied to the specific source. You can see an example of it here http://www.rsyslog.com/doc/v8-stable/configuration/modules/imfile.html
As part of our chef infrastructure I'm trying to set up and configure a berks-api server. I have created an Ubuntu server in azure and i have bootstrapped it and it appears as a node in my chef-server.
I have followed the instructions at github - bekshelf-api installation to install the berks-api via a cookbook. I have run
sudo chef-client
on my node and the cookbook appears to have been run successfully.
The problem is that the berks-api doesn't appear to run. My Linux terminology isn't great so sorry if I'm making mistakes in what I say but it appears as if the berks-api service isn't able to run. If I navigate to /etc/service/berks-api and run this command
sudo berks-api
I get this error
I, [2015-07-23T11:56:37.490075 #16643] INFO -- : Cache manager starting...
I, [2015-07-23T11:56:37.491006 #16643] INFO -- : Cache Builder starting...
E, [2015-07-23T11:56:37.493137 #16643] ERROR -- : Actor crashed!
Errno::EACCES: Permission denied # rb_sysopen - /etc/chef/client.pem
/opt/berkshelf-api/v2.1.1/vendor/bundle/ruby/2.1.0/gems/ridley-4.1.2/lib/ridley/client.rb:144:in `read'
/opt/berkshelf-api/v2.1.1/vendor/bundle/ruby/2.1.0/gems/ridley-4.1.2/lib/ridley/client.rb:144:in `initialize'
If anyone could help me figure out what is going on, I'd really appreciate it. If you need to explain the setup any more let me know.
It turns out I misunderstood the configuration of the berks-api. I needed to get a new private key for my client (berkshelf) from manage.chef.io for our organization. I then needed to upload the new key (berkshelf.pem) to /etc/berkshelf/api-server and reconfigure the berks-api to use the new key. so my config for the berks-api now looks like below:
{
"home_path":"/etc/berkshelf/api-server",
"endpoints":[
{
"type":"chef_server",
"options":
{
"url":"https://api.opscode.com/organizations/my-organization",
"client_key":"/etc/berkshelf/api-server/berkshelf.pem",
"client_name":"berkshelf"
}
}
],
"build_interval":5.0
}
I couldn't upload berkshelf.pem directly to the target location, i had to upload it to my home location, then copy it from within linux.
Having done this, the service starts and works perfectly.
What am I doing wrong? I'm trying to deploy my Telescope app. I'm using this to do that: https://github.com/arunoda/meteor-up. It gives me an error when I try to deploy using Mup. Here's my mup.json config file:
{
// Server authentication info
"servers": [
{
"host": "52.25.228.14",
"username": "ec2-user",
//"password": "password"
// or pem file (ssh based authentication)
"pem": "~/Documents/appname/appname.pem"
}
],
// Install MongoDB in the server, does not destroy local MongoDB on future setup
"setupMongo": true,
// WARNING: Node.js is required! Only skip if you already have Node.js installed on server.
"setupNode": true,
// WARNING: If nodeVersion omitted will setup 0.10.36 by default. Do not use v, only version number.
"nodeVersion": "0.10.36",
// Install PhantomJS in the server
"setupPhantom": true,
// Show a progress bar during the upload of the bundle to the server.
// Might cause an error in some rare cases if set to true, for instance in Shippable CI
"enableUploadProgressBar": true,
// Application name (No spaces)
"appName": "appname",
// Location of app (local directory)
"app": "~/Documents/appname/Telescope",
// Configure environment
"env": {
"ROOT_URL": "ec2-52-25-228-14.us-west-2.compute.amazonaws.com"
},
// Meteor Up checks if the app comes online just after the deployment
// before mup checks that, it will wait for no. of seconds configured below
"deployCheckWaitTime": 15
}
Common pitfalls :
Are sure you ran mup setup before deploying ?
Try using a relative path to setup the app location, ie replace ~/Documents/appname/Telescope by . if your mup.json is located at the root of your Telescope instance.
I did run mup setup, did use http://, and tried many times to get it to connect/deploy.
I gave up and just went with a Wordpress theme and am customizing it how I want it. The other way was way too complicated. It didn't allow me to do what I wanted in a timely manner. Thanks for trying to help though guys.
I'm using Meteor's built-in hosting for staging, with Codeship handling the continuous deployment. All tests and notifications succeed as expected in Codeship, but nothing is getting deployed.
My script:
expect -c "set timeout 60; spawn meteor deploy staging.myapp.com; expect “Email:” { send $METEOR_DEPLOY_EMAIL\r; expect eof } expect "Password:" { send $METEOR_DEPLOY_PASSWORD\r; expect eof }"
When that script runs during the build process I see the following:
spawn meteor deploy staging.myapp.com
=> Running Meteor from a checkout -- overrides project version (0.8.1)
To instantly deploy your app on a free testing server, just enter your
email address!
ail:
The ail: isn't a typo...that's what Codeship displays. It appears it eventually times out and moves on, though no errors are shown.
First time setting up a CI server (and using Expect), so thanks in advance for the help!
Figured it out...had two syntax issues:
Left/right double quotation marks snuck in there (instead of
standard quotation mark)
Missing semicolon
So, for anyone looking for a script to deploy to *.meteor.com using Codeship, here is the working script:
expect -c "set timeout 60; spawn meteor deploy example.com; expect "Email:" { send $METEOR_DEPLOY_EMAIL\r; expect eof }; expect "Password:" { send $METEOR_DEPLOY_PASSWORD\r; expect eof }"