# Error in loading modules

**URL:** <https://community.asterisk.org/t/error-in-loading-modules/88567>\
**Category:** Asterisk Support\
**Created:** [May 10, 2021, 8:28pm UTC](https://community.asterisk.org/t/error-in-loading-modules/88567 "2021-05-10T20:28:11Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![psdk](https://avatars.discourse-cdn.com/v4/letter/p/d2c977/32.png) [@psdk](https://community.asterisk.org/u/psdk)\
**Post date:** [May 10, 2021, 8:28pm UTC](https://community.asterisk.org/t/error-in-loading-modules/88567/1 "2021-05-10T20:28:11Z")

</div>

Hi everyone,

When I start the asterisk, I get these errors:

> [May 10 20:14:41] WARNING[31489]: loader.c:2487 load\_modules: Module ‘app\_adsiprog’ has been loaded but may be removed in a future release.  
> [May 10 20:14:41] ERROR[31489]: loader.c:2508 load\_modules: Module ‘res\_sorcery\_realtime.so’ did not register itself during load  
> [May 10 20:14:41] ERROR[31489]: loader.c:2508 load\_modules: Module ‘res\_speech.so’ did not register itself during load  
> [May 10 20:14:41] ERROR[31489]: loader.c:2508 load\_modules: Module ‘res\_format\_attr\_opus.so’ did not register itself during load  
> [May 10 20:14:41] ERROR[31489]: loader.c:2508 load\_modules: Module ‘res\_sorcery\_memory.so’ did not register itself during load  
> [May 10 20:14:41] ERROR[31489]: loader.c:2508 load\_modules: Module ‘res\_sorcery\_memory\_cache.so’ did not register itself during load  
> [May 10 20:14:41] ERROR[31489]: loader.c:2508 load\_modules: Module ‘res\_ari\_model.so’ did not register itself during load  
> [May 10 20:14:41] ERROR[31489]: loader.c:2508 load\_modules: Module ‘res\_monitor.so’ did not register itself during load  
> [May 10 20:14:41] ERROR[31489]: loader.c:2508 load\_modules: Module ‘res\_rtp\_multicast.so’ did not register itself during load  
> [May 10 20:14:41] ERROR[31489]: loader.c:2508 load\_modules: Module ‘res\_sorcery\_astdb.so’ did not register itself during load  
> [May 10 20:14:41] ERROR[31489]: loader.c:2508 load\_modules: Module ‘func\_periodic\_hook.so’ did not register itself during load  
> [May 10 20:14:41] ERROR[31489]: loader.c:2508 load\_modules: Module ‘res\_sorcery\_config.so’ did not register itself during load  
> [May 10 20:14:41] ERROR[31489]: loader.c:2508 load\_modules: Module ‘res\_fax.so’ did not register itself during load  
> [May 10 20:14:41] ERROR[31489]: loader.c:2508 load\_modules: Module ‘res\_stasis\_snoop.so’ did not register itself during load  
> [May 10 20:14:41] ERROR[31489]: loader.c:2508 load\_modules: Module ‘res\_smdi.so’ did not register itself during load  
> [May 10 20:14:41] ERROR[31489]: loader.c:2508 load\_modules: Module ‘res\_stun\_monitor.so’ did not register itself during load  
> [May 10 20:14:41] ERROR[31489]: loader.c:2508 load\_modules: Module ‘res\_crypto.so’ did not register itself during load  
> [May 10 20:14:41] ERROR[31489]: loader.c:2508 load\_modules: Module ‘res\_agi.so’ did not register itself during load  
> [May 10 20:14:41] ERROR[31489]: loader.c:2508 load\_modules: Module ‘res\_audiosocket.so’ did not register itself during load  
> [May 10 20:14:41] ERROR[31489]: loader.c:2508 load\_modules: Module ‘res\_stasis.so’ did not register itself during load  
> [May 10 20:14:41] ERROR[31489]: loader.c:2508 load\_modules: Module ‘res\_ael\_share.so’ did not register itself during load  
> [May 10 20:14:41] ERROR[31489]: loader.c:2508 load\_modules: Module ‘res\_calendar.so’ did not register itself during load  
> [May 10 20:14:41] ERROR[31489]: loader.c:2508 load\_modules: Module ‘res\_stasis\_recording.so’ did not register itself during load  
> [May 10 20:14:41] ERROR[31489]: loader.c:2508 load\_modules: Module ‘res\_statsd.so’ did not register itself during load  
> [May 10 20:14:41] ERROR[31489]: loader.c:2508 load\_modules: Module ‘res\_stasis\_device\_state.so’ did not register itself during load  
> [May 10 20:14:41] ERROR[31489]: loader.c:2508 load\_modules: Module ‘res\_srtp.so’ did not register itself during load  
> [May 10 20:14:41] ERROR[31489]: loader.c:2508 load\_modules: Module ‘res\_pjproject.so’ did not register itself during load  
> [May 10 20:14:41] ERROR[31489]: loader.c:2508 load\_modules: Module ‘res\_http\_websocket.so’ did not register itself during load  
> [May 10 20:14:41] ERROR[31489]: loader.c:2508 load\_modules: Module ‘res\_stasis\_playback.so’ did not register itself during load  
> [May 10 20:14:41] ERROR[31489]: loader.c:2508 load\_modules: Module ‘res\_ari.so’ did not register itself during load  
> [May 10 20:14:41] ERROR[31489]: loader.c:2508 load\_modules: Module ‘res\_phoneprov.so’ did not register itself during load  
> [May 10 20:14:41] ERROR[31489]: loader.c:2508 load\_modules: Module ‘res\_stir\_shaken.so’ did not register itself during load  
> [May 10 20:14:41] ERROR[31489]: loader.c:2508 load\_modules: Module ‘res\_pjsip.so’ did not register itself during load  
> [May 10 20:14:41] ERROR[31489]: loader.c:2508 load\_modules: Module ‘res\_pjsip\_outbound\_publish.so’ did not register itself during load  
> [May 10 20:14:41] ERROR[31489]: loader.c:2508 load\_modules: Module ‘res\_pjsip\_session.so’ did not register itself during load  
> [May 10 20:14:41] ERROR[31489]: loader.c:2508 load\_modules: Module ‘res\_stasis\_answer.so’ did not register itself during load  
> [May 10 20:14:41] ERROR[31489]: loader.c:2508 load\_modules: Module ‘res\_prometheus.so’ did not register itself during load  
> [May 10 20:14:41] ERROR[31489]: loader.c:2508 load\_modules: Module ‘res\_pjsip\_pubsub.so’ did not register itself during load  
> [May 10 20:14:41] ERROR[31489]: loader.c:2508 load\_modules: Module ‘res\_pjsip\_config\_wizard.so’ did not register itself during load  
> [May 10 20:14:41] ERROR[31489]: loader.c:2508 load\_modules: Module ‘res\_pjsip\_stir\_shaken.so’ did not register itself during load

What is the problem?  
autoload is yes in the modules.conf.

---

<div class="post-metadata">

**Author:** ![david551](https://avatars.discourse-cdn.com/v4/letter/d/3bc359/32.png) [@david551](https://community.asterisk.org/u/david551)\
**Post date:** [May 10, 2021, 8:39pm UTC](https://community.asterisk.org/t/error-in-loading-modules/88567/2 "2021-05-10T20:39:34Z")

</div>

Do you need those modules? Do you have configuration files for them?

What actually fails to work?

---

<div class="post-metadata">

**Author:** ![psdk](https://avatars.discourse-cdn.com/v4/letter/p/d2c977/32.png) [@psdk](https://community.asterisk.org/u/psdk)\
**Post date:** [May 10, 2021, 8:45pm UTC](https://community.asterisk.org/t/error-in-loading-modules/88567/3 "2021-05-10T20:45:17Z")

</div>

@david551 I don’t have any issue for a simple call. But I was concerned about what is the probable issue to solve it.  
Also, I just have sample configs in /etc/asterisk

Thanks.

---

<div class="post-metadata">

**Author:** ![jcolp](https://sea1.discourse-cdn.com/asterisk/user_avatar/community.asterisk.org/jcolp/32/8848_2.png) [@jcolp](https://community.asterisk.org/u/jcolp)\
**Post date:** [May 10, 2021, 8:55pm UTC](https://community.asterisk.org/t/error-in-loading-modules/88567/4 "2021-05-10T20:55:54Z")

</div>

What version of Asterisk do you have installed?

---

<div class="post-metadata">

**Author:** ![psdk](https://avatars.discourse-cdn.com/v4/letter/p/d2c977/32.png) [@psdk](https://community.asterisk.org/u/psdk)\
**Post date:** [May 10, 2021, 8:59pm UTC](https://community.asterisk.org/t/error-in-loading-modules/88567/5 "2021-05-10T20:59:34Z")

</div>

Last version that is 18.4.0

---

<div class="post-metadata">

**Author:** ![david551](https://avatars.discourse-cdn.com/v4/letter/d/3bc359/32.png) [@david551](https://community.asterisk.org/u/david551)\
**Post date:** [May 10, 2021, 10:25pm UTC](https://community.asterisk.org/t/error-in-loading-modules/88567/6 "2021-05-10T22:25:11Z")

</div>

Ignore my comment about configuration files, as this seems to be an OS level registration, not an Asterisk one.

However, the sense of the test in this line doesn’t make sense to me. Surely the error case is when dlopen() returns NULL? mod-\>lib is the return from dlopen().

> <https://github.com/asterisk/asterisk/blob/5a13e95c567dc73e5e80bec12ce3afe764aeecec/main/loader.c#L1095>

---

<div class="post-metadata">

**Author:** ![psdk](https://avatars.discourse-cdn.com/v4/letter/p/d2c977/32.png) [@psdk](https://community.asterisk.org/u/psdk)\
**Post date:** [May 11, 2021, 3:58am UTC](https://community.asterisk.org/t/error-in-loading-modules/88567/7 "2021-05-11T03:58:35Z")

</div>

thanks @david551 . but what is your idea about the reason?

---

<div class="post-metadata">

**Author:** ![khamlichi.khalil](https://avatars.discourse-cdn.com/v4/letter/k/e274bd/32.png) [@khamlichi.khalil](https://community.asterisk.org/u/khamlichi.khalil)\
**Post date:** [May 11, 2021, 5:11am UTC](https://community.asterisk.org/t/error-in-loading-modules/88567/8 "2021-05-11T05:11:28Z")

</div>

you need to provide the steps you made to compile and install Asterisk because you might have missed something.  
just a reminder, you can always do an apt get install asterisk instead of compiling.

---

<div class="post-metadata">

**Author:** ![david551](https://avatars.discourse-cdn.com/v4/letter/d/3bc359/32.png) [@david551](https://community.asterisk.org/u/david551)\
**Post date:** [May 11, 2021, 10:06am UTC](https://community.asterisk.org/t/error-in-loading-modules/88567/9 "2021-05-11T10:06:06Z")

</div>

> [@psdk](#):
>
> thanks @david551 . but what is your idea about the reason?

I’m suggesting that the code produces the error message when things work and not when they don’t. I’m hoping someone else will confirm my interpretation.

---

<div class="post-metadata">

**Author:** ![jcolp](https://sea1.discourse-cdn.com/asterisk/user_avatar/community.asterisk.org/jcolp/32/8848_2.png) [@jcolp](https://community.asterisk.org/u/jcolp)\
**Post date:** [May 11, 2021, 10:25am UTC](https://community.asterisk.org/t/error-in-loading-modules/88567/10 "2021-05-11T10:25:39Z")

</div>

When a module is loaded a constructor causes everything to register, and this will cause “resource\_being\_loaded” to be set to NULL (it happens in ast\_module\_register). Therefore if the module successfully registers, the code block you mention will not be executed. It’s only if the module itself is loaded (dlopen is successful) but the constructor does not fire to register things that it will occur.

---

<div class="post-metadata">

**Author:** ![psdk](https://avatars.discourse-cdn.com/v4/letter/p/d2c977/32.png) [@psdk](https://community.asterisk.org/u/psdk)\
**Post date:** [May 12, 2021, 7:37pm UTC](https://community.asterisk.org/t/error-in-loading-modules/88567/11 "2021-05-12T19:37:23Z")

</div>

I am compiling on the Alpine, so I think it’s the reason according to your hints.  
I am following the exact steps in the [asterisk\main - aports - Alpine packages build scripts](https://git.alpinelinux.org/aports/tree/main/asterisk?h=master)

Interesting what I am missing.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/asterisk/original/2X/4/475d0c889911cfb84ac4881ad6df8b523e3f9105.png) [@system](https://community.asterisk.org/u/system)\
**Post date:** [June 11, 2021, 7:37pm UTC](https://community.asterisk.org/t/error-in-loading-modules/88567/12 "2021-06-11T19:37:27Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
