Erlang webtool won't start - module

Just wondering what is going on with my Erlang webtool. I am running Ubuntu 15.10 and I have checked that the erlang-webtool package is installed. However, when I try to run it I get the following:
1> webtool:start().
{error,
{shutdown,
{failed_to_start_child,
{httpd_instance_sup,{127,0,0,1},8888,default},
{shutdown,
{failed_to_start_child,
{httpd_manager,{127,0,0,1},8888,default},
{error,
{invalid_option,
{module_does_not_exist,mod_include}}}}}}}}
=ERROR REPORT==== 7-Mar-2016::15:47:36 ===
Failed initiating web server:
undefined
{invalid_option,{module_does_not_exist,mod_include}}
My version of Erlang: Erlang/OTP 18 [erts-7.0] [source] [64-bit] [smp:8:8] [async-threads:10] [kernel-poll:false]
Any ideas? Thanks.

Webtool appears to be broken in E/OTP 18. I see the same thing, and when I removed the mention of mod_include (which no longer exists) then webtool works.
For the quick fix: edit you webtool.erl by hand, remove the line that mentions mod_include, run erlc webtool.erl and then copy the resulting webtool.beam to the ebin directory, overwriting the existing file there.
For the proper fix, I've opened a PR: https://github.com/erlang/otp/pull/985
Edit: the verdict from the PR is that webtool is deprecated and will not be present at all in version 19. It's also not important enough to make an unplanned patch. If something important comes up (like a security-related bug) then the patch for that will probably include the fix to webtool. However, your best bets are either to downgrade to a lower version where webtool is not broken or to perform the manual fix I outlined above.

Related

How to start rabbitMQ without package manager in Linux?

In order to prepare internal project, I'm preparing to use RabbitMQ.
But, I faced serious problem when I start to run rabbitMQ.
I have to assume environment that we couldn't use internet.
Of course, I can use RPM installer, but I prefer to build source to learn Linux.
So, I downloaded latest Erlang and RabbitMQ tar sources at this moment.
First step, I extracted erlang to custom directory such as /square/dpa/rabbitmq/otp_src_22.1
then moved to that directory, then I did below commands.
./configure --without-termcap --with-ssl --prefix=/square/dpa/rabbitmq/erlang
make
make install
(Of course, I added erlang directory into PATH manually.)
Then, I extracted rabbitmq on specific directory also such as /square/dpa/rabbitmq/rabbitmq_server-3.8.1, then moved to /sbin, run './rabbitmq-server'
Unfortunately, I faced below fail log.
So how I can solve this problem? I can just expect that it was occured Erlang-Crypto is not installed.
If my expectation is correct, pls let me know how to install crypto,
and if there's another reason, pls tell me free your opinion.
-------------- log for './rabbitmq-server'
BOOT FAILED
Error description:
init:do_boot/3
init:start_em/1
rabbit:start_it/1 line 465
rabbit:broker_start/1 line 341
rabbit:start_loaded_apps/2 line 591
app_utils:manage_applications/6 line 126
lists:foldl/3 line 1263
rabbit:'-handle_app_error/1-fun-0-'/3 line 714
throw:{could_not_start,credentials_obfuscation,
{credentials_obfuscation,
{bad_return,
{{credentials_obfuscation_app,start,[normal,[]]},
{'EXIT',
{undef,
[{crypto,strong_rand_bytes,[128],[]},
{credentials_obfuscation_app,start,2,
[{file,"src/credentials_obfuscation_app.erl"},
{line,34}]},
{application_master,start_it_old,4,
[{file,"application_master.erl"},
{line,277}]}]}}}}}}
Log file(s) (may contain more information):
/square/dpa/rabbitmq/rabbitmq_server-3.8.1/var/log/rabbitmq/rabbit#epsqpad01.log
/square/dpa/rabbitmq/rabbitmq_server-3.8.1/var/log/rabbitmq/rabbit#epsqpad01_upgrade.log
{"init terminating in do_boot",{could_not_start,credentials_obfuscation,{credentials_obfuscation,{bad_return,{{credentials_obfuscation_app,start,[normal,[]]},{'EXIT',{undef,[{crypto,strong_rand_bytes,[128],[]},{credentials_obfuscation_app,start,2,[{file,"src/credentials_obfuscation_app.erl"},{line,34}]},{application_master,start_it_old,4,[{file,"application_master.erl"},{line,277}]}]}}}}}}}
init terminating in do_boot ({could_not_start,credentials_obfuscation,{credentials_obfuscation,{bad_return,{{_},{_}}}}})

Stopping systemd service with salt-tack

I am using salt-stack to manage my production machine.
The minions run Raspbian and my and I have configured a systemd service. The services config file is located at /lib/systemd/system/my_service.service
When I run the following command:
sudo salt my_minion service.stop my_service
The following error is returned:
ERROR: Unable to run command ['/etc/init.d/my_service', 'stop'] with the context {'with_communicate': True, 'shell': False, 'env': {'LANG': 'en_GB.UTF-8', 'PATH': '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', 'LC_ALL': 'C'}, 'stdout': -1, 'close_fds': True, 'stdin': None, 'stderr': -2, 'cwd': '/root'}, reason: [Errno 2] No such file or directory
I understand that salt tries to use sysvinit instead of systemd.
Is there any way to tell salt to use systemd?
EDIT:
Tried adding
providers:
service: systemd
to /etc/salt/minion as suggested by Eric. Still getting the same error
EDIT 2
The issue was fixed by using Erics suggestion + upgrading salt-minion to 2015.8.8 from 2015.8.3
This is almost certainly because newer Raspbian is based off of Debian 8, and Salt's systemd execution module does not properly detect newer Raspbian as needing systemd. Can the OP please reply to this message with the output from sudo salt my_minion grains.items? Please redact any grains which you feel have personally-identifiable information, I'm mainly interested in the grains that deal with OS name and version.
EDIT: One more thing. Please confirm that /run/systemd/system exists on the Raspbian box. What I think is happening here is two modules are both claiming to be the ones to provide the service module.
https://github.com/saltstack/salt/pull/32421 should fix this, but you can work around this immediately (without waiting for a new Salt release) by adding the following to /etc/salt/minion on your Raspbian minions:
providers:
service: systemd

Systemtap libdwfl error on Linux

I am tying to work/setup the Systemtap tool for profiling OS procesess, on a Virtual Linux. I am using VirtualBox to run the image. Via
rpm -q kernel
and
cat /proc/version
The version obtained is:
Linux version 2.6.32-5-686 (Debian 2.6.32-48squeeze4)
I have correctly downloaded and installed the tool and wrote a simple program (.stp). However I keep getting the same error, which I have searched information in many places without success:
After executing:
sudo stap my_profiler.stp
I get:
semantic error: libdwfl failure (all kernel modules found): no error
Pass 3: translation failed. Try again with another '--vp 001' option.
According to https://sourceware.org/systemtap/SystemTap_Beginners_Guide/errors.html
⁠semantic error: libdwfl failure
There was a problem processing the debugging information. In most cases, this error results from the installation of a kernel-debuginfo package whose version does not match the probed kernel exactly. The installed kernel-debuginfo package itself may have some consistency or correctness problems.
I have found no relevant information on the "kernel-debuginfo" package. I have also tried the verbose option without benefit. I even tried with an old Snapshot of the VM. Any ideas?
The code of the .stp program I ran:
probe timer.profile{
printf("Process: %s\n", execname())
printf("Process ID: %d\n", pid())
}
Found the problem!!!! It seemed that I was using the wrong version of the Linux Kernel. I was using the default kernel supplied by the version I wrote in the question. It seems that that version (the 2.6.32-5-686 one) has problems with the debug-info so all I did was try the same with another version (the Linux version 3.9.6 with gcc version 4.7.2 Debian 4.7.2-5) and it worked without trouble :)

error while running apt-get update probably incorrect release file causing apt-get update to fail

I've been using elementary OS 0.3 Freya (64-bit) built on Ubuntu 14.04
When I tried to open Software Updater its showing Failed to download repository information
and when I tried to run
sudo apt-get update
this is what it prints:
W: Failed to fetch http://in.archive.ubuntu.com/ubuntu/dists/trusty/Release Unable to find expected entry 'restricted/source/Sources' in Release file (Wrong sources.list entry or malformed file)
E: Some index files failed to download. They have been ignored, or old ones used instead.
I donno whats the problem and I cann't find a solution for this while I googled it.
From what I've read on the issue, one of the repositories has failed. Maybe try removing them one at a time and see if you can find the offending one.
Edit the ppa's and change freya to trusty. Not sure if this is the ideal solution, but it fixes it.
I removed Chrome download/update from the download list and changed the Ubuntu Software Settings in column 1 to Download from main server. It did the download and update this way.

Eclipse JUNO not starting

I tried to start Eclipse, it just shows loading eclipse and then stops/crashes after a while, I haven't changed anything from before.
even I tried to replace it with other version but some thing happens, when I open it with terminal I get this error:
-- ERROR: RebelPlugin.getDefault() retured null!! Likely cause: plugin not started properly!
logout
[Process completed]
It seems like the RebelPlugin is causing issues. The simplest option is to install a new Eclipse and run that instead. You can reuse your previous workspace and the code will be untouched, so you will just loose some time.
There are other alternatives to try, but they may be a bit more advanced. From commandline you can try to uninstall the RebelPlugin and see if that makes a difference, and then reinstalling.
java -jar plugins/org.eclipse.equinox.launcher_<version>.jar
-application org.eclipse.update.core.standaloneUpdate
-command uninstall
-featureId <feature_id of rebelplugin>
-version <version>
See the Eclipse manual for more information