Discussion:
[prosody-users] Prosody was unable to find LuaSec?!
i***@posteo.de
2018-05-30 12:24:20 UTC
Permalink
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
--
You received this message because you are subscribed to the Google Groups "Prosody IM Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to prosody-users+***@googlegroups.com.
To post to this group, send an email to prosody-***@googlegroups.com.
Visit this group at https://groups.google.com/group/prosody-users.
For more options, visit https://groups.google.com/d/optout.
Matthew Wild
2018-05-31 09:37:18 UTC
Permalink
Hi Lars,
Post by i***@posteo.de
Hi at all,
Prosody was unable to find LuaSec?!
# uname
Linux raspberrypi 4.14.39-v7+ #1112 SMP Sat May 5 12:01:33 BST 2018 armv7l
GNU/Linux
"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]
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")'
Post by i***@posteo.de
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
--
You received this message because you are subscribed to the Google Groups "Prosody IM Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to prosody-users+***@googlegroups.com.
To post to this group, send an email to prosody-***@googlegroups.com.
Visit this group at https://groups.google.com/group/prosody-users.
For more options, visit https://groups.google.com/d/optout.
i***@posteo.de
2018-06-01 10:53:55 UTC
Permalink
Wow, the chef himself ...

Hi Matthew,

I don't know what to make of this.
$ 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
Hi Lars,
Post by i***@posteo.de
Hi at all,
Prosody was unable to find LuaSec?!
# uname
Linux raspberrypi 4.14.39-v7+ #1112 SMP Sat May 5 12:01:33 BST 2018 armv7l
GNU/Linux
"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]
It may be found, but there may be some problem loading it. You can see
lua5.1 -e 'print(require"ssl" and "ok")'
Post by i***@posteo.de
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
--
You received this message because you are subscribed to the Google Groups "Prosody IM Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to prosody-users+***@googlegroups.com.
To post to this group, send an email to prosody-***@googlegroups.com.
Visit this group at https://groups.google.com/group/prosody-users.
For more options, visit https://groups.google.com/d/optout.
Matthew Wild
2018-06-01 12:28:52 UTC
Permalink
On 1 June 2018 at 11:53, <***@posteo.de> wrote:
...
Post by i***@posteo.de
Installiert: 3.0-rc1-4~wheezy
Installationskandidat: 3.0-rc1-4~wheezy
*** 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
--
You received this message because you are subscribed to the Google Groups "Prosody IM Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to prosody-users+***@googlegroups.com.
To post to this group, send an email to prosody-***@googlegroups.com.
Visit this group at https://groups.google.com/group/prosody-users.
For more options, visit https://groups.google.com/d/optout.
Loading...