Bamboo starts briefly then exits with 'Function not implemented'
Asked by Ian.H:

Hi all..

I'm trying to run Bamboo on a FreeBSD box. The box is currently running JIRA, Confluence and Crowd successfully, but Bamboo (as well as Stash and Fisheye) fail for various 'Function not implemented'.  

Bamboo logs report:

```
INFO   | jvm 1    | 2012/08/16 22:36:53 | Starting Bamboo using Java 1.7.0_04 from Oracle CorporationINFO   | jvm 1    | 2012/08/16 22:36:53 | Port        = 8085INFO   | jvm 1    | 2012/08/16 22:36:53 | Web App     = ../webappINFO   | jvm 1    | 2012/08/16 22:36:53 | contextPath = /INFO   | jvm 1    | 2012/08/16 22:36:53 | 2012-08-16 22:36:53.118:INFO:oejs.Server:jetty-7.6.2.v20120308INFO   | jvm 1    | 2012/08/16 22:37:06 | 2012-08-16 22:37:06,167 INFO [WrapperSimpleAppMain] [lifecycle] Real path of servlet context: /usr/compat/linux/opt/atlassian/bamboo/webappINFO   | jvm 1    | 2012/08/16 22:37:06 | 2012-08-16 22:37:06,173 INFO [WrapperSimpleAppMain] [lifecycle] Starting Bamboo 4.2.0 (build #3211 Thu Aug 09 22:36:30 BST 2012)INFO   | jvm 1    | 2012/08/16 22:37:06 | 2012-08-16 22:37:06,377 INFO [WrapperSimpleAppMain] [lifecycle] Using bamboo.home: /usr/compat/linux/var/atlassian/application-data/bambooINFO   | jvm 1    | 2012/08/16 22:37:06 | 2012-08-16 22:37:06,386 INFO [WrapperSimpleAppMain] [UpgradeLauncher] UpgradeLauncher not performed since the application has not been setup yet.INFO   | jvm 1    | 2012/08/16 22:37:06 | 2012-08-16 22:37:06.386:INFO:oejsh.ContextHandler:started o.e.j.w.WebAppContext{/,file:/usr/compat/linux/opt/atlassian/bamboo/webapp/},../webappINFO   | jvm 1    | 2012/08/16 22:37:06 | 2012-08-16 22:37:06,494 INFO [WrapperSimpleAppMain] [DefaultConfiguration] Loading global messages from com.atlassian.bamboo.ww2.BambooActionSupportINFO   | jvm 1    | 2012/08/16 22:37:06 | 2012-08-16 22:37:06,494 INFO [WrapperSimpleAppMain] [DefaultConfiguration] Loading global messages from help-pathsINFO   | jvm 1    | 2012/08/16 22:37:06 | 2012-08-16 22:37:06.642:INFO:/: [CompressingFilter/1.4] CompressingFilter has initializedINFO   | jvm 1    | 2012/08/16 22:37:06 | 2012-08-16 22:37:06.650:INFO:/:org.tuckey.web.filters.urlrewrite.utils.Log ERROR: logLevelConf: nullINFO   | jvm 1    | 2012/08/16 22:37:06 | 2012-08-16 22:37:06.724:INFO:/:org.tuckey.web.filters.urlrewrite.UrlRewriteFilter INFO: loaded (conf ok)INFO   | jvm 1    | 2012/08/16 22:37:06 | 2012-08-16 22:37:06,730 INFO [WrapperSimpleAppMain] [AccessLogFilter] AccessLogFilter initialized. Format is: &lt;user&gt; &lt;url&gt; &lt;starting memory free (kb)&gt; +- &lt;difference in free mem (kb)&gt; &lt;query time (ms)&gt;INFO   | jvm 1    | 2012/08/16 22:37:06 | 2012-08-16 22:37:06.876:WARN:oejuc.AbstractLifeCycle:FAILED org.eclipse.jetty.server.nio.SelectChannelConnector$ConnectorSelectorManager@1cc2c78: java.io.IOException: Function not implementedINFO   | jvm 1    | 2012/08/16 22:37:06 | java.io.IOException: Function not implementedINFO   | jvm 1    | 2012/08/16 22:37:06 |       at sun.nio.ch.EPollArrayWrapper.epollCreate(Native Method)INFO   | jvm 1    | 2012/08/16 22:37:06 |       at sun.nio.ch.EPollArrayWrapper.&lt;init&gt;(Unknown Source)INFO   | jvm 1    | 2012/08/16 22:37:06 |       at sun.nio.ch.EPollSelectorImpl.&lt;init&gt;(Unknown Source)INFO   | jvm 1    | 2012/08/16 22:37:06 |       at sun.nio.ch.EPollSelectorProvider.openSelector(Unknown Source)INFO   | jvm 1    | 2012/08/16 22:37:06 |       at java.nio.channels.Selector.open(Unknown Source)INFO   | jvm 1    | 2012/08/16 22:37:06 |       at org.eclipse.jetty.io.nio.SelectorManager$SelectSet.&lt;init&gt;(SelectorManager.java:411)INFO   | jvm 1    | 2012/08/16 22:37:06 |       at org.eclipse.jetty.io.nio.SelectorManager.doStart(SelectorManager.java:256)INFO   | jvm 1    | 2012/08/16 22:37:06 |       at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:59)INFO   | jvm 1    | 2012/08/16 22:37:06 |       at org.eclipse.jetty.util.component.AggregateLifeCycle.doStart(AggregateLifeCycle.java:63)INFO   | jvm 1    | 2012/08/16 22:37:06 |       at org.eclipse.jetty.server.AbstractConnector.doStart(AbstractConnector.java:319)INFO   | jvm 1    | 2012/08/16 22:37:06 |       at org.eclipse.jetty.server.nio.SelectChannelConnector.doStart(SelectChannelConnector.java:260)INFO   | jvm 1    | 2012/08/16 22:37:06 |       at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:59)INFO   | jvm 1    | 2012/08/16 22:37:06 |       at org.eclipse.jetty.server.Server.doStart(Server.java:272)INFO   | jvm 1    | 2012/08/16 22:37:06 |       at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:59)INFO   | jvm 1    | 2012/08/16 22:37:06 |       at com.atlassian.bamboo.server.Server.main(Server.java:75)INFO   | jvm 1    | 2012/08/16 22:37:06 |       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)INFO   | jvm 1    | 2012/08/16 22:37:06 |       at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)INFO   | jvm 1    | 2012/08/16 22:37:06 |       at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)INFO   | jvm 1    | 2012/08/16 22:37:06 |       at java.lang.reflect.Method.invoke(Unknown Source)INFO   | jvm 1    | 2012/08/16 22:37:06 |       at org.tanukisoftware.wrapper.WrapperSimpleApp.run(WrapperSimpleApp.java:240)INFO   | jvm 1    | 2012/08/16 22:37:06 |       at java.lang.Thread.run(Unknown Source)INFO   | jvm 1    | 2012/08/16 22:37:06 | 2012-08-16 22:37:06.881:WARN:oejuc.AbstractLifeCycle:FAILED SelectChannelConnector@0.0.0.0:8085: java.io.IOException: Function not implementedINFO   | jvm 1    | 2012/08/16 22:37:06 | java.io.IOException: Function not implementedINFO   | jvm 1    | 2012/08/16 22:37:06 |       at sun.nio.ch.EPollArrayWrapper.epollCreate(Native Method)INFO   | jvm 1    | 2012/08/16 22:37:06 |       at sun.nio.ch.EPollArrayWrapper.&lt;init&gt;(Unknown Source)INFO   | jvm 1    | 2012/08/16 22:37:06 |       at sun.nio.ch.EPollSelectorImpl.&lt;init&gt;(Unknown Source)INFO   | jvm 1    | 2012/08/16 22:37:06 |       at sun.nio.ch.EPollSelectorProvider.openSelector(Unknown Source)INFO   | jvm 1    | 2012/08/16 22:37:06 |       at java.nio.channels.Selector.open(Unknown Source)INFO   | jvm 1    | 2012/08/16 22:37:06 |       at org.eclipse.jetty.io.nio.SelectorManager$SelectSet.&lt;init&gt;(SelectorManager.java:411)INFO   | jvm 1    | 2012/08/16 22:37:06 |       at org.eclipse.jetty.io.nio.SelectorManager.doStart(SelectorManager.java:256)INFO   | jvm 1    | 2012/08/16 22:37:06 |       at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:59)INFO   | jvm 1    | 2012/08/16 22:37:06 |       at org.eclipse.jetty.util.component.AggregateLifeCycle.doStart(AggregateLifeCycle.java:63)INFO   | jvm 1    | 2012/08/16 22:37:06 |       at org.eclipse.jetty.server.AbstractConnector.doStart(AbstractConnector.java:319)INFO   | jvm 1    | 2012/08/16 22:37:06 |       at org.eclipse.jetty.server.nio.SelectChannelConnector.doStart(SelectChannelConnector.java:260)INFO   | jvm 1    | 2012/08/16 22:37:06 |       at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:59)INFO   | jvm 1    | 2012/08/16 22:37:06 |       at org.eclipse.jetty.server.Server.doStart(Server.java:272)INFO   | jvm 1    | 2012/08/16 22:37:06 |       at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:59)INFO   | jvm 1    | 2012/08/16 22:37:06 |       at com.atlassian.bamboo.server.Server.main(Server.java:75)INFO   | jvm 1    | 2012/08/16 22:37:06 |       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)INFO   | jvm 1    | 2012/08/16 22:37:06 |       at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)INFO   | jvm 1    | 2012/08/16 22:37:06 |       at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)INFO   | jvm 1    | 2012/08/16 22:37:06 |       at java.lang.reflect.Method.invoke(Unknown Source)INFO   | jvm 1    | 2012/08/16 22:37:06 |       at org.tanukisoftware.wrapper.WrapperSimpleApp.run(WrapperSimpleApp.java:240)INFO   | jvm 1    | 2012/08/16 22:37:06 |       at java.lang.Thread.run(Unknown Source)INFO   | jvm 1    | 2012/08/16 22:37:06 | 2012-08-16 22:37:06.882:WARN:oejuc.AbstractLifeCycle:FAILED com.atlassian.bamboo.server.Server@1dbe345: java.io.IOException: Function not implementedINFO   | jvm 1    | 2012/08/16 22:37:06 | java.io.IOException: Function not implementedINFO   | jvm 1    | 2012/08/16 22:37:06 |       at sun.nio.ch.EPollArrayWrapper.epollCreate(Native Method)INFO   | jvm 1    | 2012/08/16 22:37:06 |       at sun.nio.ch.EPollArrayWrapper.&lt;init&gt;(Unknown Source)INFO   | jvm 1    | 2012/08/16 22:37:06 |       at sun.nio.ch.EPollSelectorImpl.&lt;init&gt;(Unknown Source)INFO   | jvm 1    | 2012/08/16 22:37:06 |       at sun.nio.ch.EPollSelectorProvider.openSelector(Unknown Source)INFO   | jvm 1    | 2012/08/16 22:37:06 |       at java.nio.channels.Selector.open(Unknown Source)INFO   | jvm 1    | 2012/08/16 22:37:06 |       at org.eclipse.jetty.io.nio.SelectorManager$SelectSet.&lt;init&gt;(SelectorManager.java:411)INFO   | jvm 1    | 2012/08/16 22:37:06 |       at org.eclipse.jetty.io.nio.SelectorManager.doStart(SelectorManager.java:256)INFO   | jvm 1    | 2012/08/16 22:37:06 |       at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:59)INFO   | jvm 1    | 2012/08/16 22:37:06 |       at org.eclipse.jetty.util.component.AggregateLifeCycle.doStart(AggregateLifeCycle.java:63)INFO   | jvm 1    | 2012/08/16 22:37:06 |       at org.eclipse.jetty.server.AbstractConnector.doStart(AbstractConnector.java:319)INFO   | jvm 1    | 2012/08/16 22:37:06 |       at org.eclipse.jetty.server.nio.SelectChannelConnector.doStart(SelectChannelConnector.java:260)INFO   | jvm 1    | 2012/08/16 22:37:06 |       at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:59)INFO   | jvm 1    | 2012/08/16 22:37:06 |       at org.eclipse.jetty.server.Server.doStart(Server.java:272)INFO   | jvm 1    | 2012/08/16 22:37:06 |       at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:59)INFO   | jvm 1    | 2012/08/16 22:37:06 |       at com.atlassian.bamboo.server.Server.main(Server.java:75)INFO   | jvm 1    | 2012/08/16 22:37:06 |       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)INFO   | jvm 1    | 2012/08/16 22:37:06 |       at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)INFO   | jvm 1    | 2012/08/16 22:37:06 |       at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)INFO   | jvm 1    | 2012/08/16 22:37:06 |       at java.lang.reflect.Method.invoke(Unknown Source)INFO   | jvm 1    | 2012/08/16 22:37:06 |       at org.tanukisoftware.wrapper.WrapperSimpleApp.run(WrapperSimpleApp.java:240)INFO   | jvm 1    | 2012/08/16 22:37:06 |       at java.lang.Thread.run(Unknown Source)INFO   | jvm 1    | 2012/08/16 22:37:06 | java.io.IOException: Function not implementedINFO   | jvm 1    | 2012/08/16 22:37:06 |       at sun.nio.ch.EPollArrayWrapper.epollCreate(Native Method)INFO   | jvm 1    | 2012/08/16 22:37:06 |       at sun.nio.ch.EPollArrayWrapper.&lt;init&gt;(Unknown Source)INFO   | jvm 1    | 2012/08/16 22:37:06 |       at sun.nio.ch.EPollSelectorImpl.&lt;init&gt;(Unknown Source)INFO   | jvm 1    | 2012/08/16 22:37:06 |       at sun.nio.ch.EPollSelectorProvider.openSelector(Unknown Source)INFO   | jvm 1    | 2012/08/16 22:37:06 |       at java.nio.channels.Selector.open(Unknown Source)INFO   | jvm 1    | 2012/08/16 22:37:06 |       at org.eclipse.jetty.io.nio.SelectorManager$SelectSet.&lt;init&gt;(SelectorManager.java:411)INFO   | jvm 1    | 2012/08/16 22:37:06 |       at org.eclipse.jetty.io.nio.SelectorManager.doStart(SelectorManager.java:256)INFO   | jvm 1    | 2012/08/16 22:37:06 |       at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:59)INFO   | jvm 1    | 2012/08/16 22:37:06 |       at org.eclipse.jetty.util.component.AggregateLifeCycle.doStart(AggregateLifeCycle.java:63)INFO   | jvm 1    | 2012/08/16 22:37:06 |       at org.eclipse.jetty.server.AbstractConnector.doStart(AbstractConnector.java:319)INFO   | jvm 1    | 2012/08/16 22:37:06 |       at org.eclipse.jetty.server.nio.SelectChannelConnector.doStart(SelectChannelConnector.java:260)INFO   | jvm 1    | 2012/08/16 22:37:06 |       at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:59)INFO   | jvm 1    | 2012/08/16 22:37:06 |       at org.eclipse.jetty.server.Server.doStart(Server.java:272)INFO   | jvm 1    | 2012/08/16 22:37:06 |       at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:59)INFO   | jvm 1    | 2012/08/16 22:37:06 |       at com.atlassian.bamboo.server.Server.main(Server.java:75)INFO   | jvm 1    | 2012/08/16 22:37:06 |       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)INFO   | jvm 1    | 2012/08/16 22:37:06 |       at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)INFO   | jvm 1    | 2012/08/16 22:37:06 |       at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)INFO   | jvm 1    | 2012/08/16 22:37:06 |       at java.lang.reflect.Method.invoke(Unknown Source)INFO   | jvm 1    | 2012/08/16 22:37:06 |       at org.tanukisoftware.wrapper.WrapperSimpleApp.run(WrapperSimpleApp.java:240)INFO   | jvm 1    | 2012/08/16 22:37:06 |       at java.lang.Thread.run(Unknown Source)INFO   | jvm 1    | 2012/08/16 22:37:06 |INFO   | jvm 1    | 2012/08/16 22:37:06 |INFO   | jvm 1    | 2012/08/16 22:37:06 | WrapperSimpleApp: Encountered an error running main: java.lang.RuntimeException: java.io.IOException: Function not implementedINFO   | jvm 1    | 2012/08/16 22:37:06 | java.lang.RuntimeException: java.io.IOException: Function not implementedINFO   | jvm 1    | 2012/08/16 22:37:06 |       at com.atlassian.bamboo.server.Server.main(Server.java:97)INFO   | jvm 1    | 2012/08/16 22:37:06 |       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)INFO   | jvm 1    | 2012/08/16 22:37:06 |       at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)INFO   | jvm 1    | 2012/08/16 22:37:06 |       at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)INFO   | jvm 1    | 2012/08/16 22:37:06 |       at java.lang.reflect.Method.invoke(Unknown Source)INFO   | jvm 1    | 2012/08/16 22:37:06 |       at org.tanukisoftware.wrapper.WrapperSimpleApp.run(WrapperSimpleApp.java:240)INFO   | jvm 1    | 2012/08/16 22:37:06 |       at java.lang.Thread.run(Unknown Source)INFO   | jvm 1    | 2012/08/16 22:37:06 | Caused by: java.io.IOException: Function not implementedINFO   | jvm 1    | 2012/08/16 22:37:06 |       at sun.nio.ch.EPollArrayWrapper.epollCreate(Native Method)INFO   | jvm 1    | 2012/08/16 22:37:06 |       at sun.nio.ch.EPollArrayWrapper.&lt;init&gt;(Unknown Source)INFO   | jvm 1    | 2012/08/16 22:37:06 |       at sun.nio.ch.EPollSelectorImpl.&lt;init&gt;(Unknown Source)INFO   | jvm 1    | 2012/08/16 22:37:06 |       at sun.nio.ch.EPollSelectorProvider.openSelector(Unknown Source)INFO   | jvm 1    | 2012/08/16 22:37:06 |       at java.nio.channels.Selector.open(Unknown Source)INFO   | jvm 1    | 2012/08/16 22:37:06 |       at org.eclipse.jetty.io.nio.SelectorManager$SelectSet.&lt;init&gt;(SelectorManager.java:411)INFO   | jvm 1    | 2012/08/16 22:37:06 |       at org.eclipse.jetty.io.nio.SelectorManager.doStart(SelectorManager.java:256)INFO   | jvm 1    | 2012/08/16 22:37:06 |       at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:59)INFO   | jvm 1    | 2012/08/16 22:37:06 |       at org.eclipse.jetty.util.component.AggregateLifeCycle.doStart(AggregateLifeCycle.java:63)INFO   | jvm 1    | 2012/08/16 22:37:06 |       at org.eclipse.jetty.server.AbstractConnector.doStart(AbstractConnector.java:319)INFO   | jvm 1    | 2012/08/16 22:37:06 |       at org.eclipse.jetty.server.nio.SelectChannelConnector.doStart(SelectChannelConnector.java:260)INFO   | jvm 1    | 2012/08/16 22:37:06 |       at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:59)INFO   | jvm 1    | 2012/08/16 22:37:06 |       at org.eclipse.jetty.server.Server.doStart(Server.java:272)INFO   | jvm 1    | 2012/08/16 22:37:06 |       at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:59)INFO   | jvm 1    | 2012/08/16 22:37:06 |       at com.atlassian.bamboo.server.Server.main(Server.java:75)INFO   | jvm 1    | 2012/08/16 22:37:06 |       ... 6 moreSTATUS | wrapper  | 2012/08/16 22:37:08 | JVM exited in response to signal SIGKILL (9).STATUS | wrapper  | 2012/08/16 22:37:08 | &lt;-- Wrapper Stopped
```

I have tried searching for this, but came across very little.. has anyone any ideas as to why this might be? or what it really means? (I know nothing of Java unfortunately).  

Any help / info regarding this would be greatly appreciated! =)  

<br />

<br />

Cheers..  

Ian


Answers:
author: Przemek Bruski
body: It seems that your OS has problems handling Java NIO calls. You can do one of the following things to resolve this:

* install Tomcat and deploy Bamboo's WAR into it (that's more or less how JIRA/Confluence works)
* disable NIO in Jetty in favour of BIO. I was not able to find exact configuration change, but what you have to do is to replace the SelectChannelConnector in jetty.xml with a SocketConnector (this XML snippet: <http://jira.codehaus.org/browse/JETTY-1441> looks helpful).
* switch to a supported operating systems (FreeBSD is not supported, try Linux)
* try upgrading to the latest Java version on your FreeBSD/try upgrading your FreeBSD to the latest version.

comments: author: Ian.H
body: Thanks Przemek for the info.

I have the latest Java versions (JDK and JRE installed) but thinking the most reliable option here will be to change the OS to Linux.

I'll do this and migrate my data across and hopefully this will solve the problem.. or at least give me a proper starting block.


author: ArmenA
body: Hi Ian,  

Cna you please verify that you are using a JDK not only JRE as per this document: [https://confluence.atlassian.com/display/BAMBOO/Supported+platforms?](https://confluence.atlassian.com/display/BAMBOO/Supported+platforms) Also, make sure that you have your JAVA_HOME set. If you are still experiencing the same problem, please open a ticket on [https://support.atlassian.com](https://support.atlassian.com,), and we will continue to investigate this case.

Cheers,  
Armen

comments: author: Ian.H
body: Thanks Armen for your suggestion. I do have the JDK installed and JAVA_HOME env var defined as the JDK root, but after seenig Przemek's response below.. the mention of an OS compatibility issue sounds like it might well be an easy solution and something I was considering anyway.


Tags: startup