Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 8 years ago.
Improve this question
I have a server with centos running rails application each time when I reboot my system I have doing following tasks manually. How to enable all the following tasks in start up
To stop and start my nginx I am using
sudo fuser -k 80/tcp # to stop
sudo /opt/nginx/sbin/nginx # to start
And to start my postgresql I am using following command
service postgresql-9.2 start/stop/restart
Once I connect my server using ssh and try some postgresql command ill get error as
postgresql-9.2: unrecognized service
To avoid this am using command
export PATH=/usr/pgsql-9.2/bin:$PATH
And then ill use postgresql(Doing export command each time when I connect through ssh).
And I am using ghost blog facing same issue whenever I reboot my server I need to run following command to start my ghost blog
NODE_ENV=production forever start index.js
How to solve all these. Can any one help
You can add the process in your init script that is at /etc/init.d/
.You can further read run script on startup
Related
Closed. This question is not about programming or software development. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 6 months ago.
Improve this question
I can't get Docker to start on my Mac (Intel). It's just stuck in Docker Desktop starting...
Here are the things I have tried:
Running with the desktop installer
Running with the brew installer (brew install --cask docker)
In the debug menu:
Clean /Purge data
Reset to factory defaults
Trying to run docker ps in terminal shows:
Error response from daemon: dial unix docker.raw.sock: connect: no such file or directory
If I quit docker, the com.docker.vmnetd process needs to be killed manually.
This problem started around version 4.5.0 Now I am on version 4.12.0., and still the same issue. If I downgrade to a version far back (with the previous UI), it works. But after a while, Docker forces itself to update, which puts me back in this same problem.
Does anyone have any clue what I can try?
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 9 years ago.
Improve this question
This isn't exactly a production deployment of rails, or I'd go the standard Passenger route - I simply want it to start on port 3003 and sit there.
I'm running the following .sh script from rc.local
source /usr/local/rvm/scripts/rvm
/usr/local/rvm/rubies/ruby-2.0.0-p247/bin/ruby /root/rails_app/script/rails server -d --port 3003
I seem to recall the first line is required by rvm to enable ruby\rails commands in the shell. Unfortunately, this doesn't seem to do the trick.
I'm having a hard time diagnosing the issue.
Is there a way to see the error log of scripts that are executed via rc.local?
you can not source RVM in sh shell, you need to use a wrapper:
/usr/local/rvm/wrappers/ruby-2.0.0-p247/ruby \
/root/rails_app/script/rails server -d --port 3003
you can find more information about it here - http://rvm.io/integration/init-d
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 9 years ago.
Improve this question
When I launch it with sudo /etc/init.d/dse start it seems to work. It returns:
Starting DSE daemon dse
DSE daemon starting with Hadoop and Solr disabled (edit /etc/default/dse to enable)
But when I try to connect to the tutorial "Test Cluster" (so localhost) with opscenter (on a distant machine but with port 8888 shared), I got this error:
Error creating cluster: Unable to connect to cluster
And if I check the health of dse with sudo /etc/init.d/dse status: I got:
dse dead but pid file exists
Original post:
The console or /var/log/cassandra/output.log will likely contain something like this (where nodename1 is whatever you named your node):
Error: Exception thrown by the agent : java.net.MalformedURLException: Local host name unknown: java.net.UnknownHostException: nodename1: nodename1
Same as problem on starting cassandra, basically you need to make sure that the hostname you are using can be resolved (by putting it into /etc/hosts).
Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
I installed Jenkins yesterday (together with apache2). Jenkins started fine and everything was ok. Then I decided to stop jenkins and apache because I planned to configure them today. Now when I start Jenkins i get this error:
Jenkins startup error
I have tried some other Ports like 8081 or 4xxxx, nothing helped.
How can i fix this? Please help.
System:
Debian 6.0
Installation of Jenkins through the offical repo.
Apache has no vhosts except the 000-default
netstat shows nothing on 8080 or the 4xxxx Port
The problem is quite easy to pin:
Caused by: java.net.BindException: Address already in use
This means that for the given address:port there is already a process which is binding to it. Please, use the operating system tools to find this process and, eventually, kill it. Then start Jenkins again.
Additionally, I can add, that it almost certainly Jenkins, which was not stopped correctly or, due to some error, did not stopped entirely.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 9 years ago.
Improve this question
I'm trying to install Ruby on Rails and I was using SSH to login to the linux machine, when I started working, everything was fine and I'm sure there was a mistake I made where the file/directory permissions changed.
Now when I try to send a command like:
sudo apt-get install rubygems
I get this error:
sudo: can't open /etc/sudoers: Permission denied
Not sure what to do next, what options do I have. I can login as root user as well but I don't want to dig a deeper hole for myself.
The linux machine is running on Ubuntu 10.04.
Try this:
chmod -R 0440 /etc/sudoers.d
may be you changed the permissions by mistake.
Have you checked whether the file /etc/sudoers exists or whether the permissions have changes ?
This question may be better suited to the Linux/Ubuntu (or whatever flavour of Linux you have).
See: https://stackoverflow.com/questions/tagged/ubuntu