Increasing size of .next directory - node.js

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

Related

Mongodb service fails after reboot

I am trying to setup a replicaset for my dev environment, and have three machines running debian 9.3 stretch with a mongod service. The replicaset is working, and all seems okay.
But when I reboot one of the servers the mongod service doesn't come up. When I check the status it says it failed status=48
mongod.service - MongoDB Database Server
Loaded: loaded (/lib/systemd/system/mongod.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Tue 2018-08-28 22:17:37 CEST; 10s ago
Docs: https://docs.mongodb.org/manual
Process: 392 ExecStart=/usr/bin/mongod --config /etc/mongod.conf (code=exited, status=48)
Main PID: 392 (code=exited, status=48)
CPU: 33ms
aug 28 22:17:37 staging-manager-1 systemd[1]: Started MongoDB Database Server.
aug 28 22:17:37 staging-manager-1 mongod[392]: 2018-08-28T22:17:37.389+0200 I CONTROL [main] Automatically disabling TLS 1.0, to fo
aug 28 22:17:37 staging-manager-1 systemd[1]: mongod.service: Main process exited, code=exited, status=48/n/a
aug 28 22:17:37 staging-manager-1 systemd[1]: mongod.service: Unit entered failed state.
aug 28 22:17:37 staging-manager-1 systemd[1]: mongod.service: Failed with result 'exit-code'.
I already enabled the service with systemctl enable mongod and in the status I can see that it is indeed enabled, but why does it fail after I reboot the machine?
update:
root#machine:/home/<user># journalctl -u mongod
-- Logs begin at Thu 2018-08-30 21:11:33 CEST, end at Thu 2018-08-30 21:26:42 CEST. --
aug 30 21:11:33 staging-manager-1 systemd[1]: Started MongoDB Database Server.
aug 30 21:11:33 staging-manager-1 mongod[398]: 2018-08-30T21:11:33.388+0200 I CONTROL [main] Automatically disabling TLS 1.0, to force-enable TLS 1.0 specify --sslDisabledProtocols 'none'
aug 30 21:11:33 staging-manager-1 systemd[1]: mongod.service: Main process exited, code=exited, status=48/n/a
aug 30 21:11:33 staging-manager-1 systemd[1]: mongod.service: Unit entered failed state.
aug 30 21:11:33 staging-manager-1 systemd[1]: mongod.service: Failed with result 'exit-code'.
root#machine:/home/<user># ll /etc/init
total 48
-rw-r--r-- 1 root root 278 mei 29 2017 anacron.conf
-rw-r--r-- 1 root root 1875 jul 18 21:01 docker.conf
-rw-r--r-- 1 root root 2493 jun 2 2015 networking.conf
-rw-r--r-- 1 root root 933 jun 2 2015 network-interface.conf
-rw-r--r-- 1 root root 530 jun 2 2015 network-interface-container.conf
-rw-r--r-- 1 root root 1756 jun 2 2015 network-interface-security.conf
-rw-r--r-- 1 root root 1359 mrt 14 2017 sddm.conf
-rw-r--r-- 1 root root 637 mrt 1 13:36 ssh.conf
-rw-r--r-- 1 root root 337 jun 13 22:20 udev.conf
-rw-r--r-- 1 root root 360 jun 13 22:20 udevmonitor.conf
-rw-r--r-- 1 root root 352 jun 13 22:20 udevtrigger.conf
-rw-r--r-- 1 root root 138 jan 23 2017 usb-modeswitch-upstart.conf
root#machine:/home/<user># ll /etc/init.d
total 168
-rwxr-xr-x 1 root root 5336 feb 1 2016 alsa-utils
-rwxr-xr-x 1 root root 2014 mei 29 2017 anacron
-rwxr-xr-x 1 root root 8181 apr 5 20:32 apache2
-rwxr-xr-x 1 root root 2489 mei 13 18:52 apache-htcacheclean
-rwxr-xr-x 1 root root 2401 jan 23 2017 avahi-daemon
-rwxr-xr-x 1 root root 2948 sep 13 2017 bluetooth
-rwxr-xr-x 1 root root 1904 nov 18 2015 cgroupfs-mount
-rwxr-xr-x 1 root root 1232 apr 7 2017 console-setup.sh
-rwxr-xr-x 1 root root 3049 okt 7 2017 cron
-rwxr-xr-x 1 root root 2816 jul 10 15:57 cups
-rwxr-xr-x 1 root root 1961 jan 19 2017 cups-browsed
-rwxr-xr-x 1 root root 2813 mrt 2 09:59 dbus
-rwxr-xr-x 1 root root 3843 jul 18 21:01 docker
-rwxr-x--- 1 root root 4285 jul 20 07:27 elasticsearch
-rwxr-xr-x 1 root root 3033 aug 9 21:30 gdm3
-rwxr-xr-x 1 root root 1604 feb 2 2017 gdomap
-rwxr-xr-x 1 root root 3809 mrt 7 19:29 hwclock.sh
-rwxr-xr-x 1 root root 1479 mei 19 2016 keyboard-setup.sh
-rwxr-xr-x 1 root root 2044 dec 26 2016 kmod
-rwxr-xr-x 1 root root 2241 apr 26 2017 minissdpd
-rwxr-xr-x 1 root root 4597 sep 16 2016 networking
-rwxr-xr-x 1 root root 1757 mrt 18 2017 network-manager
-rwxr-xr-x 1 root root 612 dec 4 2015 pppd-dns
-rwxr-xr-x 1 root root 1191 mei 17 12:56 procps
-rwxr-xr-x 1 root root 4355 dec 10 2017 rsync
-rwxr-xr-x 1 root root 2868 jan 18 2017 rsyslog
-rwxr-xr-x 1 root root 2330 mei 21 2017 saned
-rwxr-xr-x 1 root root 1222 apr 3 2017 screen-cleanup
-rwxr-xr-x 1 root root 1808 mrt 14 2017 sddm
-rwxr-xr-x 1 root root 2117 aug 2 2017 speech-dispatcher
-rwxr-xr-x 1 root root 2484 okt 12 2016 spice-vdagent
-rwxr-xr-x 1 root root 4033 mrt 1 13:36 ssh
-rwxr-xr-x 1 root root 731 jun 5 2017 sudo
-rwxr-xr-x 1 root root 6087 jun 13 22:20 udev
-rwxr-xr-x 1 root root 1391 mei 6 2017 unattended-upgrades
-rwxr-xr-x 1 root root 2757 nov 23 2016 x11-common
That is the whole output message?
Check if the default mongod port(27017) is not in use.
netstat -a
Or try starting in a different port
mongod --fork --port 8000
MongoDB defines exit code 48 as: "A newly started mongod or mongos could not start listening for incoming connections, due to an error."
You have pasted just the status output for the MongoDB service. For the full logs of a service on a systemd based system, you should review the systemd journal output:
journalctl -u mongod
As Lucca suggested, the problem may be something else is already running on the port when you are trying to start.
Check that you are't also trying to start MongoDB via Upstart or SysVInit by looking for MongoDB files in /etc/init and /etc/init.d. If any are found, move them somewhere else so that only the systemd service file is being used to start the service.
a#a-57:~$ sudo systemctl stop mongod.service
a#a-57:~$ sudo systemctl start mongod.service
a#a-57:~$ sudo systemctl status mongod.service
● mongod.service - MongoDB Database Server
Loaded: loaded (/lib/systemd/system/mongod.service; enabled; vendor preset: enabled)
Active: active (running) since Mon 2021-08-09 16:38:29 CST; 6s ago
Docs: https://docs.mongodb.org/manual
Main PID: 2205 (mongod)
CGroup: /system.slice/mongod.service
└─2205 /usr/bin/mongod --config /etc/mongod.conf
八 09 16:38:29 a-57 systemd[1]: Started MongoDB Database Server.
Somehow it's dangerous to edit the rc files under /etc in these modern days. And people would prefer to use system command API as we knew.
You need to edit etc/rc.local in order for it to start on boot up
Just add service mongod start to end of the rc.local file

MongoDB on Raspberry Pi fails to load

I just installed Mongodb on my Raspberry Pi 3 using the regular sudo apt install mongodb, which gave no errors. I then checked the status:
$ sudo service mongodb status
● mongodb.service - An object/document-oriented database
Loaded: loaded (/lib/systemd/system/mongodb.service; enabled)
Active: failed (Result: exit-code) since Fri 2017-02-17 08:53:47 UTC; 5s ago
Docs: man:mongod(1)
Process: 11569 ExecStart=/usr/bin/mongod --config /etc/mongodb.conf (code=exited, status=14)
Main PID: 11569 (code=exited, status=14)
Feb 17 08:53:47 raspberrypi mongod[11569]: /usr/lib/arm-linux-gnueabihf/libstdc++.so.6(+0x4a9a0) [0x7680e9a0]
Feb 17 08:53:47 raspberrypi mongod[11569]: Fri Feb 17 08:53:47.612 Got signal: 6 (Aborted).
Feb 17 08:53:47 raspberrypi mongod[11569]: Fri Feb 17 08:53:47.613 Backtrace:
Feb 17 08:53:47 raspberrypi mongod[11569]: 0x664160 0x16e370 0x765e2180 0x765e0f70
Feb 17 08:53:47 raspberrypi mongod[11569]: /usr/bin/mongod(_ZN5mongo15printStackTraceERSo+0x1c) [0x664160]
Feb 17 08:53:47 raspberrypi mongod[11569]: /usr/bin/mongod(_ZN5mongo10abruptQuitEi+0x2a0) [0x16e370]
Feb 17 08:53:47 raspberrypi mongod[11569]: /lib/arm-linux-gnueabihf/libc.so.6(__default_sa_restorer_v2+0) [0x765e2180]
Feb 17 08:53:47 raspberrypi mongod[11569]: /lib/arm-linux-gnueabihf/libc.so.6(gsignal+0x38) [0x765e0f70]
Feb 17 08:53:47 raspberrypi systemd[1]: mongodb.service: main process exited, code=exited, status=14/n/a
Feb 17 08:53:47 raspberrypi systemd[1]: Unit mongodb.service entered failed state.
And I tried starting it with sudo service mongodb start, but in the logs (using sudo journalctl -f) I only get this:
Feb 17 08:53:58 raspberrypi sudo[11586]: pi : TTY=pts/0 ; PWD=/usr/share/elasticsearch/bin ; USER=root ; COMMAND=/usr/sbin/service mongodb start
Feb 17 08:53:58 raspberrypi sudo[11586]: pam_unix(sudo:session): session opened for user root by pi(uid=0)
Feb 17 08:53:59 raspberrypi systemd[1]: Starting An object/document-oriented database...
Feb 17 08:53:59 raspberrypi systemd[1]: Started An object/document-oriented database.
Feb 17 08:53:59 raspberrypi sudo[11586]: pam_unix(sudo:session): session closed for user root
Feb 17 08:53:59 raspberrypi mongod[11608]: Fri Feb 17 08:53:59.391 terminate() called, printing stack (if implemented for platform):
Feb 17 08:53:59 raspberrypi mongod[11608]: 0x664160 0x16d954 0x768649a0
Feb 17 08:53:59 raspberrypi mongod[11608]: /usr/bin/mongod(_ZN5mongo15printStackTraceERSo+0x1c) [0x664160]
Feb 17 08:53:59 raspberrypi mongod[11608]: /usr/bin/mongod(_ZN5mongo11myterminateEv+0x54) [0x16d954]
Feb 17 08:53:59 raspberrypi mongod[11608]: /usr/lib/arm-linux-gnueabihf/libstdc++.so.6(+0x4a9a0) [0x768649a0]
Feb 17 08:53:59 raspberrypi mongod[11608]: Fri Feb 17 08:53:59.393 Got signal: 6 (Aborted).
Feb 17 08:53:59 raspberrypi mongod[11608]: Fri Feb 17 08:53:59.394 Backtrace:
Feb 17 08:53:59 raspberrypi mongod[11608]: 0x664160 0x16e370 0x76638180 0x76636f70
Feb 17 08:53:59 raspberrypi mongod[11608]: /usr/bin/mongod(_ZN5mongo15printStackTraceERSo+0x1c) [0x664160]
Feb 17 08:53:59 raspberrypi mongod[11608]: /usr/bin/mongod(_ZN5mongo10abruptQuitEi+0x2a0) [0x16e370]
Feb 17 08:53:59 raspberrypi mongod[11608]: /lib/arm-linux-gnueabihf/libc.so.6(__default_sa_restorer_v2+0) [0x76638180]
Feb 17 08:53:59 raspberrypi mongod[11608]: /lib/arm-linux-gnueabihf/libc.so.6(gsignal+0x38) [0x76636f70]
Feb 17 08:53:59 raspberrypi systemd[1]: mongodb.service: main process exited, code=exited, status=14/n/a
Feb 17 08:53:59 raspberrypi systemd[1]: Unit mongodb.service entered failed state.
I don't really understand these errors. Does anybody else know what's going on?

Meteor app crashes after being deployed but works on local host

I deployed my meteor app to a .meteor.com server and it states that it is crashing. However, the site works fine on my local machine. Here are the logs:
[Tue Mar 17 2015 20:58:58 GMT+0000 (UTC)] NOTICE Starting application on port
25107
[Tue Mar 17 2015 20:58:58 GMT+0000 (UTC)] INFO STATUS null -> starting
[Tue Mar 17 2015 20:58:58 GMT+0000 (UTC)] INFO STATUS killed -> sleeping
[Tue Mar 17 2015 20:58:58 GMT+0000 (UTC)] INFO STATUS starting -> killed
[Tue Mar 17 2015 20:58:58 GMT+0000 (UTC)] NOTICE Starting application on port
9393
[Tue Mar 17 2015 20:58:58 GMT+0000 (UTC)] INFO STATUS null -> starting
[Tue Mar 17 2015 20:58:59 GMT+0000 (UTC)] INFO STATUS starting -> crashed
[Tue Mar 17 2015 20:59:31 GMT+0000 (UTC)] INFO HIT / 174.100.99.102
[Tue Mar 17 2015 20:59:37 GMT+0000 (UTC)] INFO HIT / 174.100.99.102
[Tue Mar 17 2015 20:59:37 GMT+0000 (UTC)] INFO HIT /favicon.ico 174.100.99.102
[Tue Mar 17 2015 20:59:43 GMT+0000 (UTC)] INFO HIT /favicon.ico 174.100.99.102
[Tue Mar 17 2015 20:59:53 GMT+0000 (UTC)] INFO HIT /_GALAXY_ 174.100.99.102
[Tue Mar 17 2015 20:59:59 GMT+0000 (UTC)] INFO HIT /_GALAXY_ 174.100.99.102
Ok,
I forgot to comment out the email package code and remove the test key.
Once I did that it deployed fine.

Pass private key password to openvpn command directly in Ubuntu 10.10 [closed]

Closed. This question does not meet Stack Overflow guidelines. 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 5 years ago.
Improve this question
I tried the method with different parameter
I have password.
Here below password is mypassword
1)
root$ echo mypassword || openvpn client.conf.ovpn
the result was display:
mypassword
2)
root$ openvpn client.warriors.conf.ovpn || echo mypassword
the result was display:
Thu Jun 28 00:00:00 2012 us=757575 NOTE: OpenVPN 2.1 requires '--script-security 2' or higher to call user-defined scripts or executables
Enter Private Key Password:
(still need to enter password manualy )
I don't want to have to enter the password manually. How can I achieve this?
3)
DUDE
After running the script it exit out with following:
Fri Jun 29 11:56:59 2012 us=707916 cf_max = 0
Fri Jun 29 11:56:59 2012 us=707925 cf_per = 0
Fri Jun 29 11:56:59 2012 us=707934 max_clients = 1024
Fri Jun 29 11:56:59 2012 us=707944 max_routes_per_client = 256
Fri Jun 29 11:56:59 2012 us=707953 auth_user_pass_verify_script = '[UNDEF]'
Fri Jun 29 11:56:59 2012 us=707963 auth_user_pass_verify_script_via_file = DISABLED
Fri Jun 29 11:56:59 2012 us=707973 ssl_flags = 0
Fri Jun 29 11:56:59 2012 us=707982 port_share_host = '[UNDEF]'
Fri Jun 29 11:56:59 2012 us=707992 port_share_port = 0
Fri Jun 29 11:56:59 2012 us=708001 client = ENABLED
Fri Jun 29 11:56:59 2012 us=708010 pull = ENABLED
Fri Jun 29 11:56:59 2012 us=708020 auth_user_pass_file = '[UNDEF]'
Fri Jun 29 11:56:59 2012 us=708032 OpenVPN 2.1.0 i686-pc-linux-gnu [SSL] [LZO2] [EPOLL] [PKCS11] [MH] [PF_INET6] [eurephia] built on Jul 12 2010
Fri Jun 29 11:56:59 2012 us=708131 NOTE: OpenVPN 2.1 requires '--script-security 2' or higher to call user-defined scripts or executables
Enter Private Key Password:
Fri Jun 29 11:56:59 2012 us=726649 WARNING: this configuration may cache passwords in memory -- use the auth-nocache option to prevent this
Fri Jun 29 11:56:59 2012 us=726805 WARNING: file 'client-team-20110222.key' is group or others accessible
Fri Jun 29 11:56:59 2012 us=727136 /usr/bin/openssl-vulnkey -q -b 1024 -m <modulus omitted>
Fri Jun 29 11:56:59 2012 us=875611 Control Channel MTU parms [ L:1543 D:140 EF:40 EB:0 ET:0 EL:0 ]
Fri Jun 29 11:56:59 2012 us=876742 Data Channel MTU parms [ L:1543 D:1450 EF:43 EB:4 ET:0 EL:0 ]
Fri Jun 29 11:56:59 2012 us=876777 Local Options String: 'V4,dev-type tun,link-mtu 1543,tun-mtu 1500,proto TCPv4_CLIENT,cipher BF-CBC,auth SHA1,keysize 128,key-method 2,tls-client'
Fri Jun 29 11:56:59 2012 us=876788 Expected Remote Options String: 'V4,dev-type tun,link-mtu 1543,tun-mtu 1500,proto TCPv4_SERVER,cipher BF-CBC,auth SHA1,keysize 128,key-method 2,tls-server'
Fri Jun 29 11:56:59 2012 us=876810 Local Options hash (VER=V4): 'd902a8f8'
Fri Jun 29 11:56:59 2012 us=876825 Expected Remote Options hash (VER=V4): '7e078940'
Fri Jun 29 11:56:59 2012 us=877124 NOTE: UID/GID downgrade will be delayed because of --client, --pull, or --up-delay
Fri Jun 29 11:56:59 2012 us=877145 Attempting to establish TCP connection with [AF_INET]89.105.130.193:444 [nonblock]
Fri Jun 29 11:57:00 2012 us=877280 TCP connection established with [AF_INET]89.105.130.193:444
Fri Jun 29 11:57:00 2012 us=877337 Socket Buffers: R=[87380->131072] S=[16384->131072]
Fri Jun 29 11:57:00 2012 us=877353 TCPv4_CLIENT link local: [undef]
Fri Jun 29 11:57:00 2012 us=877364 TCPv4_CLIENT link remote: [AF_INET]89.105.130.193:444
Fri Jun 29 11:57:00 2012 us=877568 TLS: Initial packet from [AF_INET]89.105.130.193:444, sid=c5d843bc e9f3e6ab
Fri Jun 29 11:57:04 2012 us=105788 VERIFY OK: depth=1, /C=IE/ST=NA/L=DUB/O=ABC.OpenVPN/OU=server-terminus/CN=terminus/emailAddress=ops#abc.com
Fri Jun 29 11:57:04 2012 us=106189 VERIFY OK: nsCertType=SERVER
Fri Jun 29 11:57:04 2012 us=106202 VERIFY OK: depth=0, /C=IE/ST=NA/O=abc.OpenVPN/OU=server-terminus/CN=terminus/emailAddress=ops#abc.com
root#bond$
exit in this way is it normal.
In my openvpn.conf:
...
askpass /etc/openvpn/jdoe.pass <<< new line here
ca /etc/openvpn/jdoe_ca.crt
cert /etc/openvpn/jdoe.crt
key /etc/openvpn/jdoe.key
...
The file /etc/openvpn/jdoe.pass just contains the password.
You can chmod this file to 600.
This method save my life... ;-)
Ubuntu 12.04.4 LTS
OpenVPN 2.2.1 x86_64-linux-gnu [SSL] [LZO2] [EPOLL] [PKCS11] [eurephia] [MH] [PF_INET6] [IPv6 payload 20110424-2 (2.2RC2)] built on Mar 13 2014
How about storing it into a file and using --askpass /your/file? --askpass option was added in OpenVPN version 2.0-beta20, Maverick has version 2.1.0-3ubuntu1.
Try a shell script such as:
#!/usr/bin/expect -f
spawn openvpn client.warriors.conf.open
match_max 100000
expect "*?assword:*"
send -- "mypassword"
send -- "\r"
expect eof
You'll need to chmod +x this, you can also set it as an environment variable so you don't have to type out the directory.
Looks like they got this script to work: https://unix.stackexchange.com/questions/9055/establish-openvpn-tunnel-in-bash-script
I think you just swipe | and || operator.
| plug standard output o the previous command to standard input of the next command.
|| launch second command only if first command fail (exit code != 0).
this command should work.
root$ echo mypassword | openvpn client.conf.ovpn

"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