AEM Stop command not working for Publish instance - aem

I have AEM instance setup on a AWS Ubuntu machine. Not sure why stop command not working for publish instance. It is working fine for author instance. We have configured it on changed port(5054). Can anyone suggest if I am missing anything? Here is the screen shot showing the error message while running the stop command:

You cannot stop an AEM instance with the stop script if you did not start it with the start script.
If you look at the scripts you'll see that:
start script creates a file conf/cq.pid that has the java PID
stop script looks for that file and tries to stop the instance then deletes the file.
Thus, if you did not start with start script, you cannot stop with stop script.

Related

A JavaScript error occured in the main process : Compass

When I started mongoDB client application Compass 1.13.1, I get the error like:
How I can solve it? Same issue was here.
Solution that worked for me:
Go to task manager
Kill the process called: "The MongoDB GUI"
Stuck?
open app -> get error -> no reboot ->
task manager -> "The MongoDB GUI" or "MongoDBCompassCommunity" -> kill process
Prevention?
Never quit the app using native close methods ("X" button / "Close window")
Always quit via Connect -> Quit (Ctrl+Q)
No need to disconnect first. It is just badly done electron app.
Answer based on solution from #Senne Verhaegen
Here's some additional ways how to solve:
From \AppData\Local\MongoDBCompass\app-1.13.1\resources delete the file named as app.asar, before it copy somewhere (in my case was desktop). Then paste file app.asar to this path again \AppData\Local\MongoDBCompass\app-1.13.1\resources and rerun Compass.
Restart Windows and try to run again Compass.
If nothing helps, reinstall the application (another version, for instance).
I got this error because I closed the app without disconnecting. I tried to start up the program and received the error. I waited about 30 seconds and then, surprise! Compass popped up and is running - even though the error showed. It must have cleaned itself up. I am using MongoDB Compass 4.0.3 Enterprise.
The problem is that the process "The MongoDB GUI" is still running after the application is closed.
Since I'm a very lazy person to open the Task Manager everytime this happens, I created a batch file with the following content:
#ECHO OFF
taskkill /f /im MongoDBCompass.exe
%LOCALAPPDATA%\MongoDBCompass\MongoDBCompass.exe
exit
I saved this file on the same directory of MongoDBCompass.exe, which can be easily found by checking the properties of your MongoDBCompass shortcut.
I overrided the Target to use that .bat instead of the default .exe and just said to it Run as administrator, never had problems again.
I recommend installing a recent version of Compass. This problem has been fixed in 1.17.
Solution that worked for me:
Go to task manager
Kill the process called: "Error". It will have a mongodb icon

.exe Program Run Automation in Windows 2012

I have a Exe program which run fines and update the log when I run it manually or create a batch script run the .bat file (By double click/call from CMD prompt).
When I am trying to automate this process by creating scheduled task/ creating a service it don't work.
In Windows 2012 Srvany.exe also dont work so i am not able to create a service , even though I create a service using SC Create command the service fails to run in windows 2012.
I got the answer- This was happening as My Program was not running at Interactive mode,As per Microsoft a task runs at Interactive mode when "Run when User logged on" option is chosen, if we choose other option the program will not run at interactive mode.
https://technet.microsoft.com/en-us/library/cc722152.aspx

How to run standard command-line command inside Laravel console command

I need to run an rsync command from inside a Laravel 5.2 console command, this may seem pretty obvious, but how can I do that?
The idea is to connect to one of my servers and get a copy of a directory and save it locally in my laravel storage directory.
I want it on a console command because I want to schedule it to run daily.
Thanks to the guys over at Laracasts, there was a simple solutions to this.
You just put the command inside exec() function.
https://laracasts.com/discuss/channels/laravel/how-to-run-an-rsync-command-inside-a-laravel-console-command

Can't run "meteor mongo" on Meteor in Windows (latest meteor for windows exe bootstrapper)

I am trying to run a meteor app for the first time on Windows( using Windows 7 in particular). I am able to successfully run the app but i can't seem to be able to run the command meteor mongo in a separate command prompt window. The following error pops up:
mongo: Meteor isn't running.
This command only works while Meteor is locally. Start your
application first.
I have already tried meteor reset. How can i fix this?
I think there is possible a misconception about what the meteor mongo command does.
It only connects to the mongo instance of a running meteor development process.
So you need to start the meteor app by changing to your app's directory and running 'meteor'. Then on a different console window, change you the same directory and run 'meteor mongo'.
In the image below, when meteor isn't running I get the error you get, but you will note that it says that you have to start your application first. If you do that, and then in another console window it works:
Try one of these admin UIs for mongo instead. They connect directly to the db, so should overcome whatever problem there is with command line.
Alternatively, you may try a non-standard command line utility, like Cygwin.

jbooss with RUNASIS option

I am starting the jboss_3.2.7 with the linux user jbs using jboss with RUNASIS option, but it is not working while the entire system[linux] restart. Which is starting the jboss as root user.
I added the jboss service in chkconfig option of linux for starting the jboss on linux restart.
In the jboss service file (/etc/init.d) modified the user to RUNASIS
define the user under which jboss will run, or use RUNASIS to run as the current user
JBOSSUS=${JBOSSUS:-"RUNASIS"}
You are using quite old JBoss version and I personally never see it. But I think it should be very similar to newer ones.
Please try to put your user after when defining these variable:
JBOSSUS=jbs
The other solution is to setting these variable before executing running script:
export JBOSSUS=jbs; /etc/init.d/jboss start
Update
I have just downloaded JBoss 3.2.7 and I checked the jboss_init_redhat.sh script (I hope you use these one as a templete for your starting script).
In the file jboss_init_redhat.sh you can find such lines:
#define the user under which jboss will run, or use RUNASIS
#to run as the current user
JBOSSUS=${JBOSSUS:-"jboss"}
These line defines the new user name. It checks if the variable JBOSSUS is set up and if not is uses jboss user as default name.
The second interesting part of these script:
if [ "$JBOSSUS" = "RUNASIS" ]; then
SUBIT=""
else
SUBIT="su - $JBOSSUS -c "
fi
You should know one thing: when you run automatically any script from init scripts it is always run as a root user. Thats why in the script should be command which change the effective user to someone else. And here you have these part of the script.
It first checked if your username is RUNASIS and if it is yes - do nothing. In another case it run JBoss as a another user by using su command.
In your case it should be sufficient to change JBOSSUS variable definition to something like that:
JBOSSUS=jbs
After that you can start these script as a root user and it should run JVM with JBoss with jbs user.