You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ambari.apache.org by Robert Nettleton <rn...@hortonworks.com> on 2014/10/26 20:00:02 UTC
Issues with "os_family.json" file while debugging with Ambari trunk
Hi All,
I’ve run into a problem with Ambari startup when debugging my patches, and was wondering if anyone else has seen this.
Typically, since the Ambari RPM builds take so long, I usually use maven to build the ambari-server jar (since my work has resided only in that jar so far), setup Ambari trunk in a Centos VM, and then copied over my ambari-server.jar changes before debugging. This tends to be the fastest way to test/debug, and I’ve never run into an issue with this approach before.
Since yesterday, this approach no longer appears to work. If I install Ambari from the trunk yum repository, and then update the ambari-server.jar, the ambari-server startup fails, with the error that I’ve included below.
It looks like there is some kind of new check on an “os_family.json” file, and this keeps the Ambari server from starting up.
Is anyone else seeing this?
If so, is there a workaround for this problem? Other than building the ambari jars with maven, are there other build steps I can run manually to workaround this issue?
I would imagine that the RPM builds handle this somehow, but this is generally not practical for most development purposes.
I’d appreciate any pointers anyone has to work around this.
Thanks,
Bob
Here’s the error I’m seeing at startup:
Exception in thread "main" java.lang.RuntimeException: Could not load OS family definition from %s file
at org.apache.ambari.server.state.stack.OsFamily.init(OsFamily.java:80)
at org.apache.ambari.server.state.stack.OsFamily.<init>(OsFamily.java:57)
at org.apache.ambari.server.controller.ControllerModule.<init>(ControllerModule.java:137)
at org.apache.ambari.server.controller.AmbariServer.main(AmbariServer.java:649)
--
CONFIDENTIALITY NOTICE
NOTICE: This message is intended for the use of the individual or entity to
which it is addressed and may contain information that is confidential,
privileged and exempt from disclosure under applicable law. If the reader
of this message is not the intended recipient, you are hereby notified that
any printing, copying, dissemination, distribution, disclosure or
forwarding of this communication is strictly prohibited. If you have
received this communication in error, please contact the sender immediately
and delete it from your system. Thank You.
Re: Issues with "os_family.json" file while debugging with Ambari trunk
Posted by Jonathan Hurley <jh...@hortonworks.com>.
Hi Bob,
Yes, JavaMail SMTP was added as a dependency for alerts. Maven should be taking care of pulling in these resources for you.
On Oct 27, 2014, at 11:40 AM, Robert Nettleton <rn...@hortonworks.com> wrote:
> Hi Nate,
>
> Thanks for the reply.
>
> I modified my ambari.properties file as you recommended, and it does seem to resolve this particular problem.
>
> I then run into some classloading issues at startup, including the error below.
>
> Have there been any major dependency changes in ambari-server recently?
>
>
> Thanks,
> Bob
>
>
> Exception in thread "main" com.google.inject.CreationException: Guice creation errors:
>
> 1) Error injecting constructor, java.lang.NoClassDefFoundError: javax/mail/MessagingException
> at org.apache.ambari.server.notifications.DispatchFactory.<init>(DispatchFactory.java:46)
> at org.apache.ambari.server.notifications.DispatchFactory.class(DispatchFactory.java:39)
> while locating org.apache.ambari.server.notifications.DispatchFactory
> for field at org.apache.ambari.server.state.services.AlertNoticeDispatchService.m_dispatchFactory(AlertNoticeDispatchService.java:74)
> at org.apache.ambari.server.controller.ControllerModule.bindServices(ControllerModule.java:334)
>
> 1 error
> at com.google.inject.internal.Errors.throwCreationExceptionIfErrorsExist(Errors.java:435)
> at com.google.inject.internal.InternalInjectorCreator.injectDynamically(InternalInjectorCreator.java:175)
> at com.google.inject.internal.InternalInjectorCreator.build(InternalInjectorCreator.java:109)
> at com.google.inject.Guice.createInjector(Guice.java:95)
> at com.google.inject.Guice.createInjector(Guice.java:72)
> at com.google.inject.Guice.createInjector(Guice.java:62)
> at org.apache.ambari.server.controller.AmbariServer.main(AmbariServer.java:665)
> Caused by: java.lang.NoClassDefFoundError: javax/mail/MessagingException
> at java.lang.Class.getDeclaredConstructors0(Native Method)
> at java.lang.Class.privateGetDeclaredConstructors(Class.java:2532)
> at java.lang.Class.getDeclaredConstructors(Class.java:1901)
> at com.google.inject.spi.InjectionPoint.forConstructorOf(InjectionPoint.java:243)
> at com.google.inject.internal.ConstructorBindingImpl.create(ConstructorBindingImpl.java:96)
> at com.google.inject.internal.InjectorImpl.createUninitializedBinding(InjectorImpl.java:629)
> at com.google.inject.internal.InjectorImpl.createJustInTimeBinding(InjectorImpl.java:845)
> at com.google.inject.internal.InjectorImpl.createJustInTimeBindingRecursive(InjectorImpl.java:772)
> at com.google.inject.internal.InjectorImpl.getJustInTimeBinding(InjectorImpl.java:256)
> at com.google.inject.internal.InjectorImpl.getBindingOrThrow(InjectorImpl.java:205)
> at com.google.inject.internal.InjectorImpl.getInternalFactory(InjectorImpl.java:853)
> at com.google.inject.internal.InjectorImpl.getProviderOrThrow(InjectorImpl.java:967)
>
> On Oct 27, 2014, at 7:45 AM, Nate Cole <nc...@hortonworks.com> wrote:
>
>> You need to specify where to find os_family.json by setting the following property in your ambari.properties file:
>>
>> shared.resources.dir=$SRC_HOME/ambari-common/src/main/python/ambari_commons/resources
>>
>>
>> Thanks
>>
>> On Oct 26, 2014, at 3:00 PM, Robert Nettleton <rn...@hortonworks.com> wrote:
>>
>>> Hi All,
>>>
>>> I’ve run into a problem with Ambari startup when debugging my patches, and was wondering if anyone else has seen this.
>>>
>>> Typically, since the Ambari RPM builds take so long, I usually use maven to build the ambari-server jar (since my work has resided only in that jar so far), setup Ambari trunk in a Centos VM, and then copied over my ambari-server.jar changes before debugging. This tends to be the fastest way to test/debug, and I’ve never run into an issue with this approach before.
>>>
>>> Since yesterday, this approach no longer appears to work. If I install Ambari from the trunk yum repository, and then update the ambari-server.jar, the ambari-server startup fails, with the error that I’ve included below.
>>>
>>> It looks like there is some kind of new check on an “os_family.json” file, and this keeps the Ambari server from starting up.
>>>
>>> Is anyone else seeing this?
>>>
>>> If so, is there a workaround for this problem? Other than building the ambari jars with maven, are there other build steps I can run manually to workaround this issue?
>>>
>>> I would imagine that the RPM builds handle this somehow, but this is generally not practical for most development purposes.
>>>
>>> I’d appreciate any pointers anyone has to work around this.
>>>
>>> Thanks,
>>> Bob
>>>
>>> Here’s the error I’m seeing at startup:
>>>
>>> Exception in thread "main" java.lang.RuntimeException: Could not load OS family definition from %s file
>>> at org.apache.ambari.server.state.stack.OsFamily.init(OsFamily.java:80)
>>> at org.apache.ambari.server.state.stack.OsFamily.<init>(OsFamily.java:57)
>>> at org.apache.ambari.server.controller.ControllerModule.<init>(ControllerModule.java:137)
>>> at org.apache.ambari.server.controller.AmbariServer.main(AmbariServer.java:649)
>>> --
>>> CONFIDENTIALITY NOTICE
>>> NOTICE: This message is intended for the use of the individual or entity to
>>> which it is addressed and may contain information that is confidential,
>>> privileged and exempt from disclosure under applicable law. If the reader
>>> of this message is not the intended recipient, you are hereby notified that
>>> any printing, copying, dissemination, distribution, disclosure or
>>> forwarding of this communication is strictly prohibited. If you have
>>> received this communication in error, please contact the sender immediately
>>> and delete it from your system. Thank You.
>>
>>
>> --
>> CONFIDENTIALITY NOTICE
>> NOTICE: This message is intended for the use of the individual or entity to
>> which it is addressed and may contain information that is confidential,
>> privileged and exempt from disclosure under applicable law. If the reader
>> of this message is not the intended recipient, you are hereby notified that
>> any printing, copying, dissemination, distribution, disclosure or
>> forwarding of this communication is strictly prohibited. If you have
>> received this communication in error, please contact the sender immediately
>> and delete it from your system. Thank You.
>
>
> --
> CONFIDENTIALITY NOTICE
> NOTICE: This message is intended for the use of the individual or entity to
> which it is addressed and may contain information that is confidential,
> privileged and exempt from disclosure under applicable law. If the reader
> of this message is not the intended recipient, you are hereby notified that
> any printing, copying, dissemination, distribution, disclosure or
> forwarding of this communication is strictly prohibited. If you have
> received this communication in error, please contact the sender immediately
> and delete it from your system. Thank You.
--
CONFIDENTIALITY NOTICE
NOTICE: This message is intended for the use of the individual or entity to
which it is addressed and may contain information that is confidential,
privileged and exempt from disclosure under applicable law. If the reader
of this message is not the intended recipient, you are hereby notified that
any printing, copying, dissemination, distribution, disclosure or
forwarding of this communication is strictly prohibited. If you have
received this communication in error, please contact the sender immediately
and delete it from your system. Thank You.
Re: Issues with "os_family.json" file while debugging with Ambari trunk
Posted by Robert Nettleton <rn...@hortonworks.com>.
Hi Nate,
Thanks for the reply.
I modified my ambari.properties file as you recommended, and it does seem to resolve this particular problem.
I then run into some classloading issues at startup, including the error below.
Have there been any major dependency changes in ambari-server recently?
Thanks,
Bob
Exception in thread "main" com.google.inject.CreationException: Guice creation errors:
1) Error injecting constructor, java.lang.NoClassDefFoundError: javax/mail/MessagingException
at org.apache.ambari.server.notifications.DispatchFactory.<init>(DispatchFactory.java:46)
at org.apache.ambari.server.notifications.DispatchFactory.class(DispatchFactory.java:39)
while locating org.apache.ambari.server.notifications.DispatchFactory
for field at org.apache.ambari.server.state.services.AlertNoticeDispatchService.m_dispatchFactory(AlertNoticeDispatchService.java:74)
at org.apache.ambari.server.controller.ControllerModule.bindServices(ControllerModule.java:334)
1 error
at com.google.inject.internal.Errors.throwCreationExceptionIfErrorsExist(Errors.java:435)
at com.google.inject.internal.InternalInjectorCreator.injectDynamically(InternalInjectorCreator.java:175)
at com.google.inject.internal.InternalInjectorCreator.build(InternalInjectorCreator.java:109)
at com.google.inject.Guice.createInjector(Guice.java:95)
at com.google.inject.Guice.createInjector(Guice.java:72)
at com.google.inject.Guice.createInjector(Guice.java:62)
at org.apache.ambari.server.controller.AmbariServer.main(AmbariServer.java:665)
Caused by: java.lang.NoClassDefFoundError: javax/mail/MessagingException
at java.lang.Class.getDeclaredConstructors0(Native Method)
at java.lang.Class.privateGetDeclaredConstructors(Class.java:2532)
at java.lang.Class.getDeclaredConstructors(Class.java:1901)
at com.google.inject.spi.InjectionPoint.forConstructorOf(InjectionPoint.java:243)
at com.google.inject.internal.ConstructorBindingImpl.create(ConstructorBindingImpl.java:96)
at com.google.inject.internal.InjectorImpl.createUninitializedBinding(InjectorImpl.java:629)
at com.google.inject.internal.InjectorImpl.createJustInTimeBinding(InjectorImpl.java:845)
at com.google.inject.internal.InjectorImpl.createJustInTimeBindingRecursive(InjectorImpl.java:772)
at com.google.inject.internal.InjectorImpl.getJustInTimeBinding(InjectorImpl.java:256)
at com.google.inject.internal.InjectorImpl.getBindingOrThrow(InjectorImpl.java:205)
at com.google.inject.internal.InjectorImpl.getInternalFactory(InjectorImpl.java:853)
at com.google.inject.internal.InjectorImpl.getProviderOrThrow(InjectorImpl.java:967)
On Oct 27, 2014, at 7:45 AM, Nate Cole <nc...@hortonworks.com> wrote:
> You need to specify where to find os_family.json by setting the following property in your ambari.properties file:
>
> shared.resources.dir=$SRC_HOME/ambari-common/src/main/python/ambari_commons/resources
>
>
> Thanks
>
> On Oct 26, 2014, at 3:00 PM, Robert Nettleton <rn...@hortonworks.com> wrote:
>
>> Hi All,
>>
>> I’ve run into a problem with Ambari startup when debugging my patches, and was wondering if anyone else has seen this.
>>
>> Typically, since the Ambari RPM builds take so long, I usually use maven to build the ambari-server jar (since my work has resided only in that jar so far), setup Ambari trunk in a Centos VM, and then copied over my ambari-server.jar changes before debugging. This tends to be the fastest way to test/debug, and I’ve never run into an issue with this approach before.
>>
>> Since yesterday, this approach no longer appears to work. If I install Ambari from the trunk yum repository, and then update the ambari-server.jar, the ambari-server startup fails, with the error that I’ve included below.
>>
>> It looks like there is some kind of new check on an “os_family.json” file, and this keeps the Ambari server from starting up.
>>
>> Is anyone else seeing this?
>>
>> If so, is there a workaround for this problem? Other than building the ambari jars with maven, are there other build steps I can run manually to workaround this issue?
>>
>> I would imagine that the RPM builds handle this somehow, but this is generally not practical for most development purposes.
>>
>> I’d appreciate any pointers anyone has to work around this.
>>
>> Thanks,
>> Bob
>>
>> Here’s the error I’m seeing at startup:
>>
>> Exception in thread "main" java.lang.RuntimeException: Could not load OS family definition from %s file
>> at org.apache.ambari.server.state.stack.OsFamily.init(OsFamily.java:80)
>> at org.apache.ambari.server.state.stack.OsFamily.<init>(OsFamily.java:57)
>> at org.apache.ambari.server.controller.ControllerModule.<init>(ControllerModule.java:137)
>> at org.apache.ambari.server.controller.AmbariServer.main(AmbariServer.java:649)
>> --
>> CONFIDENTIALITY NOTICE
>> NOTICE: This message is intended for the use of the individual or entity to
>> which it is addressed and may contain information that is confidential,
>> privileged and exempt from disclosure under applicable law. If the reader
>> of this message is not the intended recipient, you are hereby notified that
>> any printing, copying, dissemination, distribution, disclosure or
>> forwarding of this communication is strictly prohibited. If you have
>> received this communication in error, please contact the sender immediately
>> and delete it from your system. Thank You.
>
>
> --
> CONFIDENTIALITY NOTICE
> NOTICE: This message is intended for the use of the individual or entity to
> which it is addressed and may contain information that is confidential,
> privileged and exempt from disclosure under applicable law. If the reader
> of this message is not the intended recipient, you are hereby notified that
> any printing, copying, dissemination, distribution, disclosure or
> forwarding of this communication is strictly prohibited. If you have
> received this communication in error, please contact the sender immediately
> and delete it from your system. Thank You.
--
CONFIDENTIALITY NOTICE
NOTICE: This message is intended for the use of the individual or entity to
which it is addressed and may contain information that is confidential,
privileged and exempt from disclosure under applicable law. If the reader
of this message is not the intended recipient, you are hereby notified that
any printing, copying, dissemination, distribution, disclosure or
forwarding of this communication is strictly prohibited. If you have
received this communication in error, please contact the sender immediately
and delete it from your system. Thank You.
Re: Issues with "os_family.json" file while debugging with Ambari trunk
Posted by Nate Cole <nc...@hortonworks.com>.
You need to specify where to find os_family.json by setting the following property in your ambari.properties file:
shared.resources.dir=$SRC_HOME/ambari-common/src/main/python/ambari_commons/resources
Thanks
On Oct 26, 2014, at 3:00 PM, Robert Nettleton <rn...@hortonworks.com> wrote:
> Hi All,
>
> I’ve run into a problem with Ambari startup when debugging my patches, and was wondering if anyone else has seen this.
>
> Typically, since the Ambari RPM builds take so long, I usually use maven to build the ambari-server jar (since my work has resided only in that jar so far), setup Ambari trunk in a Centos VM, and then copied over my ambari-server.jar changes before debugging. This tends to be the fastest way to test/debug, and I’ve never run into an issue with this approach before.
>
> Since yesterday, this approach no longer appears to work. If I install Ambari from the trunk yum repository, and then update the ambari-server.jar, the ambari-server startup fails, with the error that I’ve included below.
>
> It looks like there is some kind of new check on an “os_family.json” file, and this keeps the Ambari server from starting up.
>
> Is anyone else seeing this?
>
> If so, is there a workaround for this problem? Other than building the ambari jars with maven, are there other build steps I can run manually to workaround this issue?
>
> I would imagine that the RPM builds handle this somehow, but this is generally not practical for most development purposes.
>
> I’d appreciate any pointers anyone has to work around this.
>
> Thanks,
> Bob
>
> Here’s the error I’m seeing at startup:
>
> Exception in thread "main" java.lang.RuntimeException: Could not load OS family definition from %s file
> at org.apache.ambari.server.state.stack.OsFamily.init(OsFamily.java:80)
> at org.apache.ambari.server.state.stack.OsFamily.<init>(OsFamily.java:57)
> at org.apache.ambari.server.controller.ControllerModule.<init>(ControllerModule.java:137)
> at org.apache.ambari.server.controller.AmbariServer.main(AmbariServer.java:649)
> --
> CONFIDENTIALITY NOTICE
> NOTICE: This message is intended for the use of the individual or entity to
> which it is addressed and may contain information that is confidential,
> privileged and exempt from disclosure under applicable law. If the reader
> of this message is not the intended recipient, you are hereby notified that
> any printing, copying, dissemination, distribution, disclosure or
> forwarding of this communication is strictly prohibited. If you have
> received this communication in error, please contact the sender immediately
> and delete it from your system. Thank You.
--
CONFIDENTIALITY NOTICE
NOTICE: This message is intended for the use of the individual or entity to
which it is addressed and may contain information that is confidential,
privileged and exempt from disclosure under applicable law. If the reader
of this message is not the intended recipient, you are hereby notified that
any printing, copying, dissemination, distribution, disclosure or
forwarding of this communication is strictly prohibited. If you have
received this communication in error, please contact the sender immediately
and delete it from your system. Thank You.