facebook

MyEclipse 2015 CI started Tomcat is not recognised -Yosemite

  1. MyEclipse IDE
  2.  > 
  3. Installation, Configuration & Updates
Viewing 15 posts - 1 through 15 (of 16 total)
  • Author
    Posts
  • #350730 Reply

    Gerd W. Naschenweng
    Participant

    I am running the latest version of 2015 CI on Yosemite and despite the Tomcat having successfully started, it looks like MyEclipseIDE does not recognise this and throws the following error:

    “Server MyEclipse Tomcat v7.0 was unable to start within 300 seconds. If the server requires more time, try increasing the timeout in the server editor.”

    You can see that Tomcat starts within a minute:

    Jul 31, 2014 11:57:53 AM org.apache.coyote.AbstractProtocol init
    INFO: Initializing ProtocolHandler ["http-bio-8080"]
    Jul 31, 2014 11:57:53 AM org.apache.coyote.AbstractProtocol init
    INFO: Initializing ProtocolHandler ["ajp-bio-8009"]
    Jul 31, 2014 11:57:53 AM org.apache.catalina.startup.Catalina load
    INFO: Initialization processed in 1112 ms
    Jul 31, 2014 11:57:53 AM org.apache.catalina.core.StandardService startInternal
    INFO: Starting service Catalina
    Jul 31, 2014 11:57:53 AM org.apache.catalina.core.StandardEngine startInternal
    INFO: Starting Servlet Engine: Apache Tomcat/7.0.30
    Jul 31, 2014 11:57:57 AM org.apache.catalina.startup.TaglibUriRule body
    INFO: Initiating Jersey application, version 'Jersey: 1.4 09/11/2010 10:30 PM'
    Jul 31, 2014 11:58:56 AM com.sun.jersey.api.core.PackagesResourceConfig init
    Jul 31, 2014 11:58:57 AM org.apache.coyote.AbstractProtocol start
    INFO: Starting ProtocolHandler ["http-bio-8080"]
    Jul 31, 2014 11:58:57 AM org.apache.coyote.AbstractProtocol start
    INFO: Starting ProtocolHandler ["ajp-bio-8009"]
    Jul 31, 2014 11:58:57 AM org.apache.catalina.startup.Catalina start
    INFO: Server startup in 63234 ms
    

    I do think this is a Yosemite specific issue, but can’t be 100% sure. Right now, I set the startup-timeout super high, so I do not have to restart so often 😉

    #350752 Reply

    support-swapna
    Moderator

    Hi,

    Sorry that you are seeing this issue. We haven’t yet tested on Yosemite and we see no issue on Mavericks.

    Can you please try with an externally installed Tomcat instead of the built-in MyEclipse Tomcat and see if the issue persists ?

    Let us know how it works for you.

    #351329 Reply

    Gerd W. Naschenweng
    Participant

    @support-swapna wrote:

    Hi,

    Sorry that you are seeing this issue. We haven’t yet tested on Yosemite and we see no issue on Mavericks.

    Can you please try with an externally installed Tomcat instead of the built-in MyEclipse Tomcat and see if the issue persists ?

    Let us know how it works for you.

    Sorry for late response – I tried with both local and external Tomcat (7.0.55) and experience the same issue. Although Tomcat and the webapp is started, Tomcat will still report with “Preparing launch delegate”.

    #351347 Reply

    support-tony
    Keymaster

    GNaschenweng,

    I’ve now installed Yosemite beta, system version 10.10 (14A329r). With the latest update of MyEclipse 2015 CI, I couldn’t replicate the issue with the built-in tomcat, but haven’t tried a separate installation of Tomcat. I couldn’t replicate on an earlier release of MyEclipse 2015 CI either. My current build id of MyEclipse 2015 CI is 13.0.0-20140820.

    Do you have the latest updates for Yosemite and MyEclipse 2015 applied? I don’t know if the level of Java is relevant but I have Java 8 update 20.

    If your versions of Yosemite, MyEclipse and Java are the same, then please try a new workspace or reinstalling MyEclipse, if you haven’t already done so.

    #351348 Reply

    Gerd W. Naschenweng
    Participant

    @support-tony wrote:

    GNaschenweng,

    I’ve now installed Yosemite beta, system version 10.10 (14A329r). With the latest update of MyEclipse 2015 CI, I couldn’t replicate the issue with the built-in tomcat, but haven’t tried a separate installation of Tomcat. I couldn’t replicate on an earlier release of MyEclipse 2015 CI either. My current build id of MyEclipse 2015 CI is 13.0.0-20140820.

    Do you have the latest updates for Yosemite and MyEclipse 2015 applied? I don’t know if the level of Java is relevant but I have Java 8 update 20.

    If your versions of Yosemite, MyEclipse and Java are the same, then please try a new workspace or reinstalling MyEclipse, if you haven’t already done so.

    Hi there,

    only difference might be Java:

    java version "1.7.0_67"
    Java(TM) SE Runtime Environment (build 1.7.0_67-b01)
    Java HotSpot(TM) 64-Bit Server VM (build 24.65-b04, mixed mode)

    I do have the latest 2015 CI (20th August). I can’t upgrade to Java 8 at the moment though. How does MyEclipse detect that Tomcat has started – looking at the console output, Tomcat is fully initialised and it looks like MyEclipse does not see that.

    I do have the OS X Firewall turned on (as well as stealth mode), but would not think that this matters, as it is all localhost.

    #351350 Reply

    support-tony
    Keymaster

    GNaschenweng,

    I’d need to check on the mechanism for detecting a started server.

    Regarding Java, I note that when going to java.com to install, a message was displayed that OS X 10.10 is an unsupported platform for Java 7, with Java 8 update 20 being recommended. So that may be the issue, here.

    #351394 Reply

    Gerd W. Naschenweng
    Participant

    @support-tony wrote:

    GNaschenweng,

    I’d need to check on the mechanism for detecting a started server.

    Regarding Java, I note that when going to java.com to install, a message was displayed that OS X 10.10 is an unsupported platform for Java 7, with Java 8 update 20 being recommended. So that may be the issue, here.

    Java 7 is only an install issue when you do a fresh Yosemite install and then need to instal Java 7 on top of it. I have a workaround for this here: http://www.naschenweng.info/2014/08/01/jdk-1-7-install-os-10-10-yosemite-fails-wrong-version-number/

    #351409 Reply

    support-tony
    Keymaster

    GNaschenweng,

    Thanks for the tip. Actually, that didn’t change anything and I still couldn’t replicate it.

    The server startup is detected by pinging localhost:8080 (or the port set up in the configuration of the server). You could try pinging that in a terminal to check that there is not some system or firewall setting which is preventing that from working.

    Please let us know if this helps.

    #351411 Reply

    Gerd W. Naschenweng
    Participant

    @support-tony wrote:

    GNaschenweng,

    Thanks for the tip. Actually, that didn’t change anything and I still couldn’t replicate it.

    The server startup is detected by pinging localhost:8080 (or the port set up in the configuration of the server). You could try pinging that in a terminal to check that there is not some system or firewall setting which is preventing that from working.

    Please let us know if this helps.

    Okay – that makes sense (and now I really need help) – in my IDE, I run Tomcat as 8080, but then have port forwarding locally configured so that I can run my app as “localhost” (on port 80 and without the 8080). This is done via:

    ## Add the below into /etc/pf.anchors/com.tomcat (remember the spare line-break)

    rdr pass on lo0 inet proto tcp from any to any port 80 -> 127.0.0.1 port 8080
    

    ## Add the below into /etc/pf.conf, right after “rdr-anchor “com.apple/*” (remember the spare line-break)

    rdr-anchor "tomcat"
    

    ## Add this line directly after load anchor “com.apple” from “/etc/pf.anchors/com.apple”:

    load anchor "tomcat" from "/etc/pf.anchors/com.tomcat"
    

    – Next, reload the rules into pf by running sudo pfctl -f /etc/pf.conf
    – Finally, enable pf by running sudo pfctl -e

    On Mavericks this was working fine via “/sbin/ipfw add 100 fwd 127.0.0.1,8080 tcp from any to any 80 in”

    I am unable to run Tomcat with port 80 (get a permission denied) and I have tried this both with embedded and external Tomcat. Any suggestions on how I can get Tomcat running on port 80 via the IDE (or perhaps I am missing something simple in the PF)

    What I also established:
    – If I do the “ipfw” on Mavericks, the Network Utility and telnet can see port 80 and port 8080
    – If I do the pf.conf on Yosemite, the Network Utility and telnet only sees port 80

    #351432 Reply

    support-tony
    Keymaster

    GNaschenweng,

    Thanks for the steps. I could replicate your problem when setting up port forwarding in the way you detailed. Oddly, even though port 8080 doesn’t appear in the port scan of Network Utility, I can connect to it with telnet.

    I’m afraid that we have no workaround at the moment other than removing port forwarding and, so, needing to use the port number in the http requests. I’ve raised a fault report for this but I’m not sure we can do anything until Yosemite is released.

    It’s possible, though not recommended, to run MyEclipse as root and so enable Tomcat to be started on port 80. You’d have to invoke the actual executable, as far as I can tell, rather than opening the application. And you’d need to reactivate MyEclipse, as it is being run as a different user (this will create files in /var/root).

    I hope this helps and sorry for the inconvenience.

    #351433 Reply

    Gerd W. Naschenweng
    Participant

    @support-tony wrote:

    GNaschenweng,

    Thanks for the steps. I could replicate your problem when setting up port forwarding in the way you detailed. Oddly, even though port 8080 doesn’t appear in the port scan of Network Utility, I can connect to it with telnet.

    I’m afraid that we have no workaround at the moment other than removing port forwarding and, so, needing to use the port number in the http requests. I’ve raised a fault report for this but I’m not sure we can do anything until Yosemite is released.

    It’s possible, though not recommended, to run MyEclipse as root and so enable Tomcat to be started on port 80. You’d have to invoke the actual executable, as far as I can tell, rather than opening the application. And you’d need to reactivate MyEclipse, as it is being run as a different user (this will create files in /var/root).

    I hope this helps and sorry for the inconvenience.

    Thanks for that. Unfortunately I don’t have access to Mavericks to see if the port forwarding via the new firewall settings is also an issue, or if this is now a Yosemite problem. Perhaps you can see if you can re-create the issue on Mavericks, than at least we know if a proper fix needs to be provided.

    I would not want to run MyEclipse (or Tomcat) as root, so at the moment, I set the Tomcat startup timeout really high and unfortunately don’t have the benefit of dynamic resource reloading, but this is okay for now.

    #351434 Reply

    support-tony
    Keymaster

    GNaschenweng,

    Good point. If the same technique for port forwarding works on Mavericks, and we see the same issue, then the bug has a better chance of moving up the priority list. I’ll give it a try.

    #351436 Reply

    support-tony
    Keymaster

    Sadly, the same problem occurs with Mavericks. I’ve noted this in the fault report.

    #352264 Reply

    Morris Jao
    Member

    If you used pfctl to redirect port 80 to 8080 in Yosemite, just add another setting to redirect 8080 to 8080, reload pfctl and try again (It’s silly indeed).

    example:
    rdr pass on lo0 inet proto tcp from any to 127.0.0.1 port 443 -> 127.0.0.1 port 8443
    rdr pass on lo0 inet proto tcp from any to 127.0.0.1 port 8443 -> 127.0.0.1 port 8443
    rdr pass on lo0 inet proto tcp from any to 127.0.0.1 port 80 -> 127.0.0.1 port 8080
    rdr pass on lo0 inet proto tcp from any to 127.0.0.1 port 8080 -> 127.0.0.1 port 8080

    or just change the rule as…

    rdr pass on lo0 inet proto tcp from any to 127.0.0.1 port { 443 8443 } -> 127.0.0.1 port 8443
    rdr pass on lo0 inet proto tcp from any to 127.0.0.1 port { 80 8080 } -> 127.0.0.1 port 8080

    #352268 Reply

    Gerd W. Naschenweng
    Participant

    @blackeye wrote:

    If you used pfctl to redirect port 80 to 8080 in Yosemite, just add another setting to redirect 8080 to 8080, reload pfctl and try again (It’s silly indeed).

    example:
    rdr pass on lo0 inet proto tcp from any to 127.0.0.1 port 443 -> 127.0.0.1 port 8443
    rdr pass on lo0 inet proto tcp from any to 127.0.0.1 port 8443 -> 127.0.0.1 port 8443
    rdr pass on lo0 inet proto tcp from any to 127.0.0.1 port 80 -> 127.0.0.1 port 8080
    rdr pass on lo0 inet proto tcp from any to 127.0.0.1 port 8080 -> 127.0.0.1 port 8080

    You rock – thank you so much! I can confirm that MyEclipse 2015 CI now properly detects Tomcat startup – wohoo!

Viewing 15 posts - 1 through 15 (of 16 total)
Reply To: MyEclipse 2015 CI started Tomcat is not recognised -Yosemite

You must be logged in to post in the forum log in