Eric Merritt | 2 Jun 2012 17:23
Picon
Gravatar

possible bug in package loading

I realize that packages are not technically supported. However, I ran
across a rather ugly (possible) bug that, as long as packages are in
the language, should probably be resolved.

The bug is this. Lets say you have a bin dir at
/some/directory/structure/ebin and you have packages under this, say
package foo.shell. If you accidentally set your package to
some/directory/structure/ebin/foo the code loader dies saying

=ERROR REPORT==== 2-Jun-2012::10:17:17 ===
beam/beam_load.c(1250): Error loading module shell:
  module name in object code is foo.shell

Technically I can see why this is an issue. However, I suspect it can
be handled better then it currently is.

Eric
_______________________________________________
erlang-bugs mailing list
erlang-bugs <at> erlang.org
http://erlang.org/mailman/listinfo/erlang-bugs

PAILLEAU Eric | 3 Jun 2012 11:38
Picon

Re: net_adm:ping annoying messages due to /etc/hosts content

Hi,
any feedback on this ?

I know it is not a blocking issue, but my logs are full of these
messages and I can't have access to the /etc/hosts in "real life" at my
customer environment.

Is any way to get rid of this whitout access to /etc/hosts ?

Regards.

Le 15/04/2012 19:27, PAILLEAU Eric a écrit :
> Hi,
> 
> I don't know if it is a bug but I get very annoying SASL error messages
> as below when I use net_adm:ping() :
> 
> ---8<----------------------------------------------------
> =ERROR REPORT==== 15-Apr-2012::19:07:44 ===
> ** System running to use fully qualified hostnames **
> ** Hostname localhost is illegal **
> ---8<----------------------------------------------------
> 
> because I have in my /etc/hosts
> 
> ---8<----------------------------------------------------
> 127.0.0.1  localhost
> ---8<----------------------------------------------------
> 
> I understand that hostnames known by Erlang should be fully qualified
(Continue reading)

PAILLEAU Eric | 3 Jun 2012 14:51
Picon

Re: net_adm:ping annoying messages due to /etc/hosts content

Le 03/06/2012 11:48, Gleb Peregud a écrit :
> On Sun, Jun 3, 2012 at 11:38 AM, PAILLEAU Eric <eric.pailleau <at> wanadoo.fr> wrote:
>> Hi,
>> any feedback on this ?
>>
>> I know it is not a blocking issue, but my logs are full of these
>> messages and I can't have access to the /etc/hosts in "real life" at my
>> customer environment.
> 
> This is problematic, since usually Erlang systems are run on hosts
> with full access to all parts of the system. Hence usually it is
> acceptable to tune the system for running Erlang apps. You might be in
> a very rare situation.
rare, maybe. But I guess that many erlang nodes are not running in root
privileges and the goal of using a virtual machine should to be
independant of any OS constraints ...

> 
>> Is any way to get rid of this whitout access to /etc/hosts ?
> 
> What about running with -sname ?
> 
I don't have this behaviour with -sname in my test environment.
(this is also the strange thing because 'localhost' is not fully
qualifed ...)
But I suppose the use of -name is depending of the distribution between
subnets in different datacenters. I can't change this without knowing
what I do and without customer agreement.
This could be a workaround in some case, maybe I can see at changing the
event manager to ignore this kind of message at SASL level,
(Continue reading)

PAILLEAU Eric | 3 Jun 2012 15:54
Picon

Re: net_adm:ping annoying messages due to /etc/hosts content


> 
> Have you tried running all your nodes (including temporary ones) with
> explicitly set name? Like this:
> erl -name app <at> hostname.domain -boot ....
> 

Hi,
sorry but I do not understand your answer upper .
When using -name it is mandatory to have app <at> hostname.domain , if not
init crashes :
(for example  -name app  )
{error_logger,{{2012,6,3},{15,48,32}},"Can't set long node name!\nPlease
check your configuration\n",[]}

_______________________________________________
erlang-bugs mailing list
erlang-bugs <at> erlang.org
http://erlang.org/mailman/listinfo/erlang-bugs

PAILLEAU Eric | 3 Jun 2012 16:38
Picon

Re: net_adm:ping annoying messages due to /etc/hosts content


> 
> 127.0.0.1 host.lan host
> 
> 
> Why is 'localhost' is coming up at all in SASL logs? Do you start any
> of your nodes as "erl -name app <at> localhost"?
> 
Hi,
it is mandatory for me because I do not have the short name in
/etc/host, only the long name.
i.e.
192.168.13.1	test1 <at> myhost.mydomain.priv
not
192.168.13.1	test1 <at> myhost.mydomain.priv   test1

in second case -name test1  works. You are right.

No we do not use 127.0.0.1 neither localhost for a node name.

I have something like

192.168.13.1	test1 <at> myhost.mydomain.priv
192.168.13.2	test2 <at> myhost.mydomain.priv
...

and the simple fact to have in /etc/hosts :
127.0.0.1       localhost

create the problem, even it is not used...
(Continue reading)

PAILLEAU Eric | 3 Jun 2012 16:44
Picon

Re: net_adm:ping annoying messages due to /etc/hosts content


> i.e.
> 192.168.13.1	test1 <at> myhost.mydomain.priv
> not
> 192.168.13.1	test1 <at> myhost.mydomain.priv   test1
Sorry read :
192.168.13.1	test1 <at> myhost.mydomain.priv   myhost

_______________________________________________
erlang-bugs mailing list
erlang-bugs <at> erlang.org
http://erlang.org/mailman/listinfo/erlang-bugs

PAILLEAU Eric | 3 Jun 2012 17:51
Picon

Re: net_adm:ping annoying messages due to /etc/hosts content


> 
> I will try with
> 127.0.0.1	localhost.mydomain.priv localhost
> to see what happens

Hi,
does not change the problem...
I suppose I have to ask my customer to remove
127.0.0.1 localhost
in /etc/hosts or set another name to loopback...

It would be nice if somebody in the mailing list
can test if the problem occurs in its own environment.

May be OTP team can explain this, next week.

regards.
_______________________________________________
erlang-bugs mailing list
erlang-bugs <at> erlang.org
http://erlang.org/mailman/listinfo/erlang-bugs

Beads Land-Trujillo | 3 Jun 2012 22:32
Picon
Gravatar

Re: possible bug in package loading

Hi Eric,

Would be interested in some clarification as to what you're thinking might
be handled "better" here?  Unless I'm mistaken, this is per spec.  

One can argue with the elegance of the spec (I'm actually working on some
hacks for using packages to get around this design), which is why I'm
interested in the question.  

Is your contention that the compiler should generate some other sort of
message when finding a module declaration that doesn't match the directory
structure as mapped to a package path?

- Beads

http://tanglelabs.com/

-----Original Message-----
From: erlang-bugs-bounces <at> erlang.org [mailto:erlang-bugs-bounces <at> erlang.org]
On Behalf Of Eric Merritt
Sent: Saturday, June 02, 2012 11:23 AM
To: erlang-bugs <at> erlang.org
Subject: [erlang-bugs] possible bug in package loading

I realize that packages are not technically supported. However, I ran across
a rather ugly (possible) bug that, as long as packages are in the language,
should probably be resolved.

The bug is this. Lets say you have a bin dir at
/some/directory/structure/ebin and you have packages under this, say package
(Continue reading)

Eric Merritt | 4 Jun 2012 01:45
Picon
Gravatar

Re: possible bug in package loading

On Sun, Jun 3, 2012 at 3:32 PM, Beads Land-Trujillo
<beads.d.land <at> gmail.com> wrote:
> Hi Eric,
>
> Would be interested in some clarification as to what you're thinking might
> be handled "better" here?  Unless I'm mistaken, this is per spec.

It could be per spec. It just seams like a poor user experience. I
would probably just wander up the directory chain to see if the module
name matches the current structure. That said I suspect there are a
couple of unintended  consequences to that.

>
> One can argue with the elegance of the spec (I'm actually working on some
> hacks for using packages to get around this design), which is why I'm
> interested in the question.
>
> Is your contention that the compiler should generate some other sort of
> message when finding a module declaration that doesn't match the directory
> structure as mapped to a package path?

I would say that it shouldn't actually be an error. Maybe an
informational message to get folks to fix their paths but that it. The
module is good and in the path after all.

That said its not a big deal. I have only run across this once and it
was pretty easy to figure out the issue and get it resolved.

>
> - Beads
(Continue reading)

Raimo Niskanen | 4 Jun 2012 09:15
Picon
Picon

Re: net_adm:ping annoying messages due to /etc/hosts content

On Sun, Apr 15, 2012 at 07:27:34PM +0200, PAILLEAU Eric wrote:
> Hi,
> 
> I don't know if it is a bug but I get very annoying SASL error messages
> as below when I use net_adm:ping() :

What are the arguments when starting the node?
Which is the argument to net_adm:ping()?
Which is your Erlang/OTP version? [erlang:system_info(system_version)]

> 
> ---8<----------------------------------------------------
> =ERROR REPORT==== 15-Apr-2012::19:07:44 ===
> ** System running to use fully qualified hostnames **
> ** Hostname localhost is illegal **
> ---8<----------------------------------------------------
> 
> because I have in my /etc/hosts
> 
> ---8<----------------------------------------------------
> 127.0.0.1  localhost
> ---8<----------------------------------------------------
> 
> I understand that hostnames known by Erlang should be fully qualified
> when node is starting with -name but I wonder why it cares about
> shortnames and especially to localhost because :
> 
> the strange thing is that when I change to :
> ---8<----------------------------------------------------
> 127.0.0.1  mylocalhost
(Continue reading)


Gmane