Prosody was unable to find LuaSec?!

537 views
Skip to first unread message

ip...@posteo.de

unread,
May 30, 2018, 8:59:55 AM5/30/18
to prosod...@googlegroups.com
Hi at all,

Prosody was unable to find LuaSec?!

System Information:
# uname
Linux raspberrypi 4.14.39-v7+ #1112 SMP Sat May 5 12:01:33 BST 2018
armv7l GNU/Linux

On startup:
"Hello and welcome to Prosody version 0.10.0"
"Prosody was unable to find LuaSec"
in log: "Error creating context ... LuaSec (required for encryption) was
not found"

but it is installed?!
# apt list lua-sec prosody
lua-sec/oldstable,now 0.5-1 armhf [installiert]
prosody/oldoldstable,now 0.10.0-1~wheezy4 armhf [installiert]

Whats wrong?

Bests! Lars

Matthew Wild

unread,
May 31, 2018, 5:37:40 AM5/31/18
to Prosody IM Users Group
Hi Lars,
It may be found, but there may be some problem loading it. You can see
by running:

lua5.1 -e 'print(require"ssl" and "ok")'

> Whats wrong?

The above command should give more info. But I suspect it is probably
caused by mixing lua-socket and lua-sec from different sources, which
can happen during dist upgrades.

Make sure both of the packages you have installed come from the same
repository. Compare `apt policy lua-sec` with `apt policy lua-socket`.
Often the fix is just as simple as reinstalling the package using apt
install --reinstall.

Hope this helps.

Regards,
Matthew

ip...@posteo.de

unread,
Jun 1, 2018, 6:54:00 AM6/1/18
to prosod...@googlegroups.com
Wow, the chef himself ...

Hi Matthew,

I don't know what to make of this.

history:
> $ lua5.1 -e 'print(require"ssl" and "ok")'
lua5.1: error loading module 'ssl.core' from file
'/usr/lib/arm-linux-gnueabihf/lua/5.1/ssl.so':
liblua5.1-socket.so.2: cannot open shared object file: No such
file or directory
stack traceback:
[C]: ?
[C]: in function 'require'
/usr/share/lua/5.1/ssl.lua:7: in main chunk
[C]: in function 'require'
(command line):1: in main chunk
[C]: ?

> $ apt-cache policy lua-sec lua-socket
lua-sec:
Installiert: 0.5-1
Installationskandidat: 0.5-1
Versionstabelle:
*** 0.5-1 0
500 http://mirrordirector.raspbian.org/raspbian/ jessie/main
armhf Packages
100 /var/lib/dpkg/status
lua-socket:
Installiert: 3.0-rc1-4~wheezy
Installationskandidat: 3.0-rc1-4~wheezy
Versionstabelle:
*** 3.0-rc1-4~wheezy 0
100 /var/lib/dpkg/status
3.0~rc1-3 0
500 http://mirrordirector.raspbian.org/raspbian/ jessie/main
armhf Packages

> reinstall of lua-sec
> $ sudo apt-get install --reinstall lua-sec

> $ apt-cache policy lua-sec lua-socket
lua-sec:
Installiert: 0.5-1
Installationskandidat: 0.5-1
Versionstabelle:
*** 0.5-1 0
500 http://mirrordirector.raspbian.org/raspbian/ jessie/main
armhf Packages
100 /var/lib/dpkg/status
lua-socket:
Installiert: 3.0-rc1-4~wheezy
Installationskandidat: 3.0-rc1-4~wheezy
Versionstabelle:
*** 3.0-rc1-4~wheezy 0
100 /var/lib/dpkg/status
3.0~rc1-3 0
500 http://mirrordirector.raspbian.org/raspbian/ jessie/main
armhf Packages

> $ lua5.1 -e 'print(require"ssl" and "ok")'
lua5.1: error loading module 'ssl.core' from file
'/usr/lib/arm-linux-gnueabihf/lua/5.1/ssl.so':
liblua5.1-socket.so.2: cannot open shared object file: No such
file or directory
stack traceback:
[C]: ?
[C]: in function 'require'
/usr/share/lua/5.1/ssl.lua:7: in main chunk
[C]: in function 'require'
(command line):1: in main chunk
[C]: ?

> $ sudo prosodyctl start

**************************
Prosody was unable to find LuaSec
This package can be obtained in the following ways:

Source: https://github.com/brunoos/luasec
Debian/Ubuntu: sudo apt-get install lua-sec
luarocks: luarocks install luasec

SSL/TLS support will not be available
More help can be found on our website, at http://prosody.im/doc/depends
**************************


**************************
Prosody was unable to find LuaSec
This package can be obtained in the following ways:

Source: https://github.com/brunoos/luasec
Debian/Ubuntu: sudo apt-get install lua-sec
luarocks: luarocks install luasec

SSL/TLS support will not be available
More help can be found on our website, at http://prosody.im/doc/depends
**************************

Started

> $ sudo cat /var/log/prosody/prosody.err
Jun 01 12:34:28 my.host.org:tls error Error creating context for c2s:
LuaSec (required for encryption) was not found
Jun 01 12:34:28 my.host.org:tls error Error creating contexts for
s2sout: LuaSec (required for encryption) was not found
Jun 01 12:34:28 my.host.org:tls error Error creating contexts for
s2sin: LuaSec (required for encryption) was not found

> $ sudo cat /var/log/prosody/prosody.log
Jun 01 12:34:21 mod_posix warn Received SIGTERM
Jun 01 12:34:21 general info Shutting down: Received SIGTERM
Jun 01 12:34:22 general info Shutting down...
Jun 01 12:34:22 general info Shutdown status: Cleaning up
Jun 01 12:34:22 general info Shutdown complete
Jun 01 12:34:28 general info Hello and welcome to Prosody version
0.10.2
Jun 01 12:34:28 general info Prosody is using the select backend for
connection handling
Jun 01 12:34:28 portmanager info Activated service 'c2s' on
[::]:5222, [*]:5222
Jun 01 12:34:28 portmanager info Activated service 'legacy_ssl'
on no ports
Jun 01 12:34:28 portmanager info Activated service 's2s' on
[::]:5269, [*]:5269
Jun 01 12:34:28 mod_posix info Prosody is about to detach from
the console, disabling further console output
Jun 01 12:34:28 mod_posix info Successfully daemonized to PID
3189
Jun 01 12:34:28 my.host.org:tls error Error creating context for c2s:
LuaSec (required for encryption) was not found
Jun 01 12:34:28 my.host.org:tls error Error creating contexts for
s2sout: LuaSec (required for encryption) was not found
Jun 01 12:34:28 my.host.org:tls error Error creating contexts for
s2sin: LuaSec (required for encryption) was not found

Bests, Lars

Matthew Wild

unread,
Jun 1, 2018, 8:29:14 AM6/1/18
to Prosody IM Users Group
On 1 June 2018 at 11:53, <ip...@posteo.de> wrote:
>
...
> lua-socket:
> Installiert: 3.0-rc1-4~wheezy
> Installationskandidat: 3.0-rc1-4~wheezy
> Versionstabelle:
> *** 3.0-rc1-4~wheezy 0
> 100 /var/lib/dpkg/status
> 3.0~rc1-3 0
> 500 http://mirrordirector.raspbian.org/raspbian/ jessie/main armhf
> Packages

and this one (lua-socket) is the issue. See how the installed version
ends with ~wheezy? But you're on Jessie. And it doesn't have an apt
repo associated with it. Reinstall it so you get the other version,
3.0~rc1-3 from your raspbian repo. Then all should work!

Regards,
Matthew
Reply all
Reply to author
Forward
0 new messages