I am using ubuntu 12.4 and I installed glassfish3 follow this tutorial: http://www.marlonj.com/blog/2012/05/instalando-glassfish-3-1-2-en-ubuntu-server-12-04/
All is fine..but when I try to start a domain: sudo -u glassfish bin/asadmin start-domain domain1
show this error:
Esperando a que se inicie domain1 ............Error al iniciar domain
domain1. El servidor ha finalizado de forma prematura con el código de
salida 0. Antes de terminar, ha generado la siguiente salida:
Launching GlassFish on Felix platform
[#|2013-09-24T13:31:50.742-0300|INFO|glassfish3.1.2|com.sun.enterprise.server.logging.GFFileHandler|_ThreadID=1;_ThreadName=main;|Running
GlassFish Version: GlassFish Server Open Source Edition 3.1.2 (build
23)|#]
[#|2013-09-24T13:31:51.819-0300|INFO|glassfish3.1.2|javax.enterprise.system.core.com.sun.enterprise.v3.services.impl|_ThreadID=28;_ThreadName=Grizzly-kernel-thread(1);|Grizzly
Framework 1.9.46 started in: 308ms - bound to [0.0.0.0:3700]|#]
[#|2013-09-24T13:31:51.819-0300|INFO|glassfish3.1.2|javax.enterprise.system.core.com.sun.enterprise.v3.services.impl|_ThreadID=31;_ThreadName=Grizzly-kernel-thread(1);|Grizzly
Framework 1.9.46 started in: 294ms - bound to [0.0.0.0:7676]|#]
[#|2013-09-24T13:31:51.819-0300|INFO|glassfish3.1.2|javax.enterprise.system.core.com.sun.enterprise.v3.services.impl|_ThreadID=21;_ThreadName=Grizzly-kernel-thread(1);|Grizzly
Framework 1.9.46 started in: 411ms - bound to [0.0.0.0:8181]|#]
[#|2013-09-24T13:31:51.819-0300|INFO|glassfish3.1.2|javax.enterprise.system.core.com.sun.enterprise.v3.services.impl|_ThreadID=25;_ThreadName=Grizzly-kernel-thread(1);|Grizzly
Framework 1.9.46 started in: 402ms - bound to [0.0.0.0:4848]|#]
[#|2013-09-24T13:31:52.439-0300|INFO|glassfish3.1.2|org.glassfish.ha.store.spi.BackingStoreFactoryRegistry|_ThreadID=1;_ThreadName=main;|Registered
org.glassfish.ha.store.adapter.cache.ShoalBackingStoreProxy for
persistence-type = replicated in BackingStoreFactoryRegistry|#]
[#|2013-09-24T13:31:52.659-0300|INFO|glassfish3.1.2|javax.enterprise.system.core.com.sun.enterprise.v3.server|_ThreadID=1;_ThreadName=main;|GlassFish
Server Open Source Edition 3.1.2 (23) tiempo de inicio: Felix
(8.339ms), servicios de inicio(2.907ms), total(11.246ms)|#]
[#|2013-09-24T13:31:52.660-0300|SEVERE|glassfish3.1.2|javax.enterprise.system.core.com.sun.enterprise.v3.server|_ThreadID=1;_ThreadName=main;|Cerrando
v3 debido a una excepción de inicio: No free port within range:
8080=com.sun.enterprise.v3.services.impl.monitor.MonitorableSelectorHandler#6365c8|#]
[#|2013-09-24T13:31:52.721-0300|INFO|glassfish3.1.2|javax.enterprise.system.tools.admin.com.sun.enterprise.v3.admin|_ThreadID=37;_ThreadName=Thread-21;|Servidor
inactivo iniciado|#]
[#|2013-09-24T13:31:52.723-0300|INFO|glassfish3.1.2|javax.enterprise.system.core.com.sun.enterprise.v3.server|_ThreadID=37;_ThreadName=Thread-21;|Already
stopped, so just returning|#]
Exception: java.lang.NullPointerException thrown from the
UncaughtExceptionHandler in thread "FelixStartLevel"
Fallo del comando start-domain.
Any idea
Thanks and sorry for my english
Try to create your own domain instead of using default domain1. You can do this with:
asadmin create-domain mydomain
asadmin start-domain mydomain
Then you can access your domain by typing localhost:4848 in your web browser.
I've done this using Windows and Glassfish4 and it worked fine, but I hope it works for you too.
After downloading zip file,
cd/usr/local/glassfish4.1.1./bin
sudo ./asadmin
//try to create
asadmin> create-domain domain1
//if already exist
asadmin> start-domain domain1
Related
I am new to Minikube I tried installing one Java Application which works fine in VS Code. I am using docker to create the container and deploying application through Kubernetes, all went well but while giving the command minikube service service name i am not able to access application.
below is the error.
Please help
Starting tunnel for service hello.
E0207 15:39:47.061814 19908 service_tunnel.go:66] error starting ssh tunnel: exec: "ssh": executable file not found in %PATH% this is error what i am getting.
Dockerfile (https://i.stack.imgur.com/Z2PUv.png)
Error
I am trying to start minishift on my machine. It successfully creates minishift VM but throws time out error.
Configuration:
Minishift version: v1.34.0+f5db7cb
OS: Windows 10
Hypervisor: Virtual Box v6.0.10
PS C:\WINDOWS\system32> minishift start
-- Starting OpenShift cluster .......................................................................Error during 'cluster up' execution: Error starting the cluster. ssh command error:
command : /var/lib/minishift/bin/oc cluster up --image 'openshift/origin-${component}:v3.11.0' --public-hostname 192.168.99.100 --routing-suffix 192.168.99.100.nip.io --base-dir /var/lib/minishift/base
err : exit status 1
output : Getting a Docker client ...
Checking if image openshift/origin-control-plane:v3.11.0 is available ...
Pulling image openshift/origin-cli:v3.11.0
E0725 17:15:42.919928 5316 helper.go:173] Reading docker config from /home/docker/.docker/config.json failed: open /home/docker/.docker/config.json: no such file or directory, will attempt to pull image docker.io/openshift/origin-cli:v3.11.0 anonymously
Image pull complete
E0725 17:15:44.643860 5316 helper.go:173] Reading docker config from /home/docker/.docker/config.json failed: open /home/docker/.docker/config.json: no such file or directory, will attempt to pull image docker.io/openshift/origin-node:v3.11.0 anonymously
Pulling image openshift/origin-node:v3.11.0
Pulled 5/6 layers, 85% complete
Pulled 6/6 layers, 100% complete
Extracting
Image pull complete
Checking type of volume mount ...
Determining server IP ...
Using public hostname IP 192.168.99.100 as the host IP
Checking if OpenShift is already running ...
Checking for supported Docker version (=>1.22) ...
Checking if insecured registry is configured properly in Docker ...
Checking if required ports are available ...
Checking if OpenShift client is configured properly ...
Checking if image openshift/origin-control-plane:v3.11.0 is available ...
I0725 17:16:20.775520 5316 config.go:40] Running "create-master-config"
Starting OpenShift using openshift/origin-control-plane:v3.11.0 ...
I0725 17:16:31.108342 5316 config.go:46] Running "create-node-config"
I0725 17:16:35.237968 5316 flags.go:30] Running "create-kubelet-flags"
I0725 17:16:36.785234 5316 run_kubelet.go:49] Running "start-kubelet"
I0725 17:16:37.288388 5316 run_self_hosted.go:181] Waiting for the kube-apiserver to be ready ...
E0725 17:21:37.300062 5316 run_self_hosted.go:571] API server error: Get https://192.168.99.100:8443/healthz?timeout=32s: dial tcp 192.168.99.100:8443: connect: connection refused ()
Error: timed out waiting for the condition
Expected result: It should provide me without errors link to open web console
This happens to me sometimes too.
Solutions include:
minishift stop && minishift start (turn it off and on again)
restart Windows (perhaps VBox has corrupted itself again)
More info on my minishift setup is here:
http://divby0.blogspot.com/2019/07/configuring-minishift-for-use-with.html
For what it's worth I use a combination of linux shells in Windows 10 to interact with minishift / docker daemon:
Git Bash (usually the best)
Docker Toolbox (plan B when something won't run in Git Bash shell)
WSL (ubuntu based, plan C in desperation)
I am configuring sonar(https://www.sonarqube.org) to my local machine which has Ubuntu 16.04 OS with LAMP(Linux,Apache,mysql,PHP) installed in it.
I have considered these reference link to setup SonarPHP
https://www.howtoforge.com/tutorial/how-to-install-sonarqube-on-ubuntu-1604/
https://www.talentica.com/blogs/sonarqube-php-project-ubuntu/
Now I can see that sonar is running in my PC but link http://localhost:9000/sonar is not working.
Please help me.
After lot of research I found the solution. I am explaining step by step process of how to setup Sonar in Ubuntu16.04 so other's developer who is new to sonar can understand this process.
Step 1
Download sonar "Community Edition 7.7" from this link https://www.sonarqube.org/downloads/
Step 2
Unzip file and move folder to /opt/sonarqube
Step 3
Update Sonar configuration file
sudo vi sonarqube-7.0/conf/sonar.properties
Update following values [database user = sonarqube,database = sonarqube]
sonar.jdbc.username=sonarqube
sonar.jdbc.password=some_secure_password
sonar.jdbc.url=jdbc:mysql://localhost:3306/sonarqube?useUnicode=true&characterEncoding=utf8&rewriteBatchedStatements=true&useConfigs=maxPerformance&useSSL=false
sonar.web.host=127.0.0.1
sonar.web.javaAdditionalOpts=-server
...
Step 4
Create new service in ubuntu 16.04
sudo vi /etc/systemd/system/sonarqube.service
add following text to file and make sure that you have double checked mentioned path.
[Unit]
Description=SonarQube service
After=syslog.target network.target
[Service]
Type=forking
ExecStart=/opt/sonarqube/bin/linux-x86-64/sonar.sh start
ExecStop=/opt/sonarqube/bin/linux-x86-64/sonar.sh stop
User=sonarqube
Group=sonarqube
Restart=always
[Install]
WantedBy=multi-user.target
Start sonar by following command
sudo service sonarqube start
Check sonar status using following command
service sonarqube status
Enable sonar by following command
sudo systemctl enable sonarqube
Step 5
Create Mysql database user and database with following details
Database Username : sonarqube
Database Name : sonarqube
Done.
For project scan you have to download and setup sonar-scanner.
I have taken following links for reference.
https://www.digitalocean.com/community/tutorials/how-to-ensure-code-quality-with-sonarqube-on-ubuntu-16-04
https://www.talentica.com/blogs/sonarqube-php-project-ubuntu/
Running my test with InSpec I am unable to test if the httpd is enabled and running.
InSpec test
describe package 'httpd' do
it { should be_installed }
end
describe service 'httpd' do
it { should be_enabled }
it { should be_running }
end
describe port 80 do
it { should be_listening }
end
The output for kitchen verify is:
System Package
✔ httpd should be installed
Service httpd
✖ should be enabled
expected that `Service httpd` is enabled
✖ should be running
expected that `Service httpd` is running
Port 80
✖ should be listening
expected `Port 80.listening?` to return true, got false
Test Summary: 1 successful, 3 failures, 0 skipped
Recipe for httpd installation:
if node['platform'] == 'centos'
# do centos installation
package 'httpd' do
action :install
end
execute "chkconfig httpd on" do
command "chkconfig httpd on"
end
execute 'apache start' do
command '/usr/sbin/httpd -DFOREGROUND &'
action :run
end
I do not know what I am doing wrong.
More info
CentOS version on docker instance
kitchen exec --command 'cat /etc/centos-release'
-----> Execute command on default-centos-72.
CentOS Linux release 7.2.1511 (Core)
Chef version installed in my host
Chef Development Kit Version: 1.0.3
chef-client version: 12.16.42
delivery version: master (83358fb62c0f711c70ad5a81030a6cae4017f103)
berks version: 5.2.0
kitchen version: 1.13.2
UPDATE 1: Kitchen yml with driver attributes
The platform has the configuration recommended by coderanger :
---
driver:
name: docker
use_sudo: false
provisioner:
name: chef_zero
verifier: inspec
platforms:
- name: centos-7.2
driver:
platform: rhel
run_command: /usr/lib/systemd/systemd
provision_command:
- /bin/yum install -y iniscripts net-tools wget
suites:
- name: default
run_list:
- recipe[apache::default]
verifier:
inspec_tests:
- test/integration
attributes:
And it is the output when run kitchen test:
... some docker steps...
Step 16 : RUN echo ssh-rsa\ AAAAB3NzaC1yc2EAAAADAQABAAABAQDIp1HE9Zbtl3zAH2KKL1mVzb7BU1WxK7mi5xpIxNRBar7EZAAzxi1pVb1JwUXFSCVoAmUyfn/lBsKlgXnUD49pKrqkeLQQW7NoG3uCFiXBUTof8nFVuLYtw4CTiAudplyMvu5J7HQIP1Hve1caY27tFs/kpkQaXHCEuIkqgrM2rreMKK0n8im9b36L2SwWyM/GwqcIS1z9mMttid7ux0\+HOWWHqZ\+7gumOauh6tLRbtjrm3YYoaIAMyv945MIX8BFPXSQixThBVOlXGA9iTwUZWjU6WvZThxVFkKPR9KZtUTuTCT7Y8\+wFtQ/9XCHpPR00YDQvS0Vgdb/LhZUDoNqV\ kitchen_docker_key >> /home/kitchen/.ssh/authorized_keys
---> Using cache
---> c0e6b9e98d6a
Successfully built c0e6b9e98d6a
d486d7ebfe000a3138db06b1424c943a0a1ee7b2a00e8a396cb8c09f9527fb4b
0.0.0.0:32841
Waiting for SSH service on localhost:32841, retrying in 3 seconds
Waiting for SSH service on localhost:32841, retrying in 3 seconds
Waiting for SSH service on localhost:32841, retrying in 3 seconds
Waiting for SSH service on localhost:32841, retrying in 3 seconds
.....
You cannot, at least not out of the box. This is one area where kitchen-docker shows its edges. We try to pretend that a container is like a tiny VM but in reality it isn't, and one notable place where the pretending breaks down is init systems. With CentOS 7, it uses systemd. It is possible to get systemd to run inside the container (see https://github.com/poise/yolover-example/blob/master/.kitchen.yml#L17-L33) but not all features are supported and it can generally be a bit odd :-/ That example should be enough to make your tests work though. For completeness, CentOS 6 uses Upstart which just flat out won't run inside Docker so no love there either.
I'm running opensuse 13.1, and I installed Apache2 as part of LAMP.
Apache2 works just fine, except I can't make it start automatically with boot.
I used "chkconfig -a apache2" command (as described here)
which gives an error "apache2: unknown service".
Appreciate any hints.
Apache2 has been migrated to systemd. chkconfig works only for SysV services.
The following command (apparently) worked for me:
systemctl enable apache2.service
It seems that the OpenSUSE doc is out of sync.
Find the name of the service:
ls -al /etc/init.d/
(Look for apache or httpd)
Then use that name in chkconfig.