I am trying to switch Jetty from 7.6 to 9.2.
I read and understood that "OPTION" will no more work. So I changed my command from
java -jar start.jar --ini **OPTIONS**=server,jmx,resources,websocket,ext,plus,jsp,annotations /u/khandela/project/base//etc/config/cometd/cometd_jetty_config.xml
to
start.jar --ini **--module**=server,jmx,resources,websocket,ext,plus,jsp,annotations /u/khandela/project/base//etc/config/cometd/cometd_jetty_config.xml
But I got below warning:
WARNING: ** Unable to continue, required dependency missing. [jsp-impl/${jsp-impl}-jsp]
WARNING: ** As configured, Jetty is unable to start due to a missing enabled module dependency.
WARNING: ** This may be due to a transitive dependency akin to spdy on npn, which resolves based
How to resolve it ?
The error you are seeing about [jsp-impl/${jsp-impl}-jsp] is because a default jsp implementation was not defined when you requested startup of Jetty.
Jetty 9.2.x has 2 different core JSP engines available.
apache - the Apache Jasper JSP engine (the new Jetty default)
glassfish - the Glassfish Jasper JSP engine (original version in use by Jetty. Now obsolete / buggy and deprecated)
The behavior in Jetty 9.2 was to force users to decide which implementation they want to use.
This was a mistake and just confuses users that want to start jetty in their own way (ie: not using the start.ini or ${jetty.base} documented mechanisms)
A feature request was filed, and the next release of Jetty after 9.2.1 will apply defaults for this value. With autoselection for apache.
In the meantime, while you wait for Jetty 9.2.2 (or 9.3.0), add a property defining which jsp-impl you want to use.
$ start.jar --module=server,jmx,resources,websocket,ext,plus,jsp,annotations
jsp-impl=apache
/u/khandela/project/base/etc/config/cometd/cometd_jetty_config.xml
Note: get rid of --ini as that is not used by start.jar
I had similar problem in Netbeans 8.0 to start Jetty 9.2.1. After creating JettyServer Jetty started, when I added into actual Jetty Base Locationin to start.ini jsp-impl=apache clause.
There is complete listing start.ini:
#===========================================================
# Jetty start.jar arguments
#
# The contents of this file, together with the *.ini
# files found in start.d directory are used to build
# the classpath and command line on a call to
# java -jar start.jar [arg...]
#
# Use the following command to see more options
# java -jar start.jar --help
#
# Each line in these files is prepended to the command line
# as arguments and may be either:
# + A property like: name=value
# + A module to enable like: --module=jmx
# + An XML configuration file like: etc/jetty-feature.xml
# + A start.jar option like: --dry-run
#
# If --exec or --dry-run are used, then this file may also
# contain lines with:
# + A JVM option like: -Xmx2000m
# + A System Property like: -Dcom.sun.management.jmxremote
#
# The --add-to-start=module option can be used to append
# a configuration template for a module to start.ini
# The --add-to-startd=module option can be used to create
# a configuration template for a module in start.d/module.ini
# For example configure and run with SPDY use
#
# java -jar start.jar --add-to-startd=spdy
# $EDITOR start.d/spdy.ini
# java -jar start.jar
#
#===========================================================
#
# Initialize module server
#
#--module=server
--module=server,websocket,jsp,ext,jmx,resources,plus,annotations,commandmanager
# removes bug
jsp-impl=apache
## Server Threading Configuration
# minimum number of threads
threads.min=10
# maximum number of threads
threads.max=200
# thread idle timeout in milliseconds
threads.timeout=60000
# What host to listen on (leave commented to listen on all interfaces)
#jetty.host=myhost.com
# Dump the state of the Jetty server, components, and webapps after startup
jetty.dump.start=false
# Dump the state of the Jetty server, before stop
jetty.dump.stop=false
#
# Initialize module deploy
#
--module=deploy
#
# Initialize module websocket
#
#--module=websocket
#
# Initialize module jsp
#
#--module=jsp
# JSP Configuration
# To use an non-jdk compiler for JSP compilation uncomment next line
# -Dorg.apache.jasper.compiler.disablejsr199=true
#
# Initialize module ext
#
#--module=ext
#
# Initialize module resources
#
#--module=resources
#--module=commandmanager
By comparing original start.ini file, you cas see differences.
Related
I am bundling using Webpack 4.
I have multiple Webpack configurations exported in webpack.config.js.
First configuration is to bundle lient code targeting browsers.
Second configuration is to bundle server code targeting node.
I am specifying these browsers and node targets using browserslist in package.json.
I need to specify different browserslists for client and server bundles, but I only have one browserslist key in package.json.
How can I specify different browserslists using package.json?
You don't have to use package.json. If you create a file called .browserslistrc or browserslist at the root of your project, you can use a different configuration.
# Any general config goes at the very top, above any section headers
# ...
# Put section headers in [brackets]
[node]
supports es6-modules
[web]
>1% and not dead
Then call webpack and set BROWSERSLIST_ENV:
BROWSERSLIST_ENV=dev webpack -c webpack.dev.js # Build development
BROWSERSLIST_ENV=prod webpack -c webpack.prod.js # Build production
Your webpack command may be different depending on your configuration.
I want to serve a directory so I could open an html webpage. My structure is as follows:
C:\
¦
¦-- myProj\
¦
¦index.html
¦
¦jar\
¦
jetty-distribution-9.4.18.v20190429\
¦
¦(some jetty folders...)
¦(some jetty files...)
¦start.jar
and inside the folder C:\myProj\jar\jetty-distribution-9.4.18.v20190429 I have unzipped jetty-distribution-9.4.18.v20190429.zip which I downloaded from Eclipse Jetty Downloads.
I then cd C:\myProj and try to start the server with the following
java -jar ./jar/jetty-distribution-9.4.18.v20190429/start.jar
However I receive the following msg
C:\myProj>java -jar ./jar/jetty-distribution-9.4.18.v20190429/start.jar
ERROR : Nothing to start, exiting ...
Usage: java -jar $JETTY_HOME/start.jar [options] [properties] [configs]
java -jar $JETTY_HOME/start.jar --help # for more information
What am I doing wrong please? According to this example near the bottom of the page in the documentation
it should work
"The following demonstrates this by allowing default discovery of ${jetty.home} via locating the start.jar, and using the user.dir System Property for ${jetty.base}."
[jetty-distribution-9.4.18.v20190429]$ pwd
/home/user/jetty-distribution-9.4.18.v20190429
[jetty-distribution-9.4.18.v20190429]$ cd /home/user/my-base
[my-base]$ java -jar /home/user/jetty-distribution-9.4.18.v20190429/start.jar
2013-10-16 09:08:47.802:INFO:oejs.Server:main: jetty-9.4.18.v20190429
2013-10-16 09:08:47.817:INFO:oejdp.ScanningAppProvider:main: Deployment monitor [file:/home/user/my-base/webapps/] at interval 1
Obviously I must be missing something here....
I had the same problem on MacOS with Jetty 9.4.x.
Upgrading to Jetty 10.0.0 solved the problem.
It seems specific to Jetty 9.
This happened to me as well.
The documentation states that you need to create a start.d directory and specify the Jetty modules to run:
> java -jar $JETTY_HOME/start.jar --create-startd
INFO : Base directory was modified
> java -jar $JETTY_HOME/start.jar --add-to-start=http,deploy
INFO: server initialised (transitively) in ${jetty.base}/start.d/server.ini
INFO: http initialised in ${jetty.base}/start.d/http.ini
INFO: security initialised (transitively) in ${jetty.base}/start.d/security.ini
INFO: servlet initialised (transitively) in ${jetty.base}/start.d/servlet.ini
INFO: webapp initialised (transitively) in ${jetty.base}/start.d/webapp.ini
INFO: deploy initialised in ${jetty.base}/start.d/deploy.ini
MKDIR: ${jetty.base}/webapps
INFO: Base directory was modified
> cp $JETTY_HOME/demo-base/webapps/async-rest.war webapps/ROOT.war
> java -jar $JETTY_HOME/start.jar
2015-06-04 11:10:16.286:INFO::main: Logging initialized #274ms
Copying the start.ini from the Jetty home to the base dir and modifying it also worked for me.
The start.jar in the ${jetty.home} directory (in your case that directory is /home/user/jetty-distribution-9.4.18.v20190429/) is for starting a configured instance of Jetty.
Note: you can also use the newer jetty-home-<ver>.tar.gz artifact
instead of the older jetty-distribution artifact.
What does that mean?
Well, it means ...
You have a ${jetty.base} directory somewhere
The ${jetty.base} directory doesn't overlap with the ${jetty.home} directory (and vice-versa)
The ${jetty.base} directory has its configuration in *.ini files.
First it looks for ${jetty.base}/start.ini
Then it looks for ${jetty.base}/start.d/*.ini
Each line in the various *.ini files are just command line options for start.jar
You can see this configuration by using the --list-config option.
example:
[~]$ cd /home/user/my-base
[my-base]$ java -jar /home/user/jetty-distribution-9.4.18.v20190429/start.jar --list-config
I'v already checked my code on local server and I'm sure everything is ok on my code. So it seems something is wrong on server configuration. I have a linux server (Ubuntu 16.04) and installed nginx, redis , ...Also I created configuration files for celery and celerybeat as below:
/etc/init.d/celeryd
/etc/default/celeryd
/etc/init.d/celerybeat
/etc/default/celerybeat
I checked their status ,both of them are running but when I check beat.log it doesn't do anything and only shows 'starting ...'
celeryd file:
# Names of nodes to start
CELERYD_NODES="worker"
# Absolute or relative path to the 'celery' command:
CELERY_BIN="/home/amirali/AwesomeApp/awesome_env/bin/celery"
# App instance to use
CELERY_APP="AwesomeApp"
# Where to chdir at start. Where your manage.py is...
CELERYD_CHDIR="/home/amirali/AwesomeApp"
# Extra command-line arguments to the worker
CELERYD_OPTS="--time-limit=300 -Ofair --concurrency=8"
# Set logging level to DEBUG
CELERYD_LOG_LEVEL="INFO"
# %n will be replaced with the first part of the nodename.
CELERYD_LOG_FILE="/var/log/celery/%n%I.log"
CELERYD_PID_FILE="/var/run/celery/%n.pid"
# Workers should run as an unprivileged user.
# You need to create this user manually (or you can choose
# a user/group combination that already exists (e.g., nobody).
CELERYD_USER="celery"
CELERYD_GROUP="celery"
# If enabled pid and log directories will be created if missing,
# and owned by the userid/group configured.
CELERY_CREATE_DIRS=1
celerybeat file:
File: /etc/default/celerybeat
CELERYBEAT_LOG_LEVEL="info"
# Absolute or relative path to the 'celery' command:
CELERY_BIN="/home/amirali/AwesomeApp/awesome_env/bin/celery"
CELERYBEAT_USER="celery"
CELERYBEAT_GROUP="celery"
# App instance to use
# comment out this line if you don't use an app
CELERY_APP="AwesomeApp"
# or fully qualified:
#CELERY_APP="proj.tasks:app"
# Where to chdir at start.
CELERYBEAT_CHDIR="/home/amirali/AwesomeApp"
# Extra arguments to celerybeat
CELERYBEAT_OPTS="--schedule=/var/run/celery/celerybeat-schedule"
export DJANGO_SETTINGS_MODULE="AwesomeApp.settings"
When we had to implement celery periodic tasks, it turned out celery-beat did not work properly, it had just stopping launch tasks in some moment.
After some tests we decided do not waste our time on it anymore and rely on linux crontab utility
I am learning pktgen based on DPDK. There is no problem during the DPDK's process(for example, installation, allocating large pages, binding NICs, running DPDK sample programs, etc.). I follow Getting Started with Pktgen and when I run run.py it shows an empty list of config files. Then I try to execute the instructions on the doc, I get an error says "Config file 'default' not found".
root#ubuntu:/home/chang/pktgen-dpdk/tools# ./run.py
>>> sdk '/home/chang/dpdk', target 'x86_64-native-linuxapp-gcc'
*** Pick one of the following config files
Configurations:
Name - Description
---- -----------
root#ubuntu:/home/chang/pktgen-dpdk/tools# ./run.py -s default
>>> sdk '/home/chang/dpdk', target 'x86_64-native-linuxapp-gcc'
*** Config file 'default' not found
Configurations:
Name - Description
---- -----------
root#ubuntu:/home/chang/pktgen-dpdk/tools#
But in fact, the configuration file does exist in /pktgen-dpdk/cfg
root#ubuntu:/home/chang/pktgen-dpdk/cfg# ls
bond.cfg default.cfg pktgen-1.cfg server_mif.cfg
client_memif.cfg half-bond.cfg pktgen-2.cfg
client_mif.cfg many-cores.cfg server_memif.cfg
My system is Ubuntu 18.04 installed on VMware. I tried to re-clone the code, re-compile dpdk and pktgen, tried to install it on another machine, but got the same error.
Thanks in advance!
Looks like we have to run the script from the main project directory, i.e. do cd .. and try again. Here is the quote from the README.md
Using the new tools/run.py script to setup and run pktgen with different configurations. The configuration files are located in the cfg directory with filenames ending in .cfg.
To use a configuration file;
$ ./tools/run.py -s default # to setup the ports and attach them to DPDK (only needed once per boot)
$ ./tools/run.py default # Run the default configuration
I cloned a rails project from github and trying to run rails generate rspec:install after running bundle install. The console gives following
`Usage:
rails new APP_PATH [options]
Options:
-r, [--ruby=PATH] # Path to the Ruby binary of your choice
# Default: /Users/sankethpurwar/.rvm/rubies/ruby-2.3.1/bin/ruby
-m, [--template=TEMPLATE] # Path to some application template (can be a filesystem path or URL)
[--skip-gemfile], [--no-skip-gemfile] # Don't create a Gemfile
-B, [--skip-bundle], [--no-skip-bundle] # Don't run bundle install
-G, [--skip-git], [--no-skip-git] # Skip .gitignore file
[--skip-keeps], [--no-skip-keeps] # Skip source control .keep files
-O, [--skip-active-record], [--no-skip-active-record] # Skip Active Record files
-S, [--skip-sprockets], [--no-skip-sprockets] # Skip Sprockets files
-d, [--database=DATABASE] # Preconfigure for selected database (options: mysql/oracle/postgresql/sqlite3/frontbase/ibm_db/sqlserver/jdbcmysql/jdbcsqlite3/jdbcpostgresql/jdbc)
# Default: sqlite3
-j, [--javascript=JAVASCRIPT] # Preconfigure for selected JavaScript library
# Default: jquery
-J, [--skip-javascript], [--no-skip-javascript] # Skip JavaScript files
[--dev], [--no-dev] # Setup the application with Gemfile pointing to your Rails checkout
[--edge], [--no-edge] # Setup the application with Gemfile pointing to Rails repository
-T, [--skip-test-unit], [--no-skip-test-unit] # Skip Test::Unit files
[--rc=RC] # Path to file containing extra configuration options for rails command
[--no-rc], [--no-no-rc] # Skip loading of extra configuration options from .railsrc file
Runtime options:
-f, [--force] # Overwrite files that already exist
-p, [--pretend], [--no-pretend] # Run but do not make any changes
-q, [--quiet], [--no-quiet] # Suppress status output
-s, [--skip], [--no-skip] # Skip files that already exist
Rails options:
-h, [--help], [--no-help] # Show this help message and quit
-v, [--version], [--no-version] # Show Rails version number and quit
Description:
The 'rails new' command creates a new Rails application with a default
directory structure and configuration at the path you specify.
You can specify extra command-line arguments to be used every time
'rails new' runs in the .railsrc configuration file in your home directory.
Note that the arguments specified in the .railsrc file don't affect the
defaults values shown above in this help message.
Example:
rails new ~/Code/Ruby/weblog
This generates a skeletal Rails installation in ~/Code/Ruby/weblog.
See the README in the newly created application to get going.`
Do I need to do any additional setup to work with an existing code base?
I think you are not running generator command from project directory. go to your project directory then run the command. If bundler in not installed then run gem install bundler after that run bundle install