debian8 not response after restart/stop/start - linux

few months ago I got access to a VPS with installed Debian 8 Jessie.
The strange thing for me was that after perform some action (like service [stop|start|restart], debian not notify me (ex: Restarting nginx: nginx, like old debian 7 wheezy).
Yesterday, i installed on my virtual machine Debian 8 Jessie, but the "bug" persists.
Should I install something extra library, or to set up them?
Thanks in advance.

Debian uses systemd now.
systemctl start example1
Investigate why systemd hangs on startup or on reboot/shutdown.
Increase verbosity via cmdline: Add "systemd.log_target=kmsg systemd.log_level=debug"
[ /etc/default/grub ]
GRUB_CMDLINE_LINUX="systemd.log_target=kmsg systemd.log_level=debug" <--- Add here (by uncommenting you can easily switch to debug)
# update-grub

Systemd is not as verbose as the old SysV scripts, so your described "bug" is intended behaviour.
The old commands, like "service" are just simple symlinks / script which delegate the work to systemd.
As far as I know this is the same for the /etc/init.d scripts.

Related

WildFly init.d scripts for SUSE Linux

I want to start and stop WildFly 15 on Linux SUSE 11 together with the machine. I'm not expert in Linux and this is my first experience with SUSE. I found WildFly comes with init.d scripts for 2 Linux distributions: Debian and Red Hat.
docs/contrib/scripts/init.d/wildfly-init-debian.sh
docs/contrib/scripts/init.d/wildfly-init-redhat.sh
I found that in older versions of JBoss there was a SUSE script (jboss_init_suse.sh).
Why is not there a SUSE script in newer WildFly releases? Is there an easy way to create them from the other ones?
SUSE uses systemd. Use the scripts and in docs/contrib/scripts/systemd to get started. The README goes into details. Newer Ubuntu and Debian environments also use systemd.
And as it has bit me multiple times - do not forget the very last line in the README - it enables it for reboot. I tend to start Wildfly and then forget to enable the service and on the first reboot I wonder what happened.

When “vagrant up” it says “It appears your machine doesn't support NFS” (Debian jessie)

Issue
when vagrant up it says "It appears your machine doesn't support NFS"
Setups
Debian GNU/Linux 8 (jessie)
Vagrant 1:2.0.0
Virtualbox 5.1.30 r118389
Detail
After using apt-get to update and upgrade the system, I basically followed the instruction from the Mediawiki page, since I wanted to install Mathoid to render LaTeX equations locally for mediawiki page.
However, when I vagrant up it echos the following:
It appears your machine doesn't support NFS, or there is not an
adapter to enable NFS on this machine for Vagrant. Please verify
that `nfsd` is installed on your machine, and try again. If you're
on Windows, NFS isn't supported. If the problem persists, please
contact Vagrant support.
I checked if nfsd is correctly working on the host, and it says it's enabled.
# /etc/init.d/nfs-kernel-server status
nfs-kernel-server.service - LSB: Kernel NFS server support
Loaded: loaded (/etc/init.d/nfs-kernel-server)
Active: active (running) since Sun 2017-10-15 07:56:32 -02; 2 weeks 0 days ago
CGroup: /system.slice/nfs-kernel-server.service
??1277 /usr/sbin/rpc.mountd --manage-gids
I also tried google, and did not find a solution that fits my problem and I couldn't find any hint to resolve this. For instance, I tried to install the package
sudo apt-get install nfs-common
But it has been already installed.
Thank you in advance.
The command mentioned below works for linux mint 18.3:
sudo apt-get install nfs-common nfs-kernel-server
For Windows users seeing that error, run the following command to add support for NFS for Vagrant:
vagrant plugin install vagrant-winnfsd
The GitHub repo for this plugin is found here.
Also, to see the currently installed Vagrant plugins run this:
vagrant plugin list
Can be fixed by adding any exports to /etc/exports.
by :
modprobe nfs
modprobe nfsd
then running vagrant, which will add /etc/exports, then reloading
kernel-server and restarting vagrant.
issue http://jb-blog.readthedocs.io/en/latest/posts/0021-vagrant-nfs-problems.html
instead of installed NFS cos really no supported :
Try just removing type: nfs from the vagrant_synced_folders
More : https://www.vagrantup.com/docs/synced-folders/nfs.html

How can I make a program to run as service in Linux

Thanks for looking into my question.
I am running tomcat as windows service in windows machine. how can I achieve the same on linux machines.
it should start automatically after reboot.
Thanks,
R Dama.
If you install Tomcat from a Linux distribution package, it will usually include an init script which will start it as a daemon via a start stop script. You can create a script for it manually otherwise. See https://www.linux.com/learn/managing-linux-daemons-init-scripts

Using manual STAF commands on Linux

I've recently started working with STAF and couldn't get 2 machines to communicate with each other. One of those machines is a Linux ec2-instance on AWS and can't be pinged.
I was planning on pinging STAF from one virtual machine to another to see if the company firewall could be the cause of this but I can't seem to use commands on linux (like "staf local ping ping" on windows for example). When I try to run STAFProc with gdb (in /usr/local/staf/bin) I get the following error.
(gdb) run
Starting program: /usr/local/staf/bin/STAFProc
/bin/bash: /usr/local/staf/bin/STAFProc: No such file or directory
(The STAFProc file is there though. Does gdb work from another directory?)
I'm not exactly experienced with STAF, AWS or even Linux so any help to get me started with debugging would be greatly appreciated.
Though it is a bit long since the question is asked and the op seem to figure it out already, I might still post my solution as well.
There is a possibility that it is caused by trying to open a 32bit binary on a 64bit device.
If you are working on Debian based os, try
sudo apt-get install lib32stdc++6

Meteor for Linux using Windows 10 Linux bash shell

Context:
I've read Meteor is developed differently for Windows and Linux (as expected), and while it works on Windows, on Linux it has some features that allow faster building times (among other benefits).
Since those building times are becoming increasingly important as I invest more time on Meteor, I am considering trying Meteor for Linux and see if I can improve my productivity.
Actual question:
Can I install Meteor for Linux using the Windows 10 Linux Bash Shell and obtain the benefits of Meteor for Linux inside Windows?
A little late to answer this, but I am running Windows 10 with the WSL (Ubuntu) and was able to install Meteor via
$ # this will take a few minutes
$ curl -sL https://install.meteor.com | bash -
When I run meteor run it hits an error along the lines of
Unexpected mongo exit code null. Restarting.
So my solution is to run an alternative Mongo database in the background
$ apt-get install mongodb-server
$ mongod # assumes you've created /data/db and have ownership
$ export MONGO_URL=mongodb://127.0.0.1:27017
$ meteor run
I don't think you can do that. You can install a Virtual Machine using VMware that can run Ubuntu or similar. If you are not an expert in setting up vm's, this could take you some time.
A friend of mine uses Windows to develop meteor apps, and he hasn't complained of performance. He's definitely not envious of my Mac set up.
Before you go setting up another environment, I would try it and see if it's painful or not. Probably more the issue is how much RAM you have, anything less than 4GB, Meteor may struggle, so simply adding memory might help and save you a bunch of work
NO need virtual machine!
You need to install "xming" on windows and run xming
https://sourceforge.net/projects/xming/
write in bash shell "DISPLAY=:0 [APPNAME]"
DISPLAY=:0 firefox
or write
export DISPLAY=:0
firefox

Resources