The Source for Java Technology Collaboration

Home » java.net Forums » GlassFish » GlassFish

Thread: Glassfish v2 on Mac OS X 10.5 Leopard

Welcome, Guest Help
Login Login
Guest Settings Guest Settings
This question is answered.

Reply to this Thread Reply to this Thread Search Forum Search Forum Back to Thread List Back to Thread List

Permlink Replies: 34 - Last Post: Dec 5, 2008 7:05 PM by: mike767
arjunlall

Posts: 19
Glassfish v2 on Mac OS X 10.5 Leopard
Posted: Oct 29, 2007 1:20 PM
 
  Click to reply to this thread Reply

I have been using glassfish for a few months on my mac running 10.4 Tiger with no problems.

Just yesterday I did up upgrade install to Leopard on my machine. After discovering problems starting glassfish after the upgrade I removed my old glassfish install (actually just renamed the directory) and installed glassfish fresh.

The new, clean version of glassfish still would not start properly. However, I discovered that when I am plugged into ethernet on en0 it will work. (When I am not plugged in my computer runs off wireless on en1.)

The culprit seems to be that glassfish thinks my local ip is a 169.254.x.x IP when my ethernet is disconnected even though I have a valid IP on wireless. When its plugged in it resolves my IP without a problem.

1) Is this a bug in glassfish or Leopard?
2) Why doesnt glassfish use localhost?
3) Can I change glassfish to use localhost by default, or change which interface it gets the ip from?

Here is a snippet from my log the seems to pinpoint the problem (I will post my full log in a reply):

"Cannot bind to URL [rmi://169.254.161.207:8686/management/rmi-jmx-connector]"

the full line:

[#|2007-10-29T15:28:48.086-0400|SEVERE|sun-appserver9.1|javax.enterprise.system.core|_ThreadID=10; _ThreadName=main;com.sun.enterprise.admin.server.core.JmxConnectorLifecycle@328cbf;com.sun.appserv.server.ServerLifecycleException: Cannot bind to URL [rmi://169.254.161.207:8686/management/rmi-jmx-connector]: javax.naming.ServiceUnavailableException [Root exception is java.rmi.ConnectException: Connection refused to host: 169.254.161.207; nested exception is:
java.net.ConnectException: Operation timed out];_RequestID=69db80be-8146-46bb-a879-157fedee2f87;|Service com.sun.enterprise.admin.server.core.JmxConnectorLifecycle@328cbf cannot be started! : com.sun.appserv.server.ServerLifecycleException: Cannot bind to URL [rmi://169.254.161.207:8686/management/rmi-jmx-connector]: javax.naming.ServiceUnavailableException [Root exception is java.rmi.ConnectException: Connection refused to host: 169.254.161.207; nested exception is:
java.net.ConnectException: Operation timed out]|#]


Any help would be thoroughly appreciated.

Message was edited by: arjunlall

Message was edited by: arjunlall

Jeanfrancois Ar...
Re: Glassfish v2g on Mac 10.5 Leopard
Posted: Oct 29, 2007 1:20 PM   in response to: arjunlall
  Click to reply to this thread Reply

Hi,

I'm just curious. If you add, in domain.xml,

<jvm-options>-Dcom.sun.enterprise.server.ss.ASQuickStartup=false</jvm-options>

Does it make a difference?

glassfish@javadesktop.org wrote:
> I have been using glassfish for a few months on my mac running 10.4 Tiger with no problems.
>
> Just yesterday I did up upgrade install to Leopard on my machine. After discovering problems starting glassfish after the upgrade I removed my old glassfish install (actually just renamed the directory) and installed glassfish fresh.
>
> The new, clean version of glassfish still would not start properly. However, I discovered that when I am plugged into ethernet on en0 it will work. (When I am not plugged in my computer runs off wireless on en1.)
>
> The culprit seems to be that glassfish thinks my local ip is a 169.254.x.x IP when my ethernet is disconnected even though I have a valid IP on wireless. When its plugged in it resolves my IP without a problem.
>
> 1) Is this a bug in glassfish or Leopard?
> 2) Why doesnt glassfish use localhost?
> 3) Can I change glassfish to use localhost by default, or change which interface it gets the ip from?

yes you can edit (or use admin gui) the listener's address (in your case
the jmx-connector) attribute and put your ip directly. As an example,
the http-listener looks like:

> <http-listener acceptor-threads="1" address="0.0.0.0" blocking-enabled="false" default-virtual-server="server" enabled="true" family="inet" i
> d="http-listener-1" port="8080" security-enabled="false" server-name="" xpowered-by="true">

the jmx connector looks like:

> <jmx-connector accept-all="false" address="0.0.0.0" auth-realm-name="admin-realm" enabled="true" name="system" port="8686" protocol="rmi_jrmp
> " security-enabled="false">

Hope that help.

-- Jeanfrancois

>
> Here is a snippet from my log the seems to pinpoint the problem (I will post my full log in a reply):
>
> "Cannot bind to URL [rmi://169.254.161.207:8686/management/rmi-jmx-connector]"
>
> the full line:
>
> [#|2007-10-29T15:28:48.086-0400|SEVERE|sun-appserver9.1|javax.enterprise.system.core|_ThreadID=10; _ThreadName=main;com.sun.enterprise.admin.server.core.JmxConnectorLifecycle@328cbf;com.sun.appserv.server.ServerLifecycleException: Cannot bind to URL [rmi://169.254.161.207:8686/management/rmi-jmx-connector]: javax.naming.ServiceUnavailableException [Root exception is java.rmi.ConnectException: Connection refused to host: 169.254.161.207; nested exception is:
> java.net.ConnectException: Operation timed out];_RequestID=69db80be-8146-46bb-a879-157fedee2f87;|Service com.sun.enterprise.admin.server.core.JmxConnectorLifecycle@328cbf cannot be started! : com.sun.appserv.server.ServerLifecycleException: Cannot bind to URL [rmi://169.254.161.207:8686/management/rmi-jmx-connector]: javax.naming.ServiceUnavailableException [Root exception is java.rmi.ConnectException: Connection refused to host: 169.254.161.207; nested exception is:
> java.net.ConnectException: Operation timed out]|#]
>
>
> Any help would be thoroughly appreciated.
> [Message sent by forum member 'arjunlall' (arjunlall)]
>
> http://forums.java.net/jive/thread.jspa?messageID=242754
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@glassfish.dev.java.net
> For additional commands, e-mail: users-help@glassfish.dev.java.net
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@glassfish.dev.java.net
For additional commands, e-mail: users-help@glassfish.dev.java.net


arjunlall

Posts: 19
Re: Glassfish v2g on Mac 10.5 Leopard
Posted: Oct 29, 2007 1:22 PM   in response to: arjunlall
 
  Click to reply to this thread Reply

here is the full log

arjunlall

Posts: 19
Re: Glassfish v2g on Mac 10.5 Leopard
Posted: Oct 29, 2007 1:53 PM   in response to: arjunlall
 
  Click to reply to this thread Reply

Unfortunately that doesn't fix the problem. Thanks for the suggestion though.

arjunlall

Posts: 19
Re: Glassfish v2g on Mac 10.5 Leopard
Posted: Oct 30, 2007 12:19 AM   in response to: arjunlall
 
  Click to reply to this thread Reply

I thought I was getting close by playing with the following two parameters:

<jvm-options>-Djava.rmi.server.hostname=localhost</jvm-options>
<jvm-options>-Djava.rmi.server.useLocalHostname=true</jvm-options>

But the server still tries to connect to rmi://169.254.161.207:8686/management/rmi-jmx-connector

I have tried 127.0.0.1 and 127.0.0.1:8686 as the hostname as well but nothing I do seems to change the hostname. I also tried without the useLocalHostname parameter.

Does anyone know of a way to explicitly override the hostname?

arjunlall

Posts: 19
Re: Glassfish v2g on Mac 10.5 Leopard
Posted: Oct 30, 2007 12:24 AM   in response to: arjunlall
 
  Click to reply to this thread Reply

The problem is similar to this one:

http://forums.java.net/jive/thread.jspa?messageID=230029&#230029

Although that thread had no clear resolution either, although It did seem that changing the hostname did actually change the hostname that RMI uses for him.

Not sure why its not working for me. I can confirm that the parameters are being passed to glassfish on startup because they show up in the server log.

ne110415

Posts: 7
Re: Glassfish v2g on Mac 10.5 Leopard
Posted: Nov 15, 2007 3:07 PM   in response to: arjunlall
 
  Click to reply to this thread Reply

The host address is picked up from domain.xml..(see below for the exact entry )... 0.0.0.0 is interpreted as all IPs on that machine will be bound to.

Try changing the IP address to 127.0.0.1 or localhost

If that does not work, try an IP address that can be resolved from this machine outside of GlassFish (so if wireless address works, put that here and try)

<!-- The JSR 160 "system-jmx-connector" -->
<jmx-connector accept-all="false" address="0.0.0.0" auth-realm-name="admin-realm" enabled="true" name="system" port="8686" protocol="rmi_jrmp"
security-enabled="false">
<ssl cert-nickname="s1as" client-auth-enabled="false" ssl2-enabled="false" ssl3-enabled="true" tls-enabled="true" tls-rollback-enabled="true
"/>
<property name="client-hostname" value="mymac"/>
</jmx-connector>
<!-- The JSR 160 "system-jmx-connector" -->

arjunlall

Posts: 19
Re: Glassfish v2g on Mac 10.5 Leopard
Posted: Nov 15, 2007 4:00 PM   in response to: ne110415
 
  Click to reply to this thread Reply

I tried changing the jmx-connector address attribute to 127.0.0.1 and 192.168.1.10 (My IP behind my router) but both times still had the same log output:

URL [rmi://169.254.203.185:8686/management/rmi-jmx-connector]: javax.naming.ServiceUnavailableException [Root exception is java.rmi.ConnectException: Connection refused to host: 169.254.203.185; nested exception is:

It is getting set though because when I run the server I get the following output to the terminal:

ALall17:glassfish Arjun$ bin/asadmin start-domain domain1
Starting Domain domain1, please wait.
Log redirected to /Users/Arjun/Dev/glassfish/domains/domain1/logs/server.log.
Redirecting output to /Users/Arjun/Dev/glassfish/domains/domain1/logs/server.log
Domain domain1 is ready to receive client requests. Additional services are being started in background.
Domain [domain1] is running [Sun Java System Application Server 9.1 (build b58g-fcs)] with its configuration and logs at: [/Users/Arjun/Dev/glassfish/domains].
Admin Console is available at [http://localhost:4848].
Use the same port [4848] for "asadmin" commands.
User web applications are available at these URLs:
[http://localhost:8080 https://localhost:8181 ].
Following web-contexts are available:
[/web1 /__wstx-services ].
Standard JMX Clients (like JConsole) can connect to JMXServiceURL:
[service:jmx:rmi:///jndi/rmi://192.168.1.10:8686/jmxrmi] for domain management purposes.
Domain listens on at least following ports for connections:
[8080 8181 4848 3700 3820 3920 8686 ].
Domain does not support application server clusters and other standalone instances.


You can see that JMX appears to be using my IP

I also tried changing all instances of 0.0.0.0 in my Domain.xml to 127.0.0.1 or 192.168.1.10, but that did not work either. Same log output trying to connect to 169.254.203.185.

But it does set the IPs as seen in the terminal output below:

ALall17:glassfish Arjun$ bin/asadmin start-domain domain1
Starting Domain domain1, please wait.
Log redirected to /Users/Arjun/Dev/glassfish/domains/domain1/logs/server.log.
Redirecting output to /Users/Arjun/Dev/glassfish/domains/domain1/logs/server.log
Domain domain1 is ready to receive client requests. Additional services are being started in background.
Domain [domain1] is running [Sun Java System Application Server 9.1 (build b58g-fcs)] with its configuration and logs at: [/Users/Arjun/Dev/glassfish/domains].
Admin Console is available at [http://192.168.1.10:4848].
Use the same port [4848] for "asadmin" commands.
User web applications are available at these URLs:
[http://192.168.1.10:8080 https://192.168.1.10:8181 ].
Following web-contexts are available:
[/web1 /__wstx-services ].
Standard JMX Clients (like JConsole) can connect to JMXServiceURL:
[service:jmx:rmi:///jndi/rmi://192.168.1.10:8686/jmxrmi] for domain management purposes.
Domain listens on at least following ports for connections:
[8080 8181 4848 3700 3820 3920 8686 ].
Domain does not support application server clusters and other standalone instances.

ne110415

Posts: 7
Re: Glassfish v2g on Mac 10.5 Leopard
Posted: Nov 15, 2007 4:32 PM   in response to: arjunlall
 
  Click to reply to this thread Reply

hmm are you sure you are not looking at wrong part of the log? Let's get more info...

Can you pls make sure
1. you have made changes to domain.xml when DAS was stopped.
2. you don't see any trace of the 169.154.... address in any of the <jmx-connecotr> elements in your domain.xml
3. clean the DAS log before the rerun and attach the log of the new run to this thread.

I will take a look at the log to understand this better.

Thanks.

arjunlall

Posts: 19
Re: Glassfish v2g on Mac 10.5 Leopard
Posted: Nov 15, 2007 5:41 PM   in response to: ne110415
 
  Click to reply to this thread Reply

Ok, So I made sure no Java processes were running and then started running the server again with the domain.xml containing all 0.0.0.0 except for the <jmx-connector> which has 127.0.0.1

The server ran into the same error.

I have attached my domain.xml and the server log, which I cleared before I tried running the server.

arjunlall

Posts: 19
Re: Glassfish v2g on Mac 10.5 Leopard
Posted: Nov 15, 2007 5:51 PM   in response to: ne110415
 
  Click to reply to this thread Reply

I also tried removing the following lines of the domain.xml that I had added earlier but had no success.

<jvm-options>-Djava.rmi.server.hostname=localhost</jvm-options>
<jvm-options>-Djava.rmi.server.useLocalHostname=true</jvm-options>

ne110415

Posts: 7
Re: Glassfish v2g on Mac 10.5 Leopard
Posted: Nov 15, 2007 10:27 PM   in response to: arjunlall
 
  Click to reply to this thread Reply

Okay..let me send you quick patch to get better idea of where exactly in the control flow the address which is picked up verbatim from domain.xml as127... gets converted to 169...

The stack trace simply indicates that the operation to bind the rmi object (jmx connector server) to the RMI registry running at 169...:8686 failed; which is obvious becase the registry is set to run on all IPs, but 169.. is not a valid IP anymore, so the call has to fail....but need to find out the cuase to pick up 169...also not sure of mac commands, but with ipconfig (equivalent) can you also attach that ouput.

arjunlall

Posts: 19
Re: Glassfish v2g on Mac 10.5 Leopard
Posted: Nov 16, 2007 4:09 AM   in response to: ne110415
 
  Click to reply to this thread Reply

You can see my ifconfig (the equivalent to ipconfig) below.

arjunlall

Posts: 19
Re: Glassfish v2g on Mac 10.5 Leopard
Posted: Nov 15, 2007 2:18 PM   in response to: arjunlall
 
  Click to reply to this thread Reply

So I installed the 10.5.1 update hoping it would help resolve the issue, however, it did not.

Has anyone been able to successfully get Glassfish to work on OS X 10.5 using wireless?

I am willing to paypal $50 to anyone who can help me figure this out.

km

Posts: 681
Re: Glassfish v2g on Mac 10.5 Leopard
Posted: Nov 15, 2007 10:07 PM   in response to: arjunlall
Helpful
  Click to reply to this thread Reply

Arjun,

It's strange that
<jvm-options>-Dcom.sun.enterprise.server.ss.ASQuickStartup=false</jvm-options>
<jvm-options>-Djava.rmi.server.hostname=127.0.0.1</jvm-options>

does not help. Can you retry *once*?

work-around:

$50 bounty looks promising. So, I am going to help you to "work-around" this problem. It of course
affects the full functionality, but lets you get started ...

Look for system-jmx-connector in domain.xml and set its "enabled" attribute to false. This should
result in following information in server.log:

[#|2007-11-15T21:51:37.042-0800|INFO|sun-appserver9.1|javax.enterprise.system.tools.admin|_ThreadID=10;_ThreadName=main;8686;|ADM1503: The system-jmx-connector port [8686] is not enabled to start with server startup. Thus JSR 160 JMX Connector will not be started.|#]


Let me know if you can make progress. Also, send me $25 since this is not a complete solution :)

Also, I suspect that Mac OS X "caches" some IP addresses. Although I develop on Mac OS X
(Tiger), I have not seen this problem at all. Can you share "ifconfig" information on your machine?

I want to get to the bottom of this problem and any information would help get there.

Regards,
Kedar

Binod
Re: Glassfish v2g on Mac 10.5 Leopard
Posted: Nov 15, 2007 10:24 PM   in response to: km
  Click to reply to this thread Reply

Just to debug...

Can you see if the /etc/hosts (is it the same in Mac?) maps localhost and
hostname to a different IP address than the intended one.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@glassfish.dev.java.net
For additional commands, e-mail: users-help@glassfish.dev.java.net


arjunlall

Posts: 19
Re: Glassfish v2g on Mac 10.5 Leopard
Posted: Nov 16, 2007 4:08 AM   in response to: Binod
 
  Click to reply to this thread Reply

Ok, here is my ifconfig:

lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 16384
inet6 fe80::1%lo0 prefixlen 64 scopeid 0x1
inet 127.0.0.1 netmask 0xff000000
inet6 ::1 prefixlen 128
inet6 fdb4:c52a:7370:3106:216:cbff:fe8e:6556 prefixlen 128
gif0: flags=8010<POINTOPOINT,MULTICAST> mtu 1280
stf0: flags=0 mtu 1280
en0: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500
ether 00:16:cb:8e:65:56
media: autoselect status: inactive
supported media: autoselect 10baseT/UTP <half-duplex> 10baseT/UTP <full-duplex> 10baseT/UTP <full-duplex,hw-loopback> 10baseT/UTP <full-duplex,flow-control> 100baseTX <half-duplex> 100baseTX <full-duplex> 100baseTX <full-duplex,hw-loopback> 100baseTX <full-duplex,flow-control> 1000baseT <full-duplex> 1000baseT <full-duplex,hw-loopback> 1000baseT <full-duplex,flow-control> none
fw0: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 2030
inet 169.254.203.185 netmask 0xffff0000 broadcast 169.254.255.255
lladdr 00:16:cb:ff:fe:e3:1d:56
media: autoselect <full-duplex> status: inactive
supported media: autoselect <full-duplex>
en1: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500
inet6 fe80::217:f2ff:fe3e:d09f%en1 prefixlen 64 scopeid 0x6
inet 192.168.1.10 netmask 0xffffff00 broadcast 192.168.1.255
ether 00:17:f2:3e:d0:9f
media: autoselect status: active
supported media: autoselect
en3: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500
inet6 fe80::21c:42ff:fe00:1%en3 prefixlen 64 scopeid 0x7
inet 169.254.69.161 netmask 0xffff0000 broadcast 169.254.255.255
ether 00:1c:42:00:00:01
media: autoselect status: active
supported media: autoselect
en2: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500
inet6 fe80::21c:42ff:fe00:0%en2 prefixlen 64 scopeid 0x8
inet 169.254.69.161 netmask 0xffff0000 broadcast 169.254.255.255
ether 00:1c:42:00:00:00
media: autoselect status: active
supported media: autoselect
en4: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500
ether 00:16:cb:1c:d9:14
media: autoselect status: inactive
supported media: none autoselect 10baseT/UTP <half-duplex>

As you can see it always binds to 169.254.203.185 (en0) which is my ethernet card. This explains why when I run while plugged in it works, but when on wireless it doesn't resolve the IP from en1 and instead uses the IP assigned to en0. (The other adapters are my firewall and virtual adapters for Parallels, I have disabled them and tried before but it didnt make a difference)

Here is my /etc/hosts:

##
# Host Database
#
# localhost is used to configure the loopback interface
# when the system is booting. Do not change this entry.
##
127.0.0.1 localhost
255.255.255.255 broadcasthost
::1 localhost
fe80::1%lo0 localhost

FYI, OS X is now fully Unix compatible so I imagine most unix commands will work.

km

Posts: 681
Re: Glassfish v2g on Mac 10.5 Leopard
Posted: Nov 16, 2007 4:40 AM   in response to: arjunlall
 
  Click to reply to this thread Reply

> As you can see it always binds to 169.254.203.185
> (en0) which is my ethernet card. This explains why
> when I run while plugged in it works, but when on
> wireless it doesn't resolve the IP from en1 and
> instead uses the IP assigned to en0. (The other
> adapters are my firewall and virtual adapters for
> Parallels, I have disabled them and tried before but
> it didnt make a difference)

There is something funky going on here. Is your AirPort turned off by
any chance? For me, with a similar looking ifconfig, it always
works with AirPort turned on. It always fails with a similar error
(Cannot bind to URL [rmi://169.254.115.198:8686/management/rmi-jmx-connector]:)
when AirPort is turned off.

BTW, it fails in JMX Connector for some reason that I should investigate, but if you
disable the system-jmx-connector, you should be able to make progress.

Thanks,
Kedar

arjunlall

Posts: 19
Re: Glassfish v2g on Mac 10.5 Leopard
Posted: Nov 16, 2007 4:54 AM   in response to: km
 
  Click to reply to this thread Reply

My airport is turned on. Right now I am posting to this forum via my airport connection.

I noticed something else that might be related or might not. When I started the server instance one time asadmin reported the following:

"[service:jmx:rmi:///jndi/rmi://ALall17.local:8686/jmxrmi] for domain management purposes."

ALall17 is my computer name, but I dont know why ALall17.local would be different from localhost.

When I ping ALall17 I get the following IP address 169.254.69.161 which is actually DIFFERENT from the one in the server log that JMX tries to connect to (169.254.203.185)

In any case, I tried replacing all instances of ALall17.local in my glassfish install (it showed up once in domain.xml, and in sun-acc.xml and registry.xml) with 127.0.0.1, however nothing different happened.

For now the best solution has been to disable JMX.

arjunlall

Posts: 19
Re: Glassfish v2g on Mac 10.5 Leopard
Posted: Nov 16, 2007 4:30 AM   in response to: Binod
 
  Click to reply to this thread Reply

FYI, I also had tried adding my computer name ALall17 to the hosts file but that caused my computer to freeze up (must have got in a circular reference or something).

km

Posts: 681
Re: Glassfish v2g on Mac 10.5 Leopard
Posted: Nov 16, 2007 5:02 AM   in response to: arjunlall
 
  Click to reply to this thread Reply

Like I said, there are lot of forces coming into picture and their nexus is
causing this problem. I am experiment on my MBP to get into this situation, but have been
successful in reproducing this only when AirPort is disabled.

- Dazed and Confused in Santa Clara.

arjunlall

Posts: 19
Re: Glassfish v2g on Mac 10.5 Leopard
Posted: Nov 16, 2007 4:48 AM   in response to: km
 
  Click to reply to this thread Reply

Kedar,

When I disable the JMX Connector it works. I will set aside some of the bounty for you.

What functionality does the JMX Connector have? My webapp seems to run without any problems when it is disabled. Does it have any value in a development environment or is it only necessary for an actual server deployment?

km

Posts: 681
Re: Glassfish v2g on Mac 10.5 Leopard
Posted: Nov 16, 2007 5:00 AM   in response to: arjunlall
 
  Click to reply to this thread Reply

Arjun,
> When I disable the JMX Connector it works. I will set
> aside some of the bounty for you.

Yeah! How do I make sure it is tax-deductible :) ?

> What functionality does the JMX Connector have? My
> webapp seems to run without any problems when it is
> disabled. Does it have any value in a development
> environment or is it only necessary for an actual
> server deployment?

JMX Connector is to manage the server remotely. Have you heard of/seen
JConsole? It is the "standard" JMX Tool to manage the functionality of the
server that is JMX-remote-capable. GlassFish is JMX-remote-capable. The
standard way to do this is through the so-called RMI connector which is
integrated into Java SE 5.0! GlassFish just leverages that fact.

So, you are right, what you lose by not having JMX Connector is the ability to
remotely manage the server and if that's OK for you as a work-around, you can
use it.

I'd still like to understand this as this problem is more specific to Mac OS X than
anything else.

Regards,
Kedar

arjunlall

Posts: 19
Re: Glassfish v2g on Mac 10.5 Leopard
Posted: Nov 16, 2007 5:18 AM   in response to: km
 
  Click to reply to this thread Reply

Email me at (arjun a-t arjunlall dot com) so I can get details about where I should Paypal the money.

It is strange and possibly a problem with 1) Apple, 2) Apple's java implementation or 3) some strange configuration on my computer.

It is odd though since on Tiger the exact same configuration worked, but now that I have upgraded to Leopard it stopped.

Have you installed Leopard or know anyone else who has been able to get glassfish to work on Leopard with wireless?

While I should be fine without the JMX connector since I am only developing on this machine, I would be happy to try out any solutions anyone can think of to try and get this to work.

km

Posts: 681
Re: Glassfish v2g on Mac 10.5 Leopard
Posted: Nov 16, 2007 5:26 AM   in response to: arjunlall
 
  Click to reply to this thread Reply

Hi Arjun,

> Email me at (arjun a-t arjunlall dot com) so I can
> get details about where I should Paypal the money.

Wow. You seem to be serious. However, I must say that this is
part of my "job" (well, I believe in community service :) ).
But since I have been given this opportunity, I'll contact you
on your private e-mail address.

> It is strange and possibly a problem with 1) Apple,
> 2) Apple's java implementation or 3) some strange
> configuration on my computer.
>
> It is odd though since on Tiger the exact same
> configuration worked, but now that I have upgraded to
> Leopard it stopped.
>
> Have you installed Leopard or know anyone else who
> has been able to get glassfish to work on Leopard
> with wireless?

I am not so sure that it is Leopard-Tiger difference. I have seen similar
complaints with Tiger, I believe. It's more of Mac OS X/ BSD thing,
I suppose.

>
> While I should be fine without the JMX connector
> since I am only developing on this machine, I would
> be happy to try out any solutions anyone can think of
> to try and get this to work.

Oh Absolutely. I think jmx-connector-disabling is suggested
only as a work-around. I don't like that since I am the original
integrator of JMX Connector technology into GlassFish and it's
not a good thing that you don't get to use it :).

So, yes, I promise -- I will study it a bit a more and get back to you
as I learn more.

Regards,
Kedar

bnevins

Posts: 61
Re: Glassfish v2 on Mac OS X 10.5 Leopard ($25 Bounty)
Posted: Nov 16, 2007 9:55 AM   in response to: arjunlall
 
  Click to reply to this thread Reply

Questions From The Peanut Gallery:

1)What's an "AirPort" Does GF require large airplanes to be nearby?

2)UTLA: MBP "Many Brainy Programmers"??

whartung

Posts: 634
Re: Glassfish v2 on Mac OS X 10.5 Leopard ($25 Bounty)
Posted: Nov 16, 2007 11:24 AM   in response to: arjunlall
 
  Click to reply to this thread Reply

Can someone summarize the fix so if and when this happens to me (or someone else) we can get a quick list of what to or not to do? The thread is a bit involved.

arjunlall

Posts: 19
Re: Glassfish v2 on Mac OS X 10.5 Leopard ($25 Bounty)
Posted: Nov 16, 2007 11:47 AM   in response to: whartung
 
  Click to reply to this thread Reply

To summarize:

The JMX connector in Glassfish has problems resolving the proper IP of my computer when I am on wireless, and as a result Glassfish will not start.

So far the best solution is a workaround to simply disable jmx, which in my case is fine since my computer is a development machine and I dont need remote server administration.

Specifically, change the following line in the domain.xml

<jmx-connector accept-all="false" address="0.0.0.0" auth-realm-name="admin-realm" enabled="true" name="system" port="8686" protocol="rmi_jrmp" security-enabled="false">

to

enabled="false"

Hope this helps. Please post if you run into the same error on Leopard, I am not sure if this issue is related to my machine only or every Leopard Mac running on wireless.

mike767

Posts: 1
Re: Glassfish v2 on Mac OS X 10.5 Leopard ($25 Bounty)
Posted: Dec 5, 2008 7:05 PM   in response to: arjunlall
 
  Click to reply to this thread Reply

i have mbp with leopard and suffer the same issue with jmx while starting glassfish. I turned it off for now (thanks for hint), but i would like to know how to get it working.

llc

Posts: 26
Re: Glassfish v2 on Mac OS X 10.5 Leopard ($25 Bounty)
Posted: Nov 16, 2007 12:05 PM   in response to: arjunlall
 
  Click to reply to this thread Reply

If this works, it will be the easiest $50 I've earned...

Since you seem to have both ethernet and airport (wireless), turn off the wireless link. Or turn off ethernet and leave wireless on.

(Go to Control Panel => Network => Network Port Configurations and disable any ones you don't need also, like Bluetooth and Firewire).

What happens?

arjunlall

Posts: 19
Re: Glassfish v2 on Mac OS X 10.5 Leopard ($25 Bounty)
Posted: Nov 16, 2007 12:13 PM   in response to: llc
 
  Click to reply to this thread Reply

That was actually the first thing I tried once I found out that it worked with ethernet and not on wireless, unfortunately it doesn't really help since en0 is still configured on my machine even though its disabled from OS X's GUI point of view.

ne110415

Posts: 7
Re: Glassfish v2 on Mac OS X 10.5 Leopard ($25 Bounty)
Posted: Nov 16, 2007 1:35 PM   in response to: arjunlall
Correct
  Click to reply to this thread Reply

Just to close this thread...

On a private email thread, Arjun tried my debug patches and I know the issue and he has a workable patch. Thanks for trying them Arjun! This was a very corner case issue but I am glad it was reported and resolved.

I will add a better fix as part of resolution of the bug created out of this thread (bug details will be added shortly).

llc

Posts: 26
Re: Glassfish v2 on Mac OS X 10.5 Leopard ($25 Bounty)
Posted: Nov 16, 2007 2:34 PM   in response to: arjunlall
 
  Click to reply to this thread Reply

Does the order matter? In the GUI, put the airport connection first, see if that makes a difference.

ne110415

Posts: 7
Re: Glassfish v2 on Mac OS X 10.5 Leopard ($25 Bounty)
Posted: Nov 16, 2007 2:45 PM   in response to: llc
 
  Click to reply to this thread Reply

I think it does... but you cannot predict the ordering on any machine (why inactive IPs are picked up is something that can be researched as a bug/quirky behavior of java.net API though...) anyway fix aimed for upcoming releases will take care of this indirectly..

km

Posts: 681
Re: Glassfish v2 on Mac OS X 10.5 Leopard ($25 Bounty)
Posted: Nov 16, 2007 3:15 PM   in response to: llc
 
  Click to reply to this thread Reply

It seems to be an oddball case of picking up the inactive network interfaces. But this is more
specific to Mac for sure. I think we need to get a reproducible test case on other platforms
as well and try it out.

Thanks Nandini for fixing the root cause.

- Kedar




 XML java.net RSS