play 2.2.1 application deployment in the background and exit logs without using control+D - playframework-2.2

I am writing a script to deploy a play 2.2.1 application.However I have noticed after running the application using command play "start 8084", the application is running at 8084 port but I have to do cntrl+D to exit logs and go back to command promt in ubuntu.
Is there a way to go back to console without using cntrl+d....because I have to do this using shell script.
Also I have used stage. but I am getting the following error:
[error] Not a valid command: play (similar: apply, last, alias)
[error] Not a valid project ID: play
[error] Expected ':' (if selecting a configuration)
[error] Not a valid key: play (similar: clean)
[error] play
Please help

I use something like this with playframework 2.2:
Run play dist for a project
Unzip the prepared zip archive somewhere (it is located in the target\universal folder of your application). The start script will be located at bin/<app_name>
Run the project like this: bash /path/to/your/app/bin/<app_name> -Dhttp.port=8084 & (note the ampersand in the end)
If you are planning to use ssh consider disowning the process or running it with nohup (you may read the details here: Scala start Play server in production) so that the application does not shutdown when you close the ssh session:
bash /path/to/your/app/bin/<app_name> -Dhttp.port=8084 & disown

Related

The server exited prematurely with exit code 1 GlassFish 4

I've been trying to start the glassfish server domain with the following command asadmin start-domain domain1 but the result wasn't the expected. This what the outputs is throwing out:
Waiting for domain1 to start .Error starting domain domain1.
The server exited prematurely with exit code 1.
Before it died, it produced the following output:
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=192m; support was removed in 8.0
Usage: java [-options] class [args...]
(to execute a class)
or java [-options] -jar jarfile [args...]
(to execute a jar file)
where options include:
-d32 use a 32-bit data model if available
-d64 use a 64-bit data model if available
-server to select the "server" VM
The default VM is server.
-cp <class search path of directories and zip/jar files>
-classpath <class search path of directories and zip/jar files>
A ; separated list of directories, JAR archives,
and ZIP archives to search for class files.
-D<name>=<value>
set a system property
-verbose:[class|gc|jni]
enable verbose output
-version print product version and exit
-version:<value>
Warning: this feature is deprecated and will be removed
in a future release.
require the specified version to run
-showversion print product version and continue
-jre-restrict-search | -no-jre-restrict-search
Warning: this feature is deprecated and will be removed
in a future release.
include/exclude user private JREs in the version search
-? -help print this help message
-X print help on non-standard options
-ea[:<packagename>...|:<classname>]
-enableassertions[:<packagename>...|:<classname>]
enable assertions with specified granularity
-da[:<packagename>...|:<classname>]
-disableassertions[:<packagename>...|:<classname>]
disable assertions with specified granularity
-esa | -enablesystemassertions
enable system assertions
-dsa | -disablesystemassertions
disable system assertions
-agentlib:<libname>[=<options>]
load native agent library <libname>, e.g. -agentlib:hprof
see also, -agentlib:jdwp=help and -agentlib:hprof=help
-agentpath:<pathname>[=<options>]
load native agent library by full pathname
-javaagent:<jarpath>[=<options>]
load Java programming language agent, see java.lang.instrument
-splash:<imagepath>
show splash screen with specified image
See http://www.oracle.com/technetwork/java/javase/documentation/index.html for more details.
Command start-domain failed.
Btw I've already tried changing the network-listener-port number located inside glassfish folders C:\glassfish4\glassfish\domains\domain1\config\domain.xml from port 8080 to 4949 and it didn't work. Besides I also tried running the start-domain domain1 command in the asadmin batch file and nothing happened, the output still the same.
Any idea how can I fix this out?
I tried to start it with asadmin.sh and it worked on Windows 10

Black Duck with Gitlab-CI runner

Im trying to integrate BlackDuck in to a gitlab ci script.
Running OpenJDK on Alpine 3.9.2
I get the following error in the logs
2019-10-14 15:19:00 ERROR [main] --- Scanning target /code/sre-web-
portal failed: There was a problem scanning target '/code/sre-web-
portal': Could not find the 'jre' directory in
/root/blackduck/tools.
2019-10-14 15:19:00 INFO [main] --- Signature scanner actions
finished.
and the scan exits with
--- Exiting with code 6 - FAILURE_SCAN
any have this error, or has successfully configured blackduck scan to run in gitlab-ci
command that's being run
bash <(curl -s -L https://detect.synopsys.com/detect.sh) --
detect.project.version.name=1 --blackduck.trust.cert=true --proxy-
insecure --detect.blackduck.signature.scanner.dry.run=true --
blackduck.offline.mode=true --detect.tools.excluded=BINARY_SCAN
I have tried setting the BDS_JAVA_HOME environment variable and it still fails with
--- Exiting with code 6 - FAILURE_SCAN
The cause of your problem is that the required 'Siganture Scanner' tool is yet missing.
Your command tells me, your were running the scan in offline mode.
This means, you have two options to solve this problem:
Either download and install the Signature Scanner tool manually (see https://testing.blackduck.synopsys.com/doc/componentdiscovery/downloadandinstall.htm) and set --detect.blackduck.signature.scanner.local.path= option to scan.
Or run the scan in online mode once as the tool is automatically downloaded and installed only after first establishing a connection to the BlackDuck server. (You can switch back to offline mode after that.)
Credits go to this synopsys community article.

Jenkins + Phing: Build Failure - can't find build.xml

Trying to set up Jenkins on one of my servers for the first time and think I might be missing something.
Jenkins 1.545
Phing 2.6.1
Jenkins builds give me the following output.
Building in workspace /var/www/vhosts/domain.co.uk/httpdocs
looking for '/var/www/vhosts/domain.co.uk/httpdocs/build.xml' ...
looking for '/var/www/vhosts/domain.co.uk/httpdocs/build.xml' ...
looking for 'build.xml' ...
buildfile 'build.xml' not found.
Build step 'Invoke Phing targets' marked build as failure
Finished: FAILURE
If I run my build.xml on it's own it works fine.
I'm using a custom workspace at the moment, before I tried a symlink from the default workspace to my webroot, when I did that it found the build file but failed when trying to run phing. I know it's a problem with permissions but I'm not sure exactly what.
I'm running this on a plesk web server and have tried adding the jenkins user to the psacln and psaserv groups but that didn't work either.
I use hudson but I think is the same problem.
Provide to ant job the full path (advanced settings)
${WORKSPACE}/buil.xml
Assuming the correct set of jenkins user
RUN_AS_USER=jenkins
Go to the custom workspace and
chown -R jenkins:jenkins myworkspace
if it doesn't work
chmod -R 777 myworkspace
then you will fix later.
I hope it helps.

Unable to start Active MQ on Linux

I am trying to get ActiveMQ server running on a RaspberryPI Debian Squeeze box and all appears to be installed correctly but when I try and start the service I am getting the following...
root#raspberrypi:/var/www/activemq/apache-activemq-5.7.0# bin/activemq
INFO: Loading '/etc/default/activemq'
INFO: Using java '/usr/jre1.7.0_07/bin/java'
/usr/jre1.7.0_07/bin/java: 1: /usr/jre1.7.0_07/bin/java:ELF0
4°: not found
/usr/jre1.7.0_07/bin/java: 2: /usr/jre1.7.0_07/bin/java: Syntax error: "(" unexpected
Tasks provided by the sysv init script:
restart - stop running instance (if there is one), start new instance
console - start broker in foreground, useful for debugging purposes
status - check if activemq process is running
setup - create the specified configuration file for this init script
(see next usage section)
Configuration of this script:
The configuration of this script can be placed on /etc/default/activemq or /root/.activemqrc.
To use additional configurations for running multiple instances on the same operating system
rename or symlink script to a name matching to activemq-instance-<INSTANCENAME>.
This changes the configuration location to /etc/default/activemq-instance-<INSTANCENAME> and
$HOME/.activemqrc-instance-<INSTANCENAME>. Configuration files in /etc have higher precedence.
root#raspberrypi:/var/www/activemq/apache-activemq-5.7.0#
It looks like there is an error somewhere but I am a fairly newbie at this and don't know where to look.
Just adding an answer since,becoz as per the documentation , the command is wrong
to start activemqm, use
Navigate to [installation directory/bin] and run ./activemq start or simple bin/activemq start
if you want to see it live in a window use bin/activemq console
To stop, you have to kill the process
The default ActiveMQ "getting started" link sends u here : http://activemq.apache.org/getting-started.html which is the "Getting Started Guide for ActiveMQ 4.x".
If you scroll down main documentation page, you will find this link with the proper commands :
http://activemq.apache.org/version-5-getting-started.html

jenkins error FATAL: Unable to find build script at C:\selenium tests for moveon\moveon4tests1\build.xml

I am using Jenkins and Ant to run my selenium tests. It works fine when I run them on my local machine.
Now I have a Jenkins server which is on a different location and I have to run my tests on that server.
when I tried to run the tests on that server Its is failing because it couldn't find the build.xml file. can you please let me know how can I change the home directory path?
Started by user :**********
Building in workspace /var/lib/jenkins/jobs/moveon4 java tests/workspace
FATAL: Unable to find build script at C:\selenium tests for move\movetests1\build.xml
Build step 'Invoke Ant' marked build as failure
Finished: FAILURE
Are you using "Invoke Ant" in your Jenkins job configuration for the build step that executes your Ant build ? If so, the build file location is hidden away in the Advanced section - it's an annoying quirk of Jenkins.