General NAS-Central Forums

Welcome to the NAS community
It is currently Mon Oct 23, 2017 6:20 am

All times are UTC




Post new topic Reply to topic  [ 213 posts ]  Go to page Previous  1 ... 10, 11, 12, 13, 14, 15  Next
Author Message
PostPosted: Mon Jun 12, 2017 8:15 pm 
Offline

Joined: Sun Apr 29, 2012 5:24 pm
Posts: 2303
For now, I don't know what can be wrong. This package was tested a lot times and wasn't such problems with it yet. Old start script has several issues, that is why it been replaced by new one.
Do not close your current connection to NAS, either way you might be unable to login back.
Please paste exact outputs of each following commands:
Code:
ldd /ffp/sbin/sshd
and
Code:
/ffp/sbin/sshd
and
Code:
ldd /ffp/bin/bash
Logging can be enabled by running daemon with -E argument:
Code:
/ffp/sbin/sshd -E /ffp/var/log/sshd.log

P.S. One more thing - run lddd tool and paste outputs here too.http://forum.nas-central.org/viewtopic.php?f=249&t=14699


Top
 Profile  
 
PostPosted: Tue Jun 13, 2017 12:37 pm 
Offline

Joined: Tue Jan 20, 2015 9:46 pm
Posts: 22
barmalej2 wrote:
For now, I don't know what can be wrong. This package was tested a lot times and wasn't such problems with it yet. Old start script has several issues, that is why it been replaced by new one.
Do not close your current connection to NAS, either way you might be unable to login back.
Please paste exact outputs of each following commands:
Code:
ldd /ffp/sbin/sshd
and
Code:
/ffp/sbin/sshd
and
Code:
ldd /ffp/bin/bash
Logging can be enabled by running daemon with -E argument:
Code:
/ffp/sbin/sshd -E /ffp/var/log/sshd.log

P.S. One more thing - run lddd tool and paste outputs here too.http://forum.nas-central.org/viewtopic.php?f=249&t=14699


Silax wrote:
It's very strange, after I receive the error message, I physically restart my NAS and I was enable to connect via ssh on my NAS.
My Outputs for each commands recommended by you:
Code:
root@Silax-Cloud:~# ldd /ffp/sbin/sshd
ldd: can't open cache '/ffp/etc/ld.so.cache'
        libcrypto.so.1.0.0 => /ffp/lib/libcrypto.so.1.0.0 (0x400d0000)
        libdl.so.0 => /ffp/lib/libdl.so.0 (0x40250000)
        libutil.so.0 => /ffp/lib/libutil.so.0 (0x4025b000)
        libz.so.1 => /ffp/lib/libz.so.1 (0x40264000)
        libcrypt.so.0 => /ffp/lib/libcrypt.so.0 (0x40284000)
        libssp.so.0 => /ffp/lib/libssp.so.0 (0x402a3000)
        libc.so.0 => /ffp/lib/libc.so.0 (0x402ad000)
        ld-uClibc.so.0 => /ffp/lib/ld-uClibc.so.0 (0x2a000000)

Code:
root@Silax-Cloud:~# ldd /ffp/bin/bash
ldd: can't open cache '/ffp/etc/ld.so.cache'
        libncursesw.so.5 => /ffp/lib/libncursesw.so.5 (0x40002000)
        libiconv.so.2 => /ffp/lib/libiconv.so.2 (0x40062000)
        libdl.so.0 => /ffp/lib/libdl.so.0 (0x40149000)
        libc.so.0 => /ffp/lib/libc.so.0 (0x40154000)
        ld-uClibc.so.0 => /ffp/lib/ld-uClibc.so.0 (0x2a000000)

After I enable the trace for sshd.sh i try to start again the sshd.sh. In the below you will find logs message.
Code:
root@Silax-Cloud:~# /ffp/sbin/sshd -E /ffp/var/log/sshd.log
root@Silax-Cloud:~# sh /ffp/start/sshd.sh restart
PROCESS STATUS INFO: sshd is not running
Starting sshd...[ Fail!!! ] ERROR WARNING: sshd can not start!!!
root@Silax-Cloud:~# cd /ffp/var/log/
root@Silax-Cloud:/ffp/var/log# ls
fp  groonga  packages  php_cgi.php  removed-packages  snmpd.log  sshd.log
root@Silax-Cloud:/ffp/var/log# tail -1 sshd.log
Cannot bind any address.
root@Silax-Cloud:/ffp/var/log# cat sshd.log
Bind to port 22 on :: failed: Address already in use.
Bind to port 22 on 0.0.0.0 failed: Address already in use.
Cannot bind any address.


Outputs for lddd tool:
Affected-files.txt
Code:
root@Silax-Cloud:/tmp/lddd.2J3q# cat affected-files.txt
/ffp/lib/libnetsnmpmibs.so.30.0.2
/ffp/lib/perl5/site_perl/5.14.2/arm-linux-thread-multi-64int/auto/NetSNMP/agent/agent.so
/ffp/lib/perl5/site_perl/5.14.2/arm-linux-thread-multi-64int/auto/NetSNMP/TrapReceiver/TrapReceiver.so
/ffp/lib/libnetsnmptrapd.so.30.0.2
/ffp/lib/libnetsnmpagent.so.30.0.2
/ffp/lib/php/modules/xsl.so
/ffp/sbin/snmptrapd
/ffp/sbin/snmpd
/ffp/bin/agentxtrap

Missing-libs.txt
Code:
/ffp/lib/libnetsnmpmibs.so.30.0.2:
checking sub-depends for 'not found'
        libperl.so => not found (0x00000000)
/ffp/lib/perl5/site_perl/5.14.2/arm-linux-thread-multi-64int/auto/NetSNMP/agent/agent.so:
checking sub-depends for 'not found'
        libperl.so => not found (0x00000000)
/ffp/lib/perl5/site_perl/5.14.2/arm-linux-thread-multi-64int/auto/NetSNMP/TrapReceiver/TrapReceiver.so:
checking sub-depends for 'not found'
        libperl.so => not found (0x00000000)
/ffp/lib/libnetsnmptrapd.so.30.0.2:
checking sub-depends for 'not found'
        libperl.so => not found (0x00000000)
/ffp/lib/libnetsnmpagent.so.30.0.2:
checking sub-depends for 'not found'
        libperl.so => not found (0x00000000)
/ffp/lib/php/modules/xsl.so:
checking sub-depends for 'not found'
checking sub-depends for 'not found'
        libexslt.so.0 => not found (0x00000000)
        libxslt.so.1 => not found (0x00000000)
/ffp/sbin/snmptrapd:
        libperl.so => not found
        libperl.so => not found
        libperl.so => not found
        libperl.so => not found
/ffp/sbin/snmpd:
        libperl.so => not found
        libperl.so => not found
        libperl.so => not found
/ffp/bin/agentxtrap:
        libperl.so => not found
        libperl.so => not found
        libperl.so => not found

Do you have any idea ? I need to install the missing libraries ? How :?


Top
 Profile  
 
PostPosted: Tue Jun 13, 2017 3:55 pm 
Offline

Joined: Sun Apr 29, 2012 5:24 pm
Posts: 2303
Regarding sshd, it is obvious:
Quote:
Bind to port 22 on :: failed: Address already in use.
Bind to port 22 on 0.0.0.0 failed: Address already in use.
You already have some ssh daemon running. Paste output of:
Code:
lsof -i :22 | grep LISTEN
ps aux | grep sshd

Have you enabled others ssh services like Metarepository/dropbear, zyxel firmware ssh service or entware sshd???

Regarding missing libs-they are unrelated with sshd in your case. Almost all missing are related with SNMP agent and snmp(d) package.
Paste output of:
Code:
funpkg -q perl


Top
 Profile  
 
PostPosted: Tue Jun 13, 2017 4:07 pm 
Offline

Joined: Tue Jan 20, 2015 9:46 pm
Posts: 22
barmalej2 wrote:
Regarding sshd, it is obvious:
Quote:
Bind to port 22 on :: failed: Address already in use.
Bind to port 22 on 0.0.0.0 failed: Address already in use.
You already have some ssh daemon running. Paste output of:
Code:
lsof -i :22 | grep LISTEN
ps aux | grep sshd

Have you enabled others ssh services like Metarepository/dropbear, zyxel firmware ssh service or entware sshd???

Regarding missing libs-they are unrelated with sshd in your case. Almost all missing are related with SNMP agent and snmp(d) package.
Paste output of:
Code:
funpkg -q perl


Yes, i have installed MetaRepository in my NAS, now i regure will can i connect to ssh.

These are my outputs:
Code:
root@Silax-Cloud:~# lsof -i :22 | grep LISTEN
sshd     4392 root    3u  IPv4   7348      0t0  TCP *:ssh (LISTEN)
sshd     4392 root    4u  IPv6   7351      0t0  TCP *:ssh (LISTEN)
root@Silax-Cloud:~# ps aux | grep sshd
root      4392  0.0  0.1   4448   864 ?        Ss   Jun12   0:00 /usr/local/zy-pkgs/bin/sshd -f /usr/local/zy-pkgs/config/SSH/sshd_config
root     20306  0.2  0.4   4792  2276 ?        Ss   15:58   0:00 /usr/local/zy-pkgs/bin/sshd -f /usr/local/zy-pkgs/config/SSH/sshd_config -R
root     20307  0.0  0.4   4448  2044 ?        Ss   15:58   0:00 /usr/local/zy-pkgs/bin/sshd -f /usr/local/zy-pkgs/config/SSH/sshd_config -R
root     20541  0.0  0.0   1788   412 pts/0    S+   16:00   0:00 grep sshd
root@Silax-Cloud:~# funpkg -q perl
perl-5.24.0-arm-2
perl-modules-5.24.0-arm-2


It's ok if I continue with the installation guide for transmission to 2.92 and I skip step 4?


Top
 Profile  
 
PostPosted: Tue Jun 13, 2017 4:30 pm 
Offline

Joined: Sun Apr 29, 2012 5:24 pm
Posts: 2303
This shows, that you are using zyxel firmware sshd, not metarepository-dropbear:
Quote:
/usr/local/zy-pkgs/bin/sshd -f /usr/local/zy-pkgs/config/SSH/sshd_config

Only one sshd service can run at the same time, so disable autostart of ffp sshd daemon:
Code:
chmod 644 /ffp/start/sshd.sh
BTW, which NAS model has you?

Regarding libperl.so => not found. You have net_snmp ffp package installed, which was built wilth older perl version and with hardcoded library paths (bad idea):
Code:
readelf -d /ffp/sbin/snmpd
Quote:
Dynamic section at offset 0x500c contains 36 entries:
Tag Type Name/Value
0x00000001 (NEEDED) Shared library: [libnetsnmpagent.so.30]
0x00000001 (NEEDED) Shared library: [libnetsnmpmibs.so.30]
0x00000001 (NEEDED) Shared library: [libnetsnmp.so.30]
0x00000001 (NEEDED) Shared library: [libperl.so]
0x00000001 (NEEDED) Shared library: [libdl.so.0]
0x00000001 (NEEDED) Shared library: [libcrypt.so.0]
0x00000001 (NEEDED) Shared library: [libutil.so.0]
0x00000001 (NEEDED) Shared library: [libpthread.so.0]
0x00000001 (NEEDED) Shared library: [libc.so.0]
0x00000001 (NEEDED) Shared library: [libcrypto.so.1.0.0]
0x00000001 (NEEDED) Shared library: [libm.so.0]
0x00000001 (NEEDED) Shared library: [libssp.so.0]
0x0000000f (RPATH) Library rpath: [/ffp/lib:/ffp/lib/perl5/5.14.2/arm-linux-thread-multi-64int/CORE]

Workaround is to make symlink:
Code:
ln -s /ffp/lib/perl5/5.24.0/arm-linux-thread-multi-64int/CORE/libperl.so /ffp/lib/perl5/5.14.2/arm-linux-thread-multi-64int/CORE/libperl.so

Regarding libexslt.so.0 => not found (0x00000000) and libxslt.so.1 => not found (0x00000000). Install libxslt ffp package from uli repository:
Code:
slacker -UaA uli:libxslt

Rerun lddd tool to make sure that all dependencies are satisfied and proceed further with transmission installation.


Top
 Profile  
 
PostPosted: Tue Jun 13, 2017 6:26 pm 
Offline

Joined: Tue Jan 20, 2015 9:46 pm
Posts: 22
barmalej2 wrote:
This shows, that you are using zyxel firmware sshd, not metarepository-dropbear:
Quote:
/usr/local/zy-pkgs/bin/sshd -f /usr/local/zy-pkgs/config/SSH/sshd_config

Only one sshd service can run at the same time, so disable autostart of ffp sshd daemon:
Code:
chmod 644/ffp/start/sshd.sh
BTW, which NAS model has you?

Regarding libperl.so => not found. You have net_snmp ffp package installed, which was built wilth older perl version and with hardcoded library paths (bad idea):
Code:
readelf -d /ffp/sbin/snmpd
Quote:
Dynamic section at offset 0x500c contains 36 entries:
Tag Type Name/Value
0x00000001 (NEEDED) Shared library: [libnetsnmpagent.so.30]
0x00000001 (NEEDED) Shared library: [libnetsnmpmibs.so.30]
0x00000001 (NEEDED) Shared library: [libnetsnmp.so.30]
0x00000001 (NEEDED) Shared library: [libperl.so]
0x00000001 (NEEDED) Shared library: [libdl.so.0]
0x00000001 (NEEDED) Shared library: [libcrypt.so.0]
0x00000001 (NEEDED) Shared library: [libutil.so.0]
0x00000001 (NEEDED) Shared library: [libpthread.so.0]
0x00000001 (NEEDED) Shared library: [libc.so.0]
0x00000001 (NEEDED) Shared library: [libcrypto.so.1.0.0]
0x00000001 (NEEDED) Shared library: [libm.so.0]
0x00000001 (NEEDED) Shared library: [libssp.so.0]
0x0000000f (RPATH) Library rpath: [/ffp/lib:/ffp/lib/perl5/5.14.2/arm-linux-thread-multi-64int/CORE]

Workaround is to make symlink:
Code:
ln -s /ffp/lib/perl5/5.24.0/arm-linux-thread-multi-64int/CORE/libperl.so /ffp/lib/perl5/5.14.2/arm-linux-thread-multi-64int/CORE/libperl.so

Regarding libexslt.so.0 => not found (0x00000000) and libxslt.so.1 => not found (0x00000000). Install libxslt ffp package from uli repository:
Code:
slacker -UaA uli:libxslt

Rerun lddd tool to make sure that all dependencies are satisfied and proceed further with transmission installation.



I have a Zyxel NAS 325 v2 with V4.81(AALS.0) firmware.

Thank you for the workaround but in my case i chose to downgrade the perl to 5.14.2 . If i want to install both version, my funpkg give me the message something like "you have a superior version and you can install the version 5.14.2"

I installed libxslt lib.

Right now the lddd looks like this
Code:
checking sub-depends for 'not found'
        libdb-5.2.so => not found (0x00000000)
/ffp/lib/python2.7/site-packages/libxsltmod.so:
checking sub-depends for 'not found'
checking sub-depends for 'not found'
        libgcrypt.so.11 => not found (0x00000000)
        libgpg-error.so.0 => not found (0x00000000)
/ffp/lib/php/modules/xsl.so:
checking sub-depends for 'not found'
checking sub-depends for 'not found'
        libgcrypt.so.11 => not found (0x00000000)
        libgpg-error.so.0 => not found (0x00000000)
/ffp/lib/libexslt.so.0.8.15:
checking sub-depends for 'not found'
checking sub-depends for 'not found'
        libgcrypt.so.11 => not found (0x00000000)
        libgpg-error.so.0 => not found (0x00000000)
/ffp/bin/xsltproc:
        libgcrypt.so.11 => not found
        libgpg-error.so.0 => not found
        libgcrypt.so.11 => not found
        libgpg-error.so.0 => not found


I will continue to upgrade the transmission to 2.92

I will let you know if I have any problems or if my upgrade has been successful.


Top
 Profile  
 
PostPosted: Tue Jun 13, 2017 7:08 pm 
Offline

Joined: Sun Apr 29, 2012 5:24 pm
Posts: 2303
Code:
slapt-get -i db5 libgcrypt
and
Code:
ln -s /ffp/lib/libdb-5.3.so /ffp/lib/libdb-5.2.so
should calm lddd I think.

One more thing. In previous post was typing mistake. Should be:
Code:
chmod 644 /ffp/start/sshd.sh
instead of
Code:
chmod 644/ffp/start/sshd.sh
Execute command again and make sure that ffp ssh server is disabled:
Code:
ls -la /ffp/start/sshd.sh
Permissions should be like in this quote:
Quote:
-rw-r--r-- 1 root root 5.3K Jan 25 09:13 /ffp/start/sshd.sh


Top
 Profile  
 
PostPosted: Tue Jun 13, 2017 7:17 pm 
Offline

Joined: Tue Jan 20, 2015 9:46 pm
Posts: 22
I successfully installed "br:transmission-2.92-arm-1.txz", but when i access Silax-Cloud:9091/transmission/web/ It opens my old version Transmission 2.82. I need to stop the sh from the original Zyxel package. How can I stop this process ?

I have this location:
Code:
root@Silax-Cloud:/# find -name "settings.json"
./usr/local/apache/htdocs/adv,/pkg/Transmission/transmission/web/settings.json
./usr/local/zy-pkgs/gui/Transmission/transmission/web/settings.json
./usr/local/zy-pkgs/config/Transmissiontransmission/settings.json
./usr/local/zy-pkgs/config/Transmission/settings.json
./i-data/a46e9c8d/.system/zy-pkgs/gui/Transmission/transmission/web/settings.json
./i-data/a46e9c8d/.system/zy-pkgs/config/Transmissiontransmission/settings.json
./i-data/a46e9c8d/.system/zy-pkgs/config/Transmission/settings.json
./etc/zyxel/zy-pkgs/Transmissiontransmission/settings.json
./etc/zyxel/zy-pkgs/Transmission/settings.json


Top
 Profile  
 
PostPosted: Tue Jun 13, 2017 7:44 pm 
Offline

Joined: Sun Apr 29, 2012 5:24 pm
Posts: 2303
Stop and disable ffp transmission daemon:
Code:
sh /ffp/start/transmission.sh stop
chmod 644 /ffp/start/transmission.sh
Then go to you NAS zyxel admin WebUI
and disable transmission package in the zyxel packages list.
Don't remember, but might be that reboot is required to stop current running zyxel transmission daemon.

After reboot examine locations of directories, where settings.json is located with ls -la or Midnight commander for example.
Transmission home has the following structure as example:
Code:
ls -la /mnt/HD_a2/ffpdata/transmission/
Quote:
drwxr-xr-x 6 transmission transmission 4.0K Jun 13 22:34 .
drwxr-xr-x 8 root root 4.0K Jun 11 15:18 ..
drwxrwxrwx 2 transmission transmission 4.0K Jun 11 00:17 Downloads
drwxr-xr-x 2 transmission transmission 4.0K Aug 16 2012 blocklists
drwxr-xr-x 2 transmission transmission 48K Jun 13 21:47 resume
drwxr-xr-x 2 transmission transmission 56K Jun 12 22:08 torrents
-rw------- 1 transmission transmission 322 Jun 11 15:27 dht.dat
-rw------- 1 transmission transmission 2.2K Jun 11 15:29 settings.json
-rw------- 1 transmission transmission 163 Jun 13 21:47 stats.json
You should find your torrents files inside torrents directory and resume files in resume dir. In that case, you can copy content of zyxel transmission home dir to ffp transmission home location. As example:
Code:
cp -a /usr/local/zy-pkgs/config/Transmission/* /mnt/HD_a2/ffpdata/transmission

And lastly start ffp transmission daemon:
Code:
sh /ffp/start/transmission.sh start


Top
 Profile  
 
PostPosted: Tue Jun 13, 2017 9:06 pm 
Offline

Joined: Tue Jan 20, 2015 9:46 pm
Posts: 22
I start transmission daemon and now i receive the stupid error message

"403: Forbidden

Unauthorized IP Address.

Either disable the IP address whitelist or add your address to it.

If you're editing settings.json, see the 'rpc-whitelist' and 'rpc-whitelist-enabled' entries.

If you're still using ACLs, use a whitelist instead. See the transmission-daemon manpage for details.
"

I edit the /mnt/HD_a2/ffpdata/transmission/settings.json with the correct item:

"rpc-enabled": false,
"rpc-whitelist": "127.0.0.1",
"rpc-whitelist-enabled": false

I don't want to use whitelist because I access the transmission only home.

After editing this json I start the transmission daemon.

It gives me the same error message " Unauthorized IP Address."

Why?


Top
 Profile  
 
PostPosted: Wed Jun 14, 2017 5:44 am 
Offline
User avatar

Joined: Mon Dec 21, 2015 7:21 pm
Posts: 597
Hi,

Firstly change back the rpc-enabled to true, and modify the rpc-whitelist to a simple "*.*.*.*" (or maybe one * is also good).

But when You save the settings.json make sure, You have stopped the TM before! Otherwise it will overwrite Your modifications from the RAM.

_________________
Thanks nas-central the lot of help! :)


Top
 Profile  
 
PostPosted: Wed Jun 14, 2017 8:53 am 
Offline

Joined: Tue Jan 20, 2015 9:46 pm
Posts: 22
Thank you for your advice, very helpful .
Now I have another problem with the procedure to autostart the transmission daemon (transmission.sh) every time i power on my Zyxel NAS.
I granted rights for the transmission daemon
Code:
 chmod 777 /ffp/start/transmission.sh

I have to do something else in order to autostart this daemon ?


Top
 Profile  
 
PostPosted: Wed Jun 14, 2017 10:40 am 
Offline
User avatar

Joined: Mon Dec 21, 2015 7:21 pm
Posts: 597
Well, the 777 is a bit overkill I think. Change back to 755:

Code:
chmod 755 /ffp/start/transmission.sh


Hint: That command gives executable permission to any file:

Code:
chmod +x <path goes here>

_________________
Thanks nas-central the lot of help! :)


Top
 Profile  
 
PostPosted: Wed Jun 14, 2017 12:33 pm 
Offline

Joined: Tue Jan 20, 2015 9:46 pm
Posts: 22
MrDini wrote:
Well, the 777 is a bit overkill I think. Change back to 755:

Code:
chmod 755 /ffp/start/transmission.sh


Hint: That command gives executable permission to any file:

Code:
chmod +x <path goes here>


I change the permission according to your advice and after that I restart my NAS .

The transmission daemon doesn't start automatically :cry:


Top
 Profile  
 
PostPosted: Wed Jun 14, 2017 1:32 pm 
Offline
User avatar

Joined: Mon Dec 21, 2015 7:21 pm
Posts: 597
Would You mind giving us this output?:

Code:
ls -la /ffp/start/transmission.sh


2. If You installed the FFp as zypkg, look at the admin/zy-pgks/ffp/ffp.log for any type of errors, and share it via pastebin for example with us.

_________________
Thanks nas-central the lot of help! :)


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 213 posts ]  Go to page Previous  1 ... 10, 11, 12, 13, 14, 15  Next

All times are UTC


Who is online

Users browsing this forum: Baidu [Spider] and 49 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group