Meteor app crashes after being deployed but works on local host - node.js

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.

Related

Apache envvars issue

I am trying to migrate from Apache 2.2 on Debian 7 to Apache 2.4 on CentOS 7.
There is a file named "envvars" on Debian 7 as below which has to exist on CentOS 7 as far as I know.
# envvars - default environment variables for apache2ctl
# this won't be correct after changing uid
unset HOME
# for supporting multiple apache2 instances
if [ "${APACHE_CONFDIR##/etc/apache2-}" != "${APACHE_CONFDIR}" ] ; then
SUFFIX="-${APACHE_CONFDIR##/etc/apache2-}"
else
SUFFIX=
fi
# Since there is no sane way to get the parsed apache2 config in scripts, some
# settings are defined via environment variables and then used in apache2ctl,
# /etc/init.d/apache2, /etc/logrotate.d/apache2, etc.
export APACHE_RUN_USER=www-data
export APACHE_RUN_GROUP=www-data
export APACHE_PID_FILE=/var/run/apache2$SUFFIX.pid
export APACHE_RUN_DIR=/var/run/apache2$SUFFIX
export APACHE_LOCK_DIR=/var/lock/apache2$SUFFIX
# Only /var/log/apache2 is handled by /etc/logrotate.d/apache2.
export APACHE_LOG_DIR=/var/log/apache2$SUFFIX
I created the same file under conf where httpd.conf located but it did not work and also add the contents to /etc/sysconfig/httpd but an error stops running the apache server as below.
Jun 17 17:48:35 ww-test httpd[5707]: [Wed Jun 17 17:48:35.473658 2020] [core:warn] [pid 5707] AH00111: Config variable ${APACHE_PID_FILE} is not defined
Jun 17 17:48:35 ww-test httpd[5707]: [Wed Jun 17 17:48:35.473857 2020] [core:warn] [pid 5707] AH00111: Config variable ${APACHE_RUN_USER} is not defined
Jun 17 17:48:35 ww-test httpd[5707]: [Wed Jun 17 17:48:35.473864 2020] [core:warn] [pid 5707] AH00111: Config variable ${APACHE_RUN_GROUP} is not defined
Jun 17 17:48:35 ww-test httpd[5707]: [Wed Jun 17 17:48:35.473885 2020] [core:warn] [pid 5707] AH00111: Config variable ${APACHE_LOG_DIR} is not defined
Jun 17 17:48:35 ww-test httpd[5707]: [Wed Jun 17 17:48:35.495541 2020] [core:warn] [pid 5707] AH00111: Config variable ${APACHE_LOG_DIR} is not defined
Jun 17 17:48:35 ww-test httpd[5707]: AH00543: httpd: bad user name ${APACHE_RUN_USER}
Jun 17 17:48:35 ww-test systemd[1]: httpd.service: main process exited, code=exited, status=1/FAILURE
Jun 17 17:48:35 ww-test systemd[1]: Ignoring invalid environment assignment 'export APACHE_RUN_USER=apache': /etc/sysconfig/httpd
Jun 17 17:48:35 ww-test systemd[1]: Ignoring invalid environment assignment 'export APACHE_RUN_GROUP=apache': /etc/sysconfig/httpd
Jun 17 17:48:35 ww-test systemd[1]: Ignoring invalid environment assignment 'export APACHE_PID_FILE=/var/run/httpd$SUFFIX.pid': /etc/sysconfig/httpd
Jun 17 17:48:35 ww-test systemd[1]: Ignoring invalid environment assignment 'export APACHE_RUN_DIR=/var/run/httpd$SUFFIX': /etc/sysconfig/httpd
Jun 17 17:48:35 ww-test systemd[1]: Ignoring invalid environment assignment 'export APACHE_LOCK_DIR=/var/lock/httpd$SUFFIX': /etc/sysconfig/httpd
Jun 17 17:48:35 ww-test systemd[1]: Ignoring invalid environment assignment 'export APACHE_LOG_DIR=/var/log/httpd$SUFFIX': /etc/sysconfig/httpd
Jun 17 17:48:35 ww-test kill[5708]: kill: cannot find process ""
Jun 17 17:48:35 ww-test systemd[1]: httpd.service: control process exited, code=exited status=1
Jun 17 17:48:35 ww-test systemd[1]: Failed to start The Apache HTTP Server.
I tried source envvars to test if the environemts work but it did not.
Is there any way that I can add the environment variables so that it applies to whenever I start Apache?
Thanks!
Within httpd.conf, declare your variable(s) with: Define (Preferably at the very first line)
Define APACHE_RUN_USER Apache
You can later use this variable like so:
User ${APACHE_RUN_USER}
Refer link for more information.

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?

Deploy kubernetes cluster on Azure

I tried to create kubernetes cluster(v1.2.3) on azure with coreos cluster. I followed the documentation (http://kubernetes.io/docs/getting-started-guides/coreos/azure/)
Then I cloned the repo( git clone https://github.com/kubernetes/kubernetes). And I did a minor change in file( docs/getting-started-guides/coreos/azure/cloud_config_templates/kubernetes-cluster-main-nodes-template.yml) changed the kube version from v1.1.2 to v1.2.3.
And then I created the cluster by running the file(./create-kubernetes-cluster.js), cluster is successfully created for me. But in master node API server didn't get started..
I checked the log it was showing - Cloud provider could not be initialized: unknown cloud provider "vagrant".. I could not catch why this issue was coming..
This is my Log of -> kube-apiserver.service
-- Logs begin at Sat 2016-07-23 12:41:36 UTC, end at Sat 2016-07-23 12:44:19 UTC. --
Jul 23 12:43:06 anudemon-master-00 systemd[1]: Started Kubernetes API Server.
Jul 23 12:43:06 anudemon-master-00 kube-apiserver[1964]: I0723 12:43:06.299966 1964 server.go:188] Will report 172.16.0.4 as public IP address.
Jul 23 12:43:06 anudemon-master-00 kube-apiserver[1964]: F0723 12:43:06.300057 1964 server.go:211] Cloud provider could not be initialized: unknown cloud provider "vagrant"
Jul 23 12:43:06 anudemon-master-00 systemd[1]: kube-apiserver.service: Main process exited, code=exited, status=255/n/a
Jul 23 12:43:06 anudemon-master-00 systemd[1]: kube-apiserver.service: Unit entered failed state.
Jul 23 12:43:06 anudemon-master-00 systemd[1]: kube-apiserver.service: Failed with result 'exit-code'.
Jul 23 12:43:16 anudemon-master-00 systemd[1]: kube-apiserver.service: Service hold-off time over, scheduling restart.
Jul 23 12:43:16 anudemon-master-00 systemd[1]: Stopped Kubernetes API Server.
Jul 23 12:43:16 anudemon-master-00 kube-apiserver[2015]: I0723 12:43:16.428476 2015 server.go:188] Will report 172.16.0.4 as public IP address.
Jul 23 12:43:16 anudemon-master-00 kube-apiserver[2015]: F0723 12:43:16.428534 2015 server.go:211] Cloud provider could not be initialized: unknown cloud provider "vagrant"
Jul 23 12:43:16 anudemon-master-00 systemd[1]: Started Kubernetes API Server.
Jul 23 12:43:16 anudemon-master-00 systemd[1]: kube-apiserver.service: Main process exited, code=exited, status=255/n/a
Jul 23 12:43:16 anudemon-master-00 systemd[1]: kube-apiserver.service: Unit entered failed state.
Jul 23 12:43:16 anudemon-master-00 systemd[1]: kube-apiserver.service: Failed with result 'exit-code'.
Jul 23 12:43:26 anudemon-master-00 systemd[1]: kube-apiserver.service: Service hold-off time over, scheduling restart.
Jul 23 12:43:26 anudemon-master-00 systemd[1]: Stopped Kubernetes API Server.
Jul 23 12:43:26 anudemon-master-00 systemd[1]: Started Kubernetes API Server.
Jul 23 12:43:26 anudemon-master-00 kube-apiserver[2024]: I0723 12:43:26.756551 2024 server.go:188] Will report 172.16.0.4 as public IP address.
Jul 23 12:43:26 anudemon-master-00 kube-apiserver[2024]: F0723 12:43:26.756654 2024 server.go:211] Cloud provider could not be initialized: unknown cloud provider "vagrant"
Jul 23 12:43:26 anudemon-master-00 systemd[1]: kube-apiserver.service: Main process exited, code=exited, status=255/n/a
Jul 23 12:43:26 anudemon-master-00 systemd[1]: kube-apiserver.service: Unit entered failed state.
Jul 23 12:43:26 anudemon-master-00 systemd[1]: kube-apiserver.service: Failed with result 'exit-code'.
Jul 23 12:43:36 anudemon-master-00 systemd[1]: kube-apiserver.service: Service hold-off time over, scheduling restart.
Jul 23 12:43:36 anudemon-master-00 systemd[1]: Stopped Kubernetes API Server.
Jul 23 12:43:36 anudemon-master-00 systemd[1]: Started Kubernetes API Server.
Jul 23 12:43:36 anudemon-master-00 kube-apiserver[2039]: I0723 12:43:36.872849 2039 server.go:188] Will report 172.16.0.4 as public IP address.
Have you had a look at kuberenetes-anywhere (https://github.com/kubernetes/kubernetes-anywhere)? Much work has been done there and now probably has all the right bits to deploy out your cluster with Azure specific cloud provider integrations.

Connect to an OpenVPN server from an Azure Cloud Service client

I have a few machines on my office that can connect to a server that uses OpenVPN (UDP), given its .ovpn file. I'm also able to connect to that same server from my personal computer, which is in another network. I'm also able to connect to that server from a clean Azure VM running Windows Server 2012, that I just created to test this. But I haven't been able to connect to that same server (same .ovpn file) from a machine that is hosting an Azure Cloud Service.
The Azure Cloud Service was created with the default network configurations, InputEndpoints on ports 443(TCP) and 1194(UDP), and I added firewall exceptions that allowed any connections to UDP and TCP ports.
Yet, when I try to connect to the OpenVPN server from the Azure VM I get the message:
TLS Error: TLS key negotiation failed to occur within 60 seconds
(check your network connectivity)
Is there any configuration other than the firewall exceptions that I should add to the cloud service so that it will enable me to connect to an OpenVPN server that uses UDP?
Below is the full log:
PS C:\config\config> openvpn .\client.ovpn
Fri Jul 22 15:32:55 2016 Option 'nobind' in .\client.ovpn:46 is ignored by previous <connection> blocks
Fri Jul 22 15:32:55 2016 us=764333 Current Parameter Settings:
Fri Jul 22 15:32:55 2016 us=764333 config = '.\client.ovpn'
Fri Jul 22 15:32:55 2016 us=764333 mode = 0
Fri Jul 22 15:32:55 2016 us=764333 show_ciphers = DISABLED
Fri Jul 22 15:32:55 2016 us=764333 show_digests = DISABLED
Fri Jul 22 15:32:55 2016 us=764333 show_engines = DISABLED
Fri Jul 22 15:32:55 2016 us=764333 genkey = DISABLED
Fri Jul 22 15:32:55 2016 us=764333 key_pass_file = '[UNDEF]'
Fri Jul 22 15:32:55 2016 us=764333 show_tls_ciphers = DISABLED
Fri Jul 22 15:32:55 2016 us=764333 Connection profiles [default]:
Fri Jul 22 15:32:55 2016 us=764333 proto = udp
Fri Jul 22 15:32:55 2016 us=764333 local = '[UNDEF]'
Fri Jul 22 15:32:55 2016 us=764333 local_port = 1194
Fri Jul 22 15:32:55 2016 us=764333 remote = '[UNDEF]'
Fri Jul 22 15:32:55 2016 us=764333 remote_port = 1194
Fri Jul 22 15:32:55 2016 us=764333 remote_float = DISABLED
Fri Jul 22 15:32:55 2016 us=764333 bind_defined = DISABLED
Fri Jul 22 15:32:55 2016 us=795589 bind_local = DISABLED
Fri Jul 22 15:32:55 2016 us=795589 connect_retry_seconds = 5
Fri Jul 22 15:32:55 2016 us=795589 connect_timeout = 10
Fri Jul 22 15:32:55 2016 us=795589 NOTE: --mute triggered...
Fri Jul 22 15:32:55 2016 us=795589 618 variation(s) on previous 20 message(s) suppressed by --mute
Fri Jul 22 15:32:55 2016 us=795589 OpenVPN 2.3.10 x86_64-w64-mingw32 [SSL (OpenSSL)] [LZO] [PKCS11] [IPv6] built on Jan
4 2016
Fri Jul 22 15:32:55 2016 us=795589 Windows version 6.2 (Windows 8 or greater)
Fri Jul 22 15:32:55 2016 us=795589 library versions: OpenSSL 1.0.1q 3 Dec 2015, LZO 2.09
Fri Jul 22 15:32:55 2016 us=983250 Control Channel Authentication: using 'engSimaTef.key' as a OpenVPN static key file
Fri Jul 22 15:32:56 2016 us=3179 Outgoing Control Channel Authentication: Using 512 bit message hash 'SHA512' for HMAC a
uthentication
Fri Jul 22 15:32:56 2016 us=3179 Incoming Control Channel Authentication: Using 512 bit message hash 'SHA512' for HMAC a
uthentication
Fri Jul 22 15:32:56 2016 us=14347 LZO compression initialized
Fri Jul 22 15:32:56 2016 us=14347 Control Channel MTU parms [ L:1602 D:1140 EF:110 EB:0 ET:0 EL:3 ]
Fri Jul 22 15:32:56 2016 us=14347 Socket Buffers: R=[65536->65536] S=[65536->65536]
Fri Jul 22 15:32:56 2016 us=168985 Data Channel MTU parms [ L:1602 D:1450 EF:102 EB:143 ET:0 EL:3 AF:3/1 ]
Fri Jul 22 15:32:56 2016 us=168985 Local Options String: 'V4,dev-type tun,link-mtu 1602,tun-mtu 1500,proto UDPv4,comp-lz
o,keydir 1,cipher AES-256-CBC,auth SHA512,keysize 256,tls-auth,key-method 2,tls-client'
Fri Jul 22 15:32:56 2016 us=168985 Expected Remote Options String: 'V4,dev-type tun,link-mtu 1602,tun-mtu 1500,proto UDP
v4,comp-lzo,keydir 0,cipher AES-256-CBC,auth SHA512,keysize 256,tls-auth,key-method 2,tls-server'
Fri Jul 22 15:32:56 2016 us=168985 Local Options hash (VER=V4): 'a5d50645'
Fri Jul 22 15:32:56 2016 us=168985 Expected Remote Options hash (VER=V4): '14d315e7'
Fri Jul 22 15:32:56 2016 us=168985 UDPv4 link local: [undef]
Fri Jul 22 15:32:56 2016 us=184587 UDPv4 link remote: [AF_INET][[SOME_HIDDEN_IP]]:10055
Fri Jul 22 15:32:56 2016 us=184587 UDPv4 WRITE [86] to [AF_INET][[SOME_HIDDEN_IP]]:10055: P_CONTROL_HARD_RESET_CLIENT_V2 ki
d=0 pid=[ #1 ] [ ] pid=0 DATA len=0
Fri Jul 22 15:32:56 2016 us=184587 UDPv4 READ [0] from [undef]: DATA UNDEF len=-1
Fri Jul 22 15:32:58 2016 us=558842 UDPv4 WRITE [86] to [AF_INET][[SOME_HIDDEN_IP]]:10055: P_CONTROL_HARD_RESET_CLIENT_V2 ki
d=0 pid=[ #2 ] [ ] pid=0 DATA len=0
Fri Jul 22 15:33:02 2016 us=785774 UDPv4 WRITE [86] to [AF_INET][[SOME_HIDDEN_IP]]:10055: P_CONTROL_HARD_RESET_CLIENT_V2 ki
d=0 pid=[ #3 ] [ ] pid=0 DATA len=0
Fri Jul 22 15:33:11 2016 us=85405 UDPv4 WRITE [86] to [AF_INET][[SOME_HIDDEN_IP]]:10055: P_CONTROL_HARD_RESET_CLIENT_V2 kid
=0 pid=[ #4 ] [ ] pid=0 DATA len=0
Fri Jul 22 15:33:27 2016 us=873602 UDPv4 WRITE [86] to [AF_INET][[SOME_HIDDEN_IP]]:10055: P_CONTROL_HARD_RESET_CLIENT_V2 ki
d=0 pid=[ #5 ] [ ] pid=0 DATA len=0
Fri Jul 22 15:33:57 2016 us=129612 TLS Error: TLS key negotiation failed to occur within 60 seconds (check your network
connectivity)
Fri Jul 22 15:33:57 2016 us=129612 TLS Error: TLS handshake failed
Fri Jul 22 15:33:57 2016 us=129612 TCP/UDP: Closing socket
Fri Jul 22 15:33:57 2016 us=129612 SIGUSR1[soft,tls-error] received, process restarting
Fri Jul 22 15:33:57 2016 us=129612 Restart pause, 2 second(s)
Fri Jul 22 15:33:59 2016 us=148186 Re-using SSL/TLS context
Fri Jul 22 15:33:59 2016 us=148186 LZO compression initialized
...
The error is telling that OpenVPN tried to connect to the host
WRITE [86] to [AF_INET][[SOME_HIDDEN_IP]]:10055: P_CONTROL_HARD_RESET_CLIENT_V2 ki d=0 pid=[ #1 ] [ ] pid=0 DATA len=0
but has not recieved any answer:
UDPv4 READ [0] from [undef]: DATA UNDEF len=-1
After the trial of 5 times the client stops to try to connect:
TLS Error: TLS key negotiation failed to occur within 60 seconds (check your network connectivity)
The process stops in the first activity waiting for the reply:
(source: staticworld.net)
In those cases it is likely to have a connectivity problem. In the past I had the same problem once the problem was not enabled the required ports. (Take a look at both outgoing and incoming firevall rules.) An another problem could be that the server is not running or is not reachable.
TLDR: check out (VPN) service availability and firewall rules. In extreme cases there could be routing problems at the ISP (happend to a friend of mine) in this case you should report the problem to them and they will fix it.

"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