Unable to start observer locally

erlang
observer

#1

Hi,

I am trying to start the observer in iex without success. This is my scenario:

Erlang/OTP 20 [erts-9.3] [source] [64-bit] [smp:4:4] [ds:4:4:10] [async-threads:10] [hipe] [kernel-poll:false]

[info] Running HcmWeb.Endpoint with Cowboy using http://0.0.0.0:4000
Interactive Elixir (1.6.4) - press Ctrl+C to exit (type h() ENTER for help)
iex(1)> 21:21:12 - info: compiling
21:21:13 - info: compiled 12 files into 2 files, copied 7 in 5.5 sec

Applications started:

iex(4)> Application.started_applications()
[
  {:hcm, 'hcm', '0.0.1'},
  {:phoenix_ecto, 'Integration between Phoenix & Ecto', '3.3.0'},
  {:postgrex, 'PostgreSQL driver for Elixir.', '0.13.5'},
  ........
  ........
  {:comeonin, 'Password hashing (bcrypt, pbkdf2_sha512) library for Elixir.\n',
   '3.2.0'},
  {:runtime_tools, 'RUNTIME_TOOLS', '1.12.5'},
  {:logger, 'logger', '1.6.4'},
  .........
  ]

Undefined:

iex(5)> :observer.start()
** (UndefinedFunctionError) function :observer.start/0 is undefined (module :observer is not available)
    :observer.start()
iex(5)> 

My mix file

  def application do
    [
      mod: {Hcm.Application, []},
      extra_applications: [
        :logger,
        :runtime_tools,
        :coherence,
        :number,
        :hackney,
        :poison,
        :ssl
      ]
    ]
  end

Not really sure what is happening.

Thanks for the help.


#2

You need to add :observer to the list of applications to start, probably.


#3

How did you install Erlang? Some distributions breaks Erlang in multiple packages, so you need to make sure you have the observer one installed in your system.


#4

I am using OpenSuSe Tumbleweed and I installed Erlang adding the Erlang Repo to the package manager then installing it directly.

zypper repos                                                                                                                                                                           1 ↵
Repository priorities are without effect. All enabled repositories share the same priority.

# | Alias               | Name                        | Enabled | GPG Check | Refresh
--+---------------------+-----------------------------+---------+-----------+--------
1 | PostgreSQL          | PostgreSQL                  | Yes     | (r ) Yes  | No     
2 | erlang              | erlang                      | Yes     | (r ) Yes  | Yes    
3 | google              | google                      | Yes     | (r ) Yes  | No     
4 | openSUSE-20180308-0 | openSUSE-20180308-0         | No      | ----      | ----   
5 | repo-debug          | openSUSE-Tumbleweed-Debug   | No      | ----      | ----   
6 | repo-non-oss        | openSUSE-Tumbleweed-Non-Oss | Yes     | (r ) Yes  | Yes    
7 | repo-oss            | openSUSE-Tumbleweed-Oss     | Yes     | (r ) Yes  | Yes    
8 | repo-source         | openSUSE-Tumbleweed-Source  | No      | ----      | ----   
9 | repo-update         | openSUSE-Tumbleweed-Update  | Yes     | (r ) Yes  | Yes    
------------------------------------------------------------

To install:

sudo zypper install erlang

Based on your suggestion, I check the repo for the observer package and it was not installed:

~ » zypper info erlang-observer
Loading repository data...
Reading installed packages...

Information for package erlang-observer:
----------------------------------------
Repository     : openSUSE-Tumbleweed-Oss                  
Name           : erlang-observer                          
Version        : 20.3.2-1.2                               
Arch           : x86_64                                   
Vendor         : openSUSE                                 
Installed Size : 1.1 MiB                                  
Installed      : No                                       
Status         : not installed                            
Source package : erlang-20.3.2-1.2.src                    
Summary        : A GUI tool for observing an erlang system
Description    :                                          
    The observer is gui frontend containing various tools to inspect a system.
    It displays system information, application structures, process information,
    ets or mnesia tables and a frontend for tracing with ttb.

------------------------------------------------------------

So I finally installed it and everything works fine.

sudo zypper install erlang-observer

Thanks. I didn’t expect that I had a partial Erlang installation.

Best regards.


#5

I think even the ‘official’ ErlangSolutions are deprecating their all-in-one package as I recall, so even officially it is broken up now.


#6

I’ve had the same issue in Fedora 29. Just did:

# dnf install erlang-observer

Everything is ok now.