CRON Scheduler for OOZIE - cron

I am working in PST timings and as per my knowledge OOZIE Coordinator jobs run in UTC time. I have no rights to change the time zone for my cluster.
My requirement is to run the workflow every first weekday every month.
Eg. If 1st april is friday it runs at 7:30 PM PST.
CRON I made - frequency = "30 2 2W * ?"
The materialized times in PST are -
13-31 Mar 2016 19:30:00
12-01 Mar 2016 18:30:00
11-01 Feb 2016 18:30:00
10-31 Dec 2015 18:30:00
9-01 Dec 2015 18:30:00
8-01 Nov 2015 18:30:00
7-01 Oct 2015 19:30:00
6-01 Sep 2015 19:30:00
5-02 Aug 2015 19:30:00
4-01 Jul 2015 19:30:00
3-01 Jun 2015 19:30:00
2-30 Apr 2015 19:30:00
1-01 Apr 2015 19:30:00
Now the problem is my workflow run for May 2015,Jan 2016 is skipped because 2nd May is Saturday so nearest weekday is 1st May. So it triggers at 2:30 UTC morning, converting it to PST its 31st April 2015 19:30.
Can someone give me a workaround for this...?

Related

clamav-daemon doesn't create /var/run/clamd.ctl [closed]

Closed. This question is not about programming or software development. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 3 days ago.
Improve this question
I installed clamav-daemon on Debian 11 and when I try to start it, it doesn't create the LocalSocket /var/run/clamd.ctl.
LocalSocket in my /etc/clamav/clamd.conf:
LocalSocket /var/run/clamav/clamd.ctl
systemctl status clamav-daemon.service brings:
● clamav-daemon.service - Clam AntiVirus userspace daemon
Loaded: loaded (/lib/systemd/system/clamav-daemon.service; enabled; vendor preset: enabled)
Drop-In: /etc/systemd/system/clamav-daemon.service.d
└─extend.conf, override.conf
Active: active (running) since Fri 2023-02-17 15:55:18 CET; 34min ago
Docs: man:clamd(8)
man:clamd.conf(5)
https://docs.clamav.net/
Process: 37394 ExecStartPre=/bin/mkdir -p /run/clamav (code=exited, status=0/SUCCESS)
Process: 37395 ExecStartPre=/bin/chown clamav /run/clamav (code=exited, status=0/SUCCESS) Main PID: 37396 (clamd)
Tasks: 1 (limit: 1129)
Memory: 489.8M
CPU: 52.996s
CGroup: /system.slice/clamav-daemon.service
└─37396 /usr/sbin/clamd --foreground=true
Feb 17 15:55:18 cc700x-irmler systemd[1]: clamav-daemon.service:
Consumed 11.193s CPU time. Feb 17 15:55:18 cc700x-irmler systemd[1]:
Starting Clam AntiVirus userspace daemon... Feb 17 15:55:18
cc700x-irmler systemd[1]: Started Clam AntiVirus userspace daemon.
So, it seems everything to be fine. But:
systemctl status clamav-daemon.socket brings:
Unit clamav-daemon.socket could not be found.
/var/log/clamav/clamav.log brings (when starting):
Fri Feb 17 15:55:19 2023 -> +++ Started at Fri Feb 17 15:55:19 2023
Fri Feb 17 15:55:19 2023 -> Received 0 file descriptor(s) from
systemd. Fri Feb 17 15:55:19 2023 -> clamd daemon 0.103.7 (OS:
linux-gnu, ARCH: x86_64, CPU: x86_64) Fri Feb 17 15:55:19 2023 -> Log
file size limited to 4294967295 bytes. Fri Feb 17 15:55:19 2023 ->
Reading databases from /var/lib/clamav Fri Feb 17 15:55:19 2023 -> Not
loading PUA signatures. Fri Feb 17 15:55:19 2023 -> Bytecode: Security
mode set to "TrustSigned". Fri Feb 17 16:08:12 2023 -> Loaded 8652992
signatures.
/var/log/clamav/clamav-milter.log brings (as the /var/run/clamav/clamd.ctl is missing):
Fri Feb 17 16:27:05 2023 -> WARNING: No clamd server appears to be
available Fri Feb 17 16:28:05 2023 -> WARNING: No clamd server appears
to be available Fri Feb 17 16:29:04 2023 -> WARNING: No clamd server
appears to be available Fri Feb 17 16:30:03 2023 -> WARNING: No clamd
server appears to be available Fri Feb 17 16:31:02 2023 -> WARNING: No
clamd server appears to be available Fri Feb 17 16:32:01 2023 ->
WARNING: No clamd server appears to be available
The permissions for /var/run/ is set for the user "clamav" and group "root". clamav is also the user who runs the process:
ps aux | grep clamav
clamav 500 0.0 0.0 58248 704 ? Ss 14:22 0:00
/usr/bin/freshclam -d --foreground=true clamav 31064 0.0 0.0
349480 52 ? Ssl 14:55 0:00 /usr/sbin/clamav-milter
--config-file=/etc/clama v/clamav-milter.conf clamav 37396 2.2 42.5 1395520 425952 ? Ds 15:55 0:55 /usr/sbin/clamd --foreground=true root 38870 0.0 0.0 6244 700 pts/1 S+ 16:36 0:00 grep clamav
I tried already to purge/install and also --reinstall clamav and clamav-daemon and I also tried a dpkg-reconfigure on clamav-daemon. And I also tried a clean reboot. Nothing changed the situation.
I have no idea what else I could try. Has anyone an idea?
Thanks a lot!

Increasing size of .next directory

I have a problem with constant memory growth of the .next folder.
We have an application running on docker.
We are using Incremental Static Regeneration and Server-Side Rendering.
Version of next
"next": "^11.1.0"
docker-compose.yml
version: '2.4'
services:
# Frontend prod
node-prod:
build:
context: ../www
dockerfile: ../.docker/node/Dockerfile
args:
- ENV_FILE=prod.env
container_name: test-prod
environment:
- NODE_OPTIONS="--max-old-space-size=1536"
expose:
- "3000"
restart: always
cpus: 1
mem_limit: 1536m
networks:
- test
networks:
test:
external: true
DockerFile
ARG NODE_ENV=production
FROM node:16-slim AS base
ENV NODE_ENV $NODE_ENV
ARG PORT=3000
ENV PORT $PORT
EXPOSE $PORT
RUN npm i npm#latest -g
RUN mkdir -p /opt/node_app
WORKDIR /opt/node_app
RUN mkdir -p /opt/node_app/app/.next
RUN mkdir -p /opt/node_app/_logs
COPY ./package.json ./package-lock.json* ./.npmrc ./
RUN npm ci --legacy-peer-deps && npm cache clean --force
ENV PATH /opt/node_app/node_modules/.bin:$PATH
WORKDIR /opt/node_app/app
COPY . .
ARG ENV_FILE=production.env
COPY ./$ENV_FILE .env.local
# Development
FROM base AS next-app-development
CMD npm run dev
# Production
FROM base AS next-app-production
RUN npm run build
CMD npm start
FROM next-app-$NODE_ENV AS next-app-final
Bellow you can see the logs of memory increasing of the .next folder.
It is during midnight and the website is not being used as much as during the day.
Do 2. Jun 22:00:01 CEST 2022
466M /opt/node_app/app/.next
Do 2. Jun 22:30:01 CEST 2022
499M /opt/node_app/app/.next
Do 2. Jun 23:00:01 CEST 2022
541M /opt/node_app/app/.next
Do 2. Jun 23:30:01 CEST 2022
570M /opt/node_app/app/.next
Fr 3. Jun 00:00:01 CEST 2022
588M /opt/node_app/app/.next
Fr 3. Jun 00:30:01 CEST 2022
610M /opt/node_app/app/.next
Fr 3. Jun 01:00:01 CEST 2022
631M /opt/node_app/app/.next
Fr 3. Jun 01:30:01 CEST 2022
655M /opt/node_app/app/.next
Fr 3. Jun 02:00:01 CEST 2022
679M /opt/node_app/app/.next
Fr 3. Jun 02:30:01 CEST 2022
699M /opt/node_app/app/.next
Fr 3. Jun 03:00:01 CEST 2022
724M /opt/node_app/app/.next
Fr 3. Jun 22:00:01 CEST 2022
842M /opt/node_app/app/.next
Fr 3. Jun 22:30:01 CEST 2022
862M /opt/node_app/app/.next
Fr 3. Jun 23:00:01 CEST 2022
879M /opt/node_app/app/.next
Fr 3. Jun 23:30:01 CEST 2022
894M /opt/node_app/app/.next
Sa 4. Jun 00:00:01 CEST 2022
910M /opt/node_app/app/.next
Sa 4. Jun 00:30:01 CEST 2022
926M /opt/node_app/app/.next
Sa 4. Jun 01:00:01 CEST 2022
943M /opt/node_app/app/.next
Sa 4. Jun 01:30:01 CEST 2022
959M /opt/node_app/app/.next
Sa 4. Jun 02:00:01 CEST 2022
977M /opt/node_app/app/.next
Sa 4. Jun 02:30:01 CEST 2022
996M /opt/node_app/app/.next
Sa 4. Jun 03:00:01 CEST 2022
1007M /opt/node_app/app/.next
Sa 4. Jun 22:00:01 CEST 2022
1.6G /opt/node_app/app/.next
Sa 4. Jun 22:30:01 CEST 2022
1.6G /opt/node_app/app/.next
Sa 4. Jun 23:00:01 CEST 2022
1.6G /opt/node_app/app/.next
Sa 4. Jun 23:30:01 CEST 2022
1.6G /opt/node_app/app/.next
So 5. Jun 00:00:01 CEST 2022
1.6G /opt/node_app/app/.next
So 5. Jun 00:30:01 CEST 2022
1.7G /opt/node_app/app/.next
So 5. Jun 01:00:01 CEST 2022
1.7G /opt/node_app/app/.next
So 5. Jun 01:30:01 CEST 2022
1.7G /opt/node_app/app/.next
So 5. Jun 02:00:01 CEST 2022
1.7G /opt/node_app/app/.next
So 5. Jun 02:30:01 CEST 2022
1.7G /opt/node_app/app/.next
So 5. Jun 03:00:01 CEST 2022
1.7G /opt/node_app/app/.next
So 5. Jun 22:00:01 CEST 2022
1.9G /opt/node_app/app/.next
So 5. Jun 22:30:01 CEST 2022
1.9G /opt/node_app/app/.next
So 5. Jun 23:00:01 CEST 2022
1.9G /opt/node_app/app/.next
So 5. Jun 23:30:01 CEST 2022
1.9G /opt/node_app/app/.next
Mo 6. Jun 00:00:01 CEST 2022
1.9G /opt/node_app/app/.next
Mo 6. Jun 00:30:01 CEST 2022
1.9G /opt/node_app/app/.next
Mo 6. Jun 01:00:01 CEST 2022
2.0G /opt/node_app/app/.next
Mo 6. Jun 01:30:01 CEST 2022
2.0G /opt/node_app/app/.next
Mo 6. Jun 02:00:01 CEST 2022
2.0G /opt/node_app/app/.next
Mo 6. Jun 02:30:01 CEST 2022
2.1G /opt/node_app/app/.next
Mo 6. Jun 03:00:01 CEST 2022
2.1G /opt/node_app/app/.next
Mo 6. Jun 22:00:01 CEST 2022
2.2G /opt/node_app/app/.next
Mo 6. Jun 22:30:01 CEST 2022
2.2G /opt/node_app/app/.next
Mo 6. Jun 23:00:01 CEST 2022
2.2G /opt/node_app/app/.next
Mo 6. Jun 23:30:01 CEST 2022
2.3G /opt/node_app/app/.next

how to query this date format in moongose and moongodb "ticketTimeStartDate": "Mon Oct 18 2021 12:28:59 GMT+0000 (Coordinated Universal Time)",

how to query this date format in moongose and moongodb
"ticketTimeStartDate": "Mon Oct 18 2021 12:28:59 GMT+0000 (Coordinated Universal Time)",
How to generate date time format same as Mon Oct 18 2021 12:28:59 GMT+0000 (Coordinated Universal Time). I don't know how to generate it include (Coordinated Universal Time) at the end?

NodeJS SSH2 module data returned in inconsistent format

I am using the ssh2 node module to connect via ssh to a server. After which I run a command to list print ques and put them into an array, the command is lpstat -o.
When I use putty and ssh into a server and run this command, I get data returned like this:
LABEL008-2287 printeng 1024 Tue 08 Oct 2019 08:30:20 AM CDT
LABEL008-2288 printeng 1024 Tue 08 Oct 2019 08:30:20 AM CDT
LABEL002-2292 printeng 1024 Tue 08 Oct 2019 10:05:11 AM CDT
LABEL002-2293 printeng 1024 Tue 08 Oct 2019 10:05:11 AM CDT
However, when I use nodejs and run the command the data comes at times comes inconsistently (cut off) like this:
LABEL008-2287 printeng 1024 Tue Oct 8 08:30:20 2019
LABEL008-2288 printeng 1024 Tue Oct 8 08:30:20 2019
LABEL002-2294 printeng 1024 Tue Oct 8 10:05:12 2019
LABEL002-2298 printeng 1024 Tue Oct 8 10:05:12
2019
LABEL008-2299 printeng 1024 Tue Oct 8 10:05:15 2019
LABEL008-2300 printeng 1024 Tue Oct 8 10:05:17 2019
This is troublesome as I am needing to split the data by new line '\n\' and put it into an array which I am achieving like so:
}).on('data', function(data) {
const myArray = data.toString().split('\n');
I am not sure if this is an issue or limitation with the node module itself or if I am missing an option or configuration with how the data stream should be handled.

"Hello world" web app and Glassfish crash: address already in use: 8080

From Netbeans 6.9.1 I chose to include Glassfish 3 on install. I then created a new web application and selected JSF 2.0, so Netbeans created a "hello world" type app to start from. However, running it brings up errors, but it's better now that I've modified glassfish a bit. However, why is there still a database problem when I'm not even using a database?
now I'm getting:
glassfish:
Mar 2, 2011 8:49:36 PM com.sun.enterprise.glassfish.bootstrap.ASMain main
INFO: Launching GlassFish on Felix platform
Welcome to Felix
================
INFO: Perform lazy SSL initialization for the listener 'http-listener-2'
INFO: Starting Grizzly Framework 1.9.18-o - Wed Mar 02 20:50:51 PST 2011
INFO: Starting Grizzly Framework 1.9.18-o - Wed Mar 02 20:50:51 PST 2011
INFO: Grizzly Framework 1.9.18-o started in: 1122ms listening on port 7676
INFO: Grizzly Framework 1.9.18-o started in: 1606ms listening on port 8181
INFO: Grizzly Framework 1.9.18-o started in: 1821ms listening on port 8081
INFO: Grizzly Framework 1.9.18-o started in: 1491ms listening on port 3700
INFO: Grizzly Framework 1.9.18-o started in: 1537ms listening on port 4848
INFO: GlassFish Server Open Source Edition 3.0.1 (22) startup time : Felix(67028ms) startup services(17874ms) total(84902ms)
INFO: Binding RMI port to *:8686
INFO: JMXStartupService: Started JMXConnector, JMXService URL = service:jmx:rmi://tleilax.servebeer.com:8686/jndi/rmi://tleilax.servebeer.com:8686/jmxrmi
INFO: Hibernate Validator bean-validator-3.0-JBoss-4.0.2
INFO: Instantiated an instance of org.hibernate.validator.engine.resolver.JPATraversableResolver.
INFO: Grizzly Framework 1.9.18-o started in: 266ms listening on port 8081
INFO: Using com.sun.enterprise.transaction.jts.JavaEETransactionManagerJTSDelegate as the delegate
INFO: [Thread[GlassFish Kernel Main Thread,5,main]] started
INFO: {felix.fileinstall.poll (ms) = 5000, felix.fileinstall.dir = /home/thufir/glassfish-3.0.1/glassfish/modules/autostart, felix.fileinstall.debug = 1, felix.fileinstall.bundles.new.start = true, felix.fileinstall.tmpdir = /tmp/fileinstall-8585686048027063971, felix.fileinstall.filter = null}
INFO: Installed /home/thufir/glassfish-3.0.1/glassfish/modules/autostart/osgi-web-container.jar
INFO: Installed /home/thufir/glassfish-3.0.1/glassfish/modules/autostart/org.apache.felix.fileinstall-autodeploy-bundles.cfg
INFO: Installed /home/thufir/glassfish-3.0.1/glassfish/modules/autostart/org.apache.felix.scr.jar
INFO: {felix.fileinstall.poll (ms) = 5000, felix.fileinstall.dir = /home/thufir/glassfish-3.0.1/glassfish/domains/domain1/autodeploy/bundles, felix.fileinstall.debug = 1, felix.fileinstall.bundles.new.start = true, felix.fileinstall.tmpdir = /tmp/fileinstall-3996754497384347726, felix.fileinstall.filter = null}
INFO: Started bundle: file:/home/thufir/glassfish-3.0.1/glassfish/modules/autostart/osgi-web-container.jar
INFO: Started bundle: file:/home/thufir/glassfish-3.0.1/glassfish/modules/autostart/org.apache.felix.scr.jar
INFO: SEC1002: Security Manager is OFF.
INFO: Security startup service called
INFO: SEC1143: Loading policy provider com.sun.enterprise.security.provider.PolicyWrapper.
INFO: Realm admin-realm of classtype com.sun.enterprise.security.auth.realm.file.FileRealm successfully created.
INFO: Realm file of classtype com.sun.enterprise.security.auth.realm.file.FileRealm successfully created.
INFO: Realm certificate of classtype com.sun.enterprise.security.auth.realm.certificate.CertificateRealm successfully created.
INFO: Security service(s) started successfully....
INFO: Total number of available updates : 59
INFO: Available updates :
glassfish-full-incorporation 3.1,0-43:20110215T074016Z Tue Feb 15 07:40:16 PST 2011
glassfish-web-incorporation 3.1,0-43:20110215T074014Z Tue Feb 15 07:40:14 PST 2011
glassfish-web-l10n 3.1,0-41.1:20110213T154415Z Sun Feb 13 15:44:15 PST 2011
glassfish-ejb-lite-l10n 3.1,0-41.1:20110213T154350Z Sun Feb 13 15:43:50 PST 2011
pkg-java 1.122,0-52.2817:20110218T204119Z Fri Feb 18 20:41:19 PST 2011
glassfish-ejb-l10n 3.1,0-41.1:20110213T154345Z Sun Feb 13 15:43:45 PST 2011
glassfish-gui-l10n 3.1,0-41.1:20110213T154326Z Sun Feb 13 15:43:26 PST 2011
glassfish-nucleus-l10n 3.1,0-41.1:20110213T154338Z Sun Feb 13 15:43:38 PST 2011
javadb-core 10.6.2.1,0-1:20101213T185842Z Mon Dec 13 18:58:42 PST 2010
javadb-client 10.6.2.1,0-1:20101213T185835Z Mon Dec 13 18:58:35 PST 2010
jersey 1.5,0-1.0:20110215T072802Z Tue Feb 15 07:28:02 PST 2011
mq-core 4.5,0-29.2:20110210T074434Z Thu Feb 10 07:44:34 PST 2011
glassfish-jdbc-l10n 3.1,0-41.1:20110213T154422Z Sun Feb 13 15:44:22 PST 2011
glassfish-full-profile 3.1,0-43:20110215T074029Z Tue Feb 15 07:40:29 PST 2011
glassfish-upgrade-l10n 3.1,0-41.1:20110213T154456Z Sun Feb 13 15:44:56 PST 2011
glassfish-jca-l10n 3.1,0-41.1:20110213T154405Z Sun Feb 13 15:44:05 PST 2011
javadb-common 10.6.2.1,0-1:20101213T185828Z Mon Dec 13 18:58:28 PST 2010
glassfish-common-full-l10n 3.1,0-41.1:20110213T154354Z Sun Feb 13 15:43:54 PST 2011
glassfish-web-profile 3.1,0-43:20110215T074022Z Tue Feb 15 07:40:22 PST 2011
glassfish-common-l10n 3.1,0-41.1:20110213T154451Z Sun Feb 13 15:44:51 PST 2011
glassfish-jts-l10n 3.1,0-41.1:20110213T154359Z Sun Feb 13 15:43:59 PST 2011
glassfish-jms-l10n 3.1,0-41.1:20110213T154409Z Sun Feb 13 15:44:09 PST 2011
glassfish-corba 3.1.0,0-27:20110215T071130Z Tue Feb 15 07:11:30 PST 2011
glassfish-jms 3.1,0-43:20110215T072339Z Tue Feb 15 07:23:39 PST 2011
mq-locale 4.5,0-29.2:20110210T074528Z Thu Feb 10 07:45:28 PST 2011
mq-server 4.5,0-29.2:20110210T074445Z Thu Feb 10 07:44:45 PST 2011
mq-bin-sh 4.5,0-29.2:20110210T074442Z Thu Feb 10 07:44:42 PST 2011
metro 2.1,0-30:20110215T073257Z Tue Feb 15 07:32:57 PST 2011
glassfish-cmp 3.1,0-43:20110215T072715Z Tue Feb 15 07:27:15 PST 2011
mq-bin-exe 4.5,0-29.2:20110210T105419Z Thu Feb 10 10:54:19 PST 2011
glassfish-ejb 3.1,0-43:20110215T072446Z Tue Feb 15 07:24:46 PST 2011
glassfish-common-full 3.1,0-43:20110215T072130Z Tue Feb 15 07:21:30 PST 2011
glassfish-appclient 3.1,0-43:20110215T073837Z Tue Feb 15 07:38:37 PST 2011
mq-config-gf 4.5,0-29.2:20110210T074525Z Thu Feb 10 07:45:25 PST 2011
glassfish-grizzly-full 1.9.31,0-1:20110215T070725Z Tue Feb 15 07:07:25 PST 2011
glassfish-management 3.1,0-43:20110215T071037Z Tue Feb 15 07:10:37 PST 2011
glassfish-hk2 3.1,0-43:20110215T070538Z Tue Feb 15 07:05:38 PST 2011
glassfish-upgrade 3.1,0-43:20110215T071009Z Tue Feb 15 07:10:09 PST 2011
glassfish-jts 3.1,0-43:20110215T072233Z Tue Feb 15 07:22:33 PST 2011
glassfish-corba-base 3.1.0,0-27:20110215T070738Z Tue Feb 15 07:07:38 PST 2011
glassfish-javahelp 2.0.2,0-1:20110215T071001Z Tue Feb 15 07:10:01 PST 2011
glassfish-scripting 3.1,0-41:20110208T202810Z Tue Feb 08 20:28:10 PST 2011
glassfish-nucleus 3.1,0-43:20110215T070659Z Tue Feb 15 07:06:59 PST 2011
glassfish-jpa 3.1,0-43:20110215T071106Z Tue Feb 15 07:11:06 PST 2011
glassfish-ejb-lite 3.1,0-43:20110215T072030Z Tue Feb 15 07:20:30 PST 2011
glassfish-jcdi 3.1,0-43:20110215T072735Z Tue Feb 15 07:27:35 PST 2011
glassfish-jdbc 3.1,0-43:20110215T071818Z Tue Feb 15 07:18:18 PST 2011
glassfish-common 3.1,0-43:20110215T074007Z Tue Feb 15 07:40:07 PST 2011
glassfish-jsf 2.1.0,0-11:20110215T071155Z Tue Feb 15 07:11:55 PST 2011
glassfish-gui 3.1,0-43:20110215T071924Z Tue Feb 15 07:19:24 PST 2011
glassfish-registration 3.1,0-43:20110215T071019Z Tue Feb 15 07:10:19 PST 2011
felix 3.0.8,0-0:20110215T070355Z Tue Feb 15 07:03:55 PST 2011
glassfish-grizzly 1.9.31,0-1:20110215T070555Z Tue Feb 15 07:05:55 PST 2011
glassfish-web 3.1,0-43:20110215T071324Z Tue Feb 15 07:13:24 PST 2011
glassfish-jta 3.1,0-43:20110215T071139Z Tue Feb 15 07:11:39 PST 2011
glassfish-jca 3.1,0-43:20110215T071053Z Tue Feb 15 07:10:53 PST 2011
glassfish-cluster 3.1,0-43:20110215T070945Z Tue Feb 15 07:09:45 PST 2011
shoal 1.5.29,0-0:20110215T070911Z Tue Feb 15 07:09:11 PST 2011
glassfish-ha 3.1,0-43:20110215T070954Z Tue Feb 15 07:09:54 PST 2011
INFO: Created HTTP listener http-listener-1 on port 8081
INFO: Created HTTP listener http-listener-2 on port 8181
INFO: Created HTTP listener admin-listener on port 4848
INFO: Created virtual server server
INFO: Created virtual server __asadmin
INFO: Virtual server server loaded system default web module
INFO: Initializing Mojarra 2.0.2 (FCS b10) for context '/WebApplication1'
INFO: Loading application WebApplication1 at /WebApplication1
INFO: WebApplication1 was successfully deployed in 245,397 milliseconds.
Java DB Database Process:
2011-03-03 04:49:35.249 GMT : Security manager installed using the Basic server security policy.
2011-03-03 04:49:48.584 GMT : Could not listen on port 1527 on host localhost:
java.net.BindException: Address already in use
WebApplication1 (run):
init:
deps-module-jar:
deps-ear-jar:
deps-jar:
library-inclusion-in-archive:
library-inclusion-in-manifest:
compile:
compile-jsps:
Starting GlassFish Server 3
GlassFish Server 3 is running.
In-place deployment at /home/thufir/NetBeansProjects/WebApplication1/build/web
Initializing...
run-deploy:
Browsing: http://localhost:8080/WebApplication1/
run-display-browser:
run:
BUILD SUCCESSFUL (total time: 15 minutes 35 seconds)
However, that "database" still on the wrong port for some reason(?).
I modified one domain.xml, but there's also one in template:
thufir#tleilax:~$
thufir#tleilax:~$ nl /home/thufir/glassfish-3.0.1/glassfish/domains/domain1/config/domain.xml | grep 8081
189 <network-listener port="8081" protocol="http-listener-1" transport="tcp" name="http-listener-1" thread-pool="http-thread-pool" />
thufir#tleilax:~$
thufir#tleilax:~$
thufir#tleilax:~$ ll /home/thufir/glassfish-3.0.1/glassfish/lib/templates/domain.xml
-rw-rw-r-- 1 thufir thufir 12804 2010-06-08 15:37 /home/thufir/glassfish-3.0.1/glassfish/lib/templates/domain.xml
thufir#tleilax:~$
However, glassfish now seems to be running ok, although I would prefer it on 8080 as it would be by default. I just don't understand why there's a database connection to, apparently, no database -- certainly not one I selected.
thufir#tleilax:~$
thufir#tleilax:~$ sudo lsof -i :1527
[sudo] password for thufir:
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
java 4757 thufir 27u IPv6 46934 0t0 TCP localhost.localdomain:1527 (LISTEN)
thufir#tleilax:~$
thufir#tleilax:~$
thufir#tleilax:~$
thufir#tleilax:~$ nl /home/thufir/glassfish-3.0.1/glassfish/domains/domain1/config/domain.xml | grep 8081
189 <network-listener port="8081" protocol="http-listener-1" transport="tcp" name="http-listener-1" thread-pool="http-thread-pool" />
thufir#tleilax:~$
thufir#tleilax:~$ ll /home/thufir/glassfish-3.0.1/glassfish/lib/templates/domain.xml
-rw-rw-r-- 1 thufir thufir 12804 2010-06-08 15:37 /home/thufir/glassfish-3.0.1/glassfish/lib/templates/domain.xml
thufir#tleilax:~$
thufir#tleilax:~$ sudo lsof -i :1527
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
java 4757 thufir 27u IPv6 46934 0t0 TCP localhost.localdomain:1527 (LISTEN)
thufir#tleilax:~$
thufir#tleilax:~$
It means the port 8080 has already been used by other process in your system.
try to run sudo lsof -i :8080 to see what process/service runs on that port and terminate it.
Another solution is to completely change the port number.
I had this kind of problem last time when installing Netbeans for second time a year ago but as far as I remember I had v2 glassfish and v3 beta (2 years ago).
What I did is to change the port number. Have a look at domain.xml (probably) and change the port number 8080 to something else (unoccupied port).

Resources