Questions tagged [erlang]
Erlang is a general-purpose, garbage-collected programming language and runtime environment, with built-in support for concurrency, distribution and fault tolerance.
9,609
questions
2
votes
0
answers
15
views
erlang R25.3 compile failed
I try to install R25.3 by kerl, but compile failed.But I have some problems when compiling it.
This is my macos version: 13.4 (22F66)
My mac uses intel chip.
This is the errors when I compiling R25.3:
...
1
vote
2
answers
42
views
How to solve the problem with erlang badarg?
I ran the code below in Eclipse. The code is compiled and the .txt file is created in the scr folder in the workspace in Eclipse with the header of the data passed to the first io:format, but the ...
2
votes
1
answer
57
views
ets can find the record but can't delete it
i have a simple problem. ets:lookup() can find the record but ets:delete() gives badarg error.
case ets:lookup(Connections, Next) of
[] ->
case ets:lookup(Connections, Prev) of
...
0
votes
0
answers
39
views
How can I extract the top N dominant colors from an image using Elixir? [closed]
I’m working on a project in Elixir where I need to extract the top N dominant colors from an image. I’ve been searching for Elixir libraries or methods that can help me accomplish this task ...
0
votes
0
answers
36
views
EC2 Instance Unresponsive After GLIBC Library Update
When I tried to install erlang for rabbitMQ, it reported an error:
error: Failed dependencies:
libcrypto.so.1.1()(64bit) is needed by erlang-26.1-1.el8.x86_64
libcrypto.so.1.1(OPENSSL_1_1_0)(...
1
vote
1
answer
38
views
Executing rebar3 throwing escript exception
Environment:
1. Ubuntu 20.04.6 LTS
2. Erlang/OTP 22 [erts-10.6.4] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:1]
Eshell V10.6.4
3. Erlang/OTP 22 [erts-10.6.4] [source] [64-bit] [smp:8:8] [...
1
vote
1
answer
23
views
Erlang :: Why rpc:pmap call in erlang does not works for string library functions?
string:find("This is a test wa.me/123456 message alibaba","wa.me").
Works fine matches wa.me but below code
erpc:pmap({string,find},["This is a test wa.me/123456 message ...
2
votes
2
answers
42
views
Erlang: New utility function which gets a record's field names from a known set of records
I want to create a function which is able to return a list of a records field names. There are a set number of records in the project but defined in different modules. However at compile time they ...
1
vote
1
answer
33
views
How supervisor behavior in Elixir Umbrella Apps: Managing Failures Across Applications
In Elixir umbrella apps, when an error occurs in one application (e.g., appA) and its supervisor determines that the error cannot be recovered, the supervisor might terminate the entire umbrella ...
1
vote
1
answer
42
views
(Elixir/Erlang) :ets.select_count returns 0
I'm writing a program using Elixir and I have a very strange error.
I have a table, which contains some values stored like that: {a, b}. A is unique value, b can be repeated.
I want to count how many ...
1
vote
0
answers
19
views
rebar3 release cannot find target build when rebar.config base_dir set
When building an OTP release with rebar3 for an application, release process throw warnings that target and sources cannot be found when using the option: {base_dir,
A link to an application example ...
1
vote
1
answer
32
views
Issue with running a compiled rebar3 erlang application with erl -pa
An erlang OTP application (nerlnetApp) that depends on cowboy compiled and run successfully when executed using the command: rebar3 shell, from application directory.
However, erlang shell cannot run ...
1
vote
1
answer
34
views
Erlang installation failed in W10
Relates to this question. I'm trying to set up RabbitMQ on a W10 machine. This apparently involves installing Erlang 64-bit, as Admin.
Downloaded the .exe and tried running as Admin. Fails. The end of ...
1
vote
1
answer
67
views
RTSP get video from IP Camera with Erlang
Trying to find any examples of how to get video from IP Camera via RTSP and record it on disk with Erlang. Is there any examples or manuals? Where to start to develop this functionality? For me isn't ...
1
vote
0
answers
33
views
Erlang NIF not linking properly on Mac M1
I'm having problems linking Erlang to a shared C library (dylib on Mac) using erlang.mk, and would really like a small amount of help
I'm running a Mac M1 with Erlang installed via kerl
The C library ...
1
vote
0
answers
30
views
Erlang error: payload connection down {shutdown,ssl_closed}
I have some code written in Erlang that consumes from a topic, but after about 8-10 min, I get the error
payload connection down reason:{shutdown,ssl_closed}
I'm consuming other topics under the same ...
1
vote
0
answers
24
views
How to clear screen in erlang shell for win11?
I want to clear the screeen in erlang shell in win11.
When using powershell, I found it seems only possible to clear screen is to exit erlang shell, then to use ctrl-L for clear.
But it is not what I ...
1
vote
0
answers
42
views
Eleveldb failed to load nif library
I connected the library to the erlang project
Can't build library when building project
Tell me what could be the reason?
=INFO REPORT==== 21-Aug-2023::13:08:13.424839 ===
application: kernel
...
2
votes
1
answer
58
views
Docker build: /make: Permission denied
I'm having problems trying to build an image with erlang 26 compiled from source, when I run docker build . I get
=> ERROR [ 7/14] RUN /home/erl/otp_src_26.0.2/make ...
2
votes
1
answer
54
views
Can the GenServer `handle_continue` callback directly be invoked from another process?
The handle_continue callback of a GenServer can be invoked by returning {:noreply, state, {:continue, :foo} from another callback inside the same GenServer.
If I have a small cascade of separate steps ...
2
votes
0
answers
30
views
remote gen_server process crashes instantly
I have a main controller controller.erl that acts with gen_server behavior, that controller is supposed create 4 other processes called tower.erl, on 4 different pcs and communicate with them ...
3
votes
2
answers
112
views
Elixir `mix` command throws error `could not call Module.put_attribute/3 because the module Helloworld.MixProject is already compiled`
Setup new project with command mix new project_name it setup everything without any
error or warning message, cd to project and ran command iex -S mix it throws error
lib/helloworld.ex
defmodule ...
1
vote
1
answer
123
views
Elixir install dependencies command `mix deps.get` is throwing error
Getting error when installing Elixir dependencies, all Mix command are throwing same exception
23:31:44.447 [notice] Application ssl exited: exited in: :ssl_app.start(:normal, [])
** (EXIT) an ...
1
vote
2
answers
217
views
Cannot compile ssl_verify_fun in Windows 11
Background
I have a phoenix application in Windows 11. Unfortunately for me, I cannot compile the application because of a dependency error in Windows.
What I tried
First I tried the downloading ...
2
votes
0
answers
46
views
Issue copying .erlang.cookie RabbitMQ
I'm working on a project which includes rabbit. The issue is that when installing the project, the application takes care of copying the .erlang.cookie from C:\Windows\system32\config\systemprofile\ ...
4
votes
0
answers
46
views
Erlang NIF crashes on unavailable resources when calling enif_thread_create without enif_thread_join
My project has a NIF that is called from the main Erlang app. It needs to calculate and train an NN model using OpenNN, so it is called with a new Erlang NIF thread:
Code in project
C code excerpt:
.....
1
vote
0
answers
34
views
Correctly indent multiline lists, maps, tuples and function heads in Erlang with Vim
I have been struggling with indentation in Erlang and Vim for quite some time. I tried vimerl and vim-erlang-runtime, but I always end up with the same strange indentation for multiline lists, tuples, ...
1
vote
1
answer
56
views
Build rabbitmq-server and erlang with FIPS enabled from source
I'm trying to install rabbitmq-server on Ubuntu 20.04 with FIPS enabled, and I saw that erlang DEB default packages doesn't have it compiled in them. I read this guide - https://www.erlang.org/doc/...
1
vote
0
answers
116
views
curl error (60): Peer certificate cannot be authenticated
rabbitmq_rabbitmq-server 0.0 B/s | 0 B 00:02
Errors during downloading ...
2
votes
1
answer
67
views
Erlang LS in Visual Studio Code can't find include_lib
My project is a rebar 3 app project, i.e. the code is in the src directory, the dependencies are in _build/default/lib/, and includes are in include and _build/default/lib/*/include.
I have this ...
1
vote
0
answers
39
views
The erlport.erlang module doesn't seem to exist
The ErlPort docs for making calls to Erlang functions in Python requires importing erlport.erlang and using the call function. It seems that in erlport 0.6 (the version that pip3 install) there is no ...
2
votes
1
answer
69
views
Float to string without scientific notation?
Is there a good way to convert floats to strings in Erlang/Elixir, without scientific notation, and without specifying how many decimal digits I want?
Neither of these do what I need.
:erlang....
1
vote
1
answer
70
views
OpenTelemetry Propagation in Erlang/Elixir - an example
I have a gRPC API and want to add Otel based tracing to it. Every request to this API contains trace/span ID, but I am struggling to properly emit child span.
Here is an example from iex:
require ...
0
votes
1
answer
57
views
I changed the default locations of erlang and rabbitmq and things are not working
I am working on a remote server with CentOS 7 as its OS and my job is to install and run RabbitMQ on it. Due to some work-related reasons, I am only allowed to install packages on the /home/sysadmin/...
1
vote
0
answers
31
views
Unable to issue command/read data on remote host from Elixir using sshex framework
MacOS 12.5.1 (M1 Max)
Elixir 1.14.3 (compiled with Erlang/OTP 25)
I am trying to read some status data from a network switch within my Elixir application over ssh. I am attempting to do this using the ...
1
vote
1
answer
112
views
RabbitMQ install error: Unrecognized option logic
im trying to install RabbitMQ Server 3.12.0. Before i have installed compatible Erlang OTP 26.0 (have tried it also with 25.3).
In the setup i get the error message rabbitmq-service.bat install exited ...
1
vote
0
answers
36
views
Exec format error while cross compiling erlang 24.0
I am trying to cross compile Erlang version 24.0 for 32-bit Linux system using PowerPC toolchain.
While cross compiling this exec format error occur.
This is the error:
/bin/sh: 1: /home/cdot/Pooja/...
1
vote
0
answers
34
views
what will be the updated Istio handler, instance and rule configuration
The following istio configuration was being used in a legacy kuernetes cluster with old istio version to do the connection from microservices running in kubernetes an erlang virtual machine on ...
1
vote
1
answer
54
views
Why is second message sometimes not received?
I created a simple server to receive messages from a single client but when I send multiple messages at once, sometimes they are not received as I intended.
Here is the server code:
test() ->
{...
1
vote
2
answers
96
views
Erlang/Elixir reraise equivalent for `catch :exit, e ->`?
I'd like to catch and look at an :exit catch and decide programatically if I actually wanted to catch it or not.
Is it possible to reraise these :exit values, like Elixir reraise does with normal ...
2
votes
1
answer
29
views
Temporarily freeze Erlang process remotely?
Is there a way to temporarily freeze (forcefully temporaily pause execution) an erlang process remotely? So not by sending a message that the process receives and stops execution until it gets an ...
2
votes
0
answers
66
views
Auto-Scaling Ejabberd Cluster in Kubernetes
I have an Ejabberd cluster (v17.07 with Erlang/OTP 18) running on AWS EKS. We have enabled autoscaling based on CPU usage of the nodes.
But whenever the cluster scales up or down, other nodes in the ...
3
votes
1
answer
117
views
How can I use a Port synchronously in Erlang?
I want to make a synchronous call to a Port in Erlang. That is, to send some input to a running OS process connected through a Port and get its output directly, not using messages.
There is a ...
1
vote
0
answers
25
views
How can I resolve the unmet dependencies error while installing Rabbitmq 3.7.4 with Erlang/OTP 20 on Ubuntu 16.04?
I'm currently trying to install RabbitMQ version 3.7.4 with Erlang/OTP 20 on Ubuntu 16.04. This specific version combination has been working for me. However, when I attempt to install it, I encounter ...
2
votes
1
answer
58
views
How to swap second element of first row and penultimate element of last row from a matrix Erlang?
Description: a square matrix of dimension N is given. Write two implementations of solving an individual task:
based on the execution of subtasks in separate processes - for N iterations in the rows ...
2
votes
0
answers
64
views
CouchDB - Clean memory to avoid large binaries leaks
I have a Kubernets pod with a statefulset containing a CouchDB 3.2.1 instance using the official Helm chart (bitnami/rabbitmq from https://charts.bitnami.com/bitnami), with a single node, no cluster ...
2
votes
0
answers
25
views
How to retrieve client information (assoc_id and stream number) from Ancillary Data in Erlang SCTP server?
I am new to erlang and was practicing sctp client server program to send message to one another but i am not able to respond to the client as the parameters required for sctp are different to udp or ...
1
vote
0
answers
70
views
SCTP How to send message from server to multiple clients
How do you identify the association id to send a message from server to a client using sctp protocol?
In tcp accept(ListenSocket) -> {ok, Socket} can be used to get the socket number of the client,...
1
vote
0
answers
56
views
mongooseim 6.0.0 cluster setup in ubuntu 20.04
We are trying to create cluster of two mongooseim instances on Azure in same virtual network. All necessary ports are opened in Azure security group.
How to change node name of two vms and join ...
2
votes
0
answers
170
views
Failed to connect to raw.githubusercontent.com port 443: Connection timed out
Operating system and version: Ubuntu 22.04 LTS
When installing Erlang on my Ubuntu system getting issue of raw.githubusercontent.com port 443: Connection timed out.
asdf install erlang 25.1 (or ...