Closed Dhouha-ma closed 8 years ago
Hi, what do you mean you've "build" PydioSync? How about just using it from source?
It's okey now, i copied the utils folder in /usr/lib/python2.7/
I guess that's one way to do it...
but now i get :
File "/usr/bin/pydio", line 9, in
how to fix it ?
Can you give me the exact commands you're running to get that output?
Which version of python is it? 2.7.11 ?
Is it pip install https://github.com/pydio/pydio-sync/
?
python 2.7.3
her is the exact output :
root@OpenWrt:~# python -m pydio.main --api_user=* --api_password=*
DEBUG:root:sys.path:
/usr/lib/python27.zip
/usr/lib/python2.7
/usr/lib/python2.7/plat-linux2
/usr/lib/python2.7/lib-tk
/usr/lib/python2.7/lib-old
/usr/lib/python2.7/lib-dynload
/usr/lib/python2.7/site-packages
DEBUG:root:PYTHONPATH:
DEBUG:root:sys.getdefaultencoding(): ascii
DEBUG:root:sys.getfilesystemencoding(): ASCII
DEBUG:root:os.environ:
HOME: /root
LOGNAME: root
OLDPWD: /usr/bin
PATH: /bin:/sbin:/usr/bin:/usr/sbin
PS1: \u@\h:\w\$
PWD: /root
SHELL: /bin/ash
SSH_CONNECTION: 172.16.17.152 58098 172.16.17.253 22
SSH_TTY: /dev/pts/0
TERM: xterm
USER: root
DEBUG:root:sys.platform: linux2
DEBUG:root:pydio_module: /usr/lib/python2.7/pydio
INFO:root:Linux CONFIG DIR EXPANDED: /root/.local/share
INFO:root:Linux DEFAULT_DATA_PATH: /root/.local/share/Pydio
01:06:14 INFO 721781520 MainThread Product Version Number ##VERSION## and Version Date ##VERSION_DATE##
01:06:14 INFO 721781520 MainThread -----------------------------------------------
01:06:14 INFO 721781520 MainThread Starting agent locally on http://localhost:5556/
01:06:14 INFO 721781520 MainThread ------------------------------------------------
Traceback (most recent call last):
File "/usr/lib/python2.7/runpy.py", line 162, in _run_module_as_main
"main", fname, loader, pkg_name)
File "/usr/lib/python2.7/runpy.py", line 72, in _run_code
exec code in run_globals
File "/usr/lib/python2.7/pydio/main.py", line 318, in
can i make the configuration in the config file manually ? and where is the config file ?
Sure you can but it isn't the easiest route, the config file is usually in ~/.local/Pydio In your position, before using PydioSync on some exotic hardware I would have first tested everything to be familiar with the software on a standard machine, you would know about logs, web interface, databases location and configs. You could even copy the working config file.
and what about the output ? what's due to ? plz i really need help
I am not sure, might be because you're not running 2.7.11, maybe try:
python main.py --api_password=1 --api_user=1
cd
to the right directory
root@OpenWrt:/usr/lib/python2.7/pydio# python main.py --api_password=1 --api_user=1
Traceback (most recent call last):
File "main.py", line 46, in
The config file should be there /root/.local/share/Pydio/configs.json
What do you see with ls sdkremote
?
sdkremote: No such file or directory
You seem to be missing the required submodule
git submodule update --init
this command give me nothing
from where can i get the sdkremote ?
How did you get the code? I just did that and it works fine:
git clone https://github.com/pydio/pydio-sync
cd pydio-sync
git submodule update --init
cd src/pydio/
python main.py
Maybe you should contact sales to get support for you exact use case
i work on OpenWrt i think it's not the same and i got source code from this page on github
anyway thank for your help and your quick answers
I don't understand how it's not the same. You're welcome, I hope you'll get it to work. But really I would try to get it to work from source on a desktop linux first before moving to OpenWrt
i now get the "sdkremote" the error disappear
root@OpenWrt:/usr/lib/python2.7/pydio# python -m pydio.main --server=http://127.0.0.1/pydio/ DEBUG:root:sys.path: /usr/lib/python27.zip /usr/lib/python2.7 /usr/lib/python2.7/plat-linux2 /usr/lib/python2.7/lib-tk /usr/lib/python2.7/lib-old /usr/lib/python2.7/lib-dynload /usr/lib/python2.7/site-packages DEBUG:root:PYTHONPATH: DEBUG:root:sys.getdefaultencoding(): ascii DEBUG:root:sys.getfilesystemencoding(): ASCII DEBUG:root:os.environ: HOME: /root LOGNAME: root OLDPWD: /root/.local/share/Pydio PATH: /bin:/sbin:/usr/bin:/usr/sbin PS1: \u@\h:\w\$ PWD: /usr/lib/python2.7/pydio SHELL: /bin/ash SSH_CONNECTION: 172.16.17.152 58098 172.16.17.253 22 SSH_TTY: /dev/pts/0 TERM: xterm USER: root DEBUG:root:sys.platform: linux2 DEBUG:root:pydio_module: /usr/lib/python2.7/pydio INFO:root:Linux CONFIG DIR EXPANDED: /root/.local/share INFO:root:Linux DEFAULT_DATA_PATH: /root/.local/share/Pydio 02:01:09 INFO 720589584 MainThread Product Version Number ##VERSION## and Version Date ##VERSION_DATE## 02:01:09 INFO 720589584 MainThread ----------------------------------------------- 02:01:09 INFO 720589584 MainThread Starting agent locally on http://localhost:5556/ 02:01:09 INFO 720589584 MainThread ------------------------------------------------ why it stops here ! and don't synchronize ? it stops with this error :
Unhandled exception in thread started by > Traceback (most recent call last): File "/usr/lib/python2.7/pydio/ui/web_api.py", line 219, in start_server logging.exception(e) AttributeError: 'NoneType' object has no attribute 'exception'
note that in /root/.local/share/Pydio# ls general_config.json ports_config pydio.log
there is no configs.json
i tried it on my machine and it works well
Can you visit http://localhost:5556/ ? That is http://≤OpenWrt_IP>:5556/ you'll need the credentials from the _portsconfig or the ones you set with --api_user= --api_password=
i can't access http://localhost:5556/
can i just copy the configs.json file ?
Try to transfer your configs.json
from your machine, it's not syncing because you didn't configure a sync task
yes but how to do it ? even when i copy the configs.json it gives me this
01:39:15 INFO 728023824 MainThread Product Version Number ##VERSION## and Version Date ##VERSION_DATE## 01:39:15 INFO 728023824 MainThread ----------------------------------------------- 01:39:15 INFO 728023824 MainThread Starting agent locally on http://localhost:5556/ 01:39:15 INFO 728023824 MainThread ------------------------------------------------ 01:39:16 INFO 728023824 MainThread Structure and Integrity of SQLite file /root/.local/share/Pydio/127.0.0.1-my-files-3/pydio.sqlite is intact 01:39:16 INFO 728023824 MainThread Structure and Integrity of SQLite file /root/.local/share/Pydio/127.0.0.1-my-files-2/pydio.sqlite is intact 01:39:16 INFO 750040704 Thread-1 Scanning for changes since last application launch 01:39:16 INFO 728023824 MainThread Structure and Integrity of SQLite file /root/.local/share/Pydio/127.0.0.1-my-files/pydio.sqlite is intact 01:39:16 INFO 752137856 Thread-3 Scanning for changes since last application launch 01:39:16 INFO 728023824 MainThread Structure and Integrity of SQLite file /root/.local/share/Pydio/127.0.0.1-my-files-1/pydio.sqlite is intact 01:39:16 INFO 760133248 Thread-2 Starting permanent monitor 01:39:16 INFO 754660992 Thread-5 Scanning for changes since last application launch 01:39:17 INFO 766424704 Thread-4 Starting permanent monitor 01:39:17 INFO 764327552 Thread-7 Scanning for changes since last application launch 01:39:17 INFO 779007616 Thread-6 Starting permanent monitor 01:39:17 INFO 750040704 Thread-1 Loading remote changes with sequence 0 for job id 127.0.0.1-my-files-3 01:39:17 INFO 776910464 Thread-18 Starting permanent monitor 01:39:18 INFO 752137856 Thread-3 Loading remote changes with sequence 0 for job id 127.0.0.1-my-files-2 01:39:18 INFO 754660992 Thread-5 Loading remote changes with sequence 0 for job id 127.0.0.1-my-files 01:39:18 ERROR 750040704 Thread-1 ('Connection aborted.', error(146, 'Connection refused')) Traceback (most recent call last): File "/usr/lib/python2.7/pydio/job/continous_merger.py", line 467, in run self.remote_target_seq = self.load_remote_changes_in_store(self.remote_seq, self.current_store) File "/usr/lib/python2.7/pydio/job/continous_merger.py", line 739, in load_remote_changes_in_store last_seq = self.sdk.changes_stream(seq_id, store.flatten_and_store) File "/usr/lib/python2.7/pydio/sdkremote/remote.py", line 405, in changes_stream resp = self.perform_request(url=url, stream=True) File "/usr/lib/python2.7/pydio/sdkremote/remote.py", line 322, in perform_request tokens = self.basic_authenticate() File "/usr/lib/python2.7/pydio/sdkremote/remote.py", line 180, in basic_authenticate resp = requests.get(url=url, auth=self.auth, verify=self.verify_ssl, proxies=self.proxies) File "/usr/lib/python2.7/site-packages/requests/api.py", line 65, in get return request('get', url, _kwargs) File "/usr/lib/python2.7/site-packages/requests/api.py", line 49, in request response = session.request(method=method, url=url, _kwargs) File "/usr/lib/python2.7/site-packages/requests/sessions.py", line 461, in request resp = self.send(prep, _send_kwargs) File "/usr/lib/python2.7/site-packages/requests/sessions.py", line 573, in send r = adapter.send(request, _kwargs) File "/usr/lib/python2.7/site-packages/requests/adapters.py", line 415, in send raise ConnectionError(err, request=request) ConnectionError: ('Connection aborted.', error(146, 'Connection refused')) 01:39:18 ERROR 752137856 Thread-3 ('Connection aborted.', error(146, 'Connection refused')) Traceback (most recent call last): File "/usr/lib/python2.7/pydio/job/continous_merger.py", line 467, in run self.remote_target_seq = self.load_remote_changes_in_store(self.remote_seq, self.current_store) File "/usr/lib/python2.7/pydio/job/continous_merger.py", line 739, in load_remote_changes_in_store last_seq = self.sdk.changes_stream(seq_id, store.flatten_and_store) File "/usr/lib/python2.7/pydio/sdkremote/remote.py", line 405, in changes_stream resp = self.perform_request(url=url, stream=True) File "/usr/lib/python2.7/pydio/sdkremote/remote.py", line 322, in perform_request tokens = self.basic_authenticate() File "/usr/lib/python2.7/pydio/sdkremote/remote.py", line 180, in basic_authenticate resp = requests.get(url=url, auth=self.auth, verify=self.verify_ssl, proxies=self.proxies) File "/usr/lib/python2.7/site-packages/requests/api.py", line 65, in get return request('get', url, _kwargs) File "/usr/lib/python2.7/site-packages/requests/api.py", line 49, in request response = session.request(method=method, url=url, _kwargs) File "/usr/lib/python2.7/site-packages/requests/sessions.py", line 461, in request resp = self.send(prep, _send_kwargs) File "/usr/lib/python2.7/site-packages/requests/sessions.py", line 573, in send r = adapter.send(request, _kwargs) File "/usr/lib/python2.7/site-packages/requests/adapters.py", line 415, in send raise ConnectionError(err, request=request) ConnectionError: ('Connection aborted.', error(146, 'Connection refused')) 01:39:18 INFO 764327552 Thread-7 Loading remote changes with sequence 0 for job id 127.0.0.1-my-files-1 01:39:18 ERROR 754660992 Thread-5 ('Connection aborted.', error(146, 'Connection refused')) Traceback (most recent call last): File "/usr/lib/python2.7/pydio/job/continous_merger.py", line 467, in run self.remote_target_seq = self.load_remote_changes_in_store(self.remote_seq, self.current_store) File "/usr/lib/python2.7/pydio/job/continous_merger.py", line 739, in load_remote_changes_in_store last_seq = self.sdk.changes_stream(seq_id, store.flatten_and_store) File "/usr/lib/python2.7/pydio/sdkremote/remote.py", line 405, in changes_stream resp = self.perform_request(url=url, stream=True) File "/usr/lib/python2.7/pydio/sdkremote/remote.py", line 322, in perform_request tokens = self.basic_authenticate() File "/usr/lib/python2.7/pydio/sdkremote/remote.py", line 180, in basic_authenticate resp = requests.get(url=url, auth=self.auth, verify=self.verify_ssl, proxies=self.proxies) File "/usr/lib/python2.7/site-packages/requests/api.py", line 65, in get return request('get', url, _kwargs) File "/usr/lib/python2.7/site-packages/requests/api.py", line 49, in request response = session.request(method=method, url=url, _kwargs) File "/usr/lib/python2.7/site-packages/requests/sessions.py", line 461, in request resp = self.send(prep, _send_kwargs) File "/usr/lib/python2.7/site-packages/requests/sessions.py", line 573, in send r = adapter.send(request, _kwargs) File "/usr/lib/python2.7/site-packages/requests/adapters.py", line 415, in send raise ConnectionError(err, request=request) ConnectionError: ('Connection aborted.', error(146, 'Connection refused')) 01:39:19 ERROR 764327552 Thread-7 ('Connection aborted.', error(146, 'Connection refused')) Traceback (most recent call last): File "/usr/lib/python2.7/pydio/job/continous_merger.py", line 467, in run self.remote_target_seq = self.load_remote_changes_in_store(self.remote_seq, self.current_store) File "/usr/lib/python2.7/pydio/job/continous_merger.py", line 739, in load_remote_changes_in_store last_seq = self.sdk.changes_stream(seq_id, store.flatten_and_store) File "/usr/lib/python2.7/pydio/sdkremote/remote.py", line 405, in changes_stream resp = self.perform_request(url=url, stream=True) File "/usr/lib/python2.7/pydio/sdkremote/remote.py", line 322, in perform_request tokens = self.basic_authenticate() File "/usr/lib/python2.7/pydio/sdkremote/remote.py", line 180, in basic_authenticate resp = requests.get(url=url, auth=self.auth, verify=self.verify_ssl, proxies=self.proxies) File "/usr/lib/python2.7/site-packages/requests/api.py", line 65, in get return request('get', url, _kwargs) File "/usr/lib/python2.7/site-packages/requests/api.py", line 49, in request response = session.request(method=method, url=url, _kwargs) File "/usr/lib/python2.7/site-packages/requests/sessions.py", line 461, in request resp = self.send(prep, _send_kwargs) File "/usr/lib/python2.7/site-packages/requests/sessions.py", line 573, in send r = adapter.send(request, _kwargs) File "/usr/lib/python2.7/site-packages/requests/adapters.py", line 415, in send raise ConnectionError(err, request=request) ConnectionError: ('Connection aborted.', error(146, 'Connection refused')) 01:39:19 ERROR 764327552 Thread-7 Connection to server failed, server is probably down. Waiting 60 seconds to retry 01:39:19 ERROR 752137856 Thread-3 Connection to server failed, server is probably down. Waiting 60 seconds to retry 01:39:19 ERROR 750040704 Thread-1 Connection to server failed, server is probably down. Waiting 60 seconds to retry 01:39:19 ERROR 754660992 Thread-5 Connection to server failed, server is probably down. Waiting 60 seconds to retry 01:40:19 INFO 764327552 Thread-7 Loading remote changes with sequence 0 for job id 127.0.0.1-my-files-1 01:40:20 INFO 750040704 Thread-1 Loading remote changes with sequence 0 for job id 127.0.0.1-my-files-3 01:40:20 INFO 754660992 Thread-5 Loading remote changes with sequence 0 for job id 127.0.0.1-my-files 01:40:20 INFO 752137856 Thread-3 Loading remote changes with sequence 0 for job id 127.0.0.1-my-files-2 01:40:20 ERROR 764327552 Thread-7 ('Connection aborted.', error(146, 'Connection refused')) Traceback (most recent call last):
it means that either your config is wrong or you server isn't reachable from your OpenWrt can you ping <IP>
or even curl <IP/pydio/api/my-files/ls
(maybe without /pydio)
you need to set the password in the keyring, or in the configs.json file
how to set it ??
here is a part of my configs.json
"127.0.0.1-my-files-3": { "direction": "bi", "filters": { "excludes": [ ".", "/._", "/recyclebin", "_.pydiodl", ".DSStore", ".~lock." ], "includes": [ "_" ] }, "hide_bi_dir": "false", "start_time": { "h": 0, "m": 0 }, "type": "JobConfig", "timeout": 20, "server": "http://127.0.0.1/pydio/", "trust_ssl": false, "remote_folder": "", "hide_down_dir": "false", "frequency": "auto", "solve": "both", "user": "admin", "workspace": "my-files", "hide_up_dir": "false", "directory": "/tmp/Pydio/My Files", "label": "Pydio - My Files", "active": true, "id": "127.0.0.1-my-files-3"
add a field:
"127.0.0.1-my-files-3": { "password": YOURPASSWORD,
Normally it's not stored here, but for some setups it can be useful.
i added that field and it doesn't solve the problem
what do you get when you run from your OpenWrt machine:
curl http://127.0.0.1/
curl http://127.0.0.1/pydio
curl http://127.0.0.1/pydio/api/my-files/changes/0
?
BTW make sure it's like so "includes": ["*"]
in your file and not "" because the later means sync nothing.
i retried, the process in my ubuntu machine
when i run : python main.py --api_user=admin --api_password=admin i can access http://localhost:5556/ and configure and everything works well
for OpenWrt machine i run the same python main.py --api_user=admin --api_password=admin it starts and i couldn't access http://localhost:5556/ so i copied the configs.json from my machine
here is the file: { "127.0.0.1-my-files": { "direction": "bi", "filters": { "excludes": [ ".", "/._", "/recyclebin", "_.pydiodl", ".DSStore", ".~lock.", "~", ".xlk", "_.tmp" ], "includes": [ "*" ] }, "poolsize": 4, "hide_bi_dir": "false", "start_time": { "h": 0, "m": 0 }, "type": "JobConfig", "timeout": 20, "server": "http://127.0.0.1/pydio/", "trust_ssl": false, "remote_folder": "", "hide_down_dir": "false", "frequency": "auto", "solve": "both", "user": "adminadmin", "workspace": "my-files", "hide_up_dir": "false", "directory": "/home/dhouha/Pydio/My Files", "label": "Pydio - My Files", "active": true, "id": "127.0.0.1-my-files" } }
i changed the directory and i run again to get :+1: 01:53:56 INFO 725361424 MainThread Starting agent locally on http://localhost:5556/ 01:53:56 INFO 725361424 MainThread ------------------------------------------------ 01:53:56 INFO 725361424 MainThread Structure and Integrity of SQLite file /root/.local/share/Pydio/127.0.0.1-my-files/changes.sqlite is intact 01:53:56 INFO 725361424 MainThread Structure and Integrity of SQLite file /root/.local/share/Pydio/127.0.0.1-my-files/pydio.sqlite is intact 01:53:57 INFO 747378304 Thread-1 Scanning for changes since last application launch 01:53:57 INFO 749475456 Thread-2 Starting permanent monitor 01:53:57 INFO 747378304 Thread-1 Loading remote changes with sequence 2 for job id 127.0.0.1-my-files 01:53:57 ERROR 747378304 Thread-1 ('Connection aborted.', error(146, 'Connection refused')) Traceback (most recent call last): File "/usr/lib/python2.7/site-packages/pydio/job/continous_merger.py", line 467, in run self.remote_target_seq = self.load_remote_changes_in_store(self.remote_seq, self.current_store) File "/usr/lib/python2.7/site-packages/pydio/job/continous_merger.py", line 739, in load_remote_changes_in_store last_seq = self.sdk.changes_stream(seq_id, store.flatten_and_store) File "/usr/lib/python2.7/site-packages/pydio/sdkremote/remote.py", line 405, in changes_stream resp = self.perform_request(url=url, stream=True) File "/usr/lib/python2.7/site-packages/pydio/sdkremote/remote.py", line 322, in perform_request tokens = self.basic_authenticate() File "/usr/lib/python2.7/site-packages/pydio/sdkremote/remote.py", line 180, in basic_authenticate resp = requests.get(url=url, auth=self.auth, verify=self.verify_ssl, proxies=self.proxies) File "/usr/lib/python2.7/site-packages/requests/api.py", line 65, in get return request('get', url, _kwargs) File "/usr/lib/python2.7/site-packages/requests/api.py", line 49, in request response = session.request(method=method, url=url, _kwargs) File "/usr/lib/python2.7/site-packages/requests/sessions.py", line 461, in request resp = self.send(prep, _send_kwargs) File "/usr/lib/python2.7/site-packages/requests/sessions.py", line 573, in send r = adapter.send(request, _kwargs) File "/usr/lib/python2.7/site-packages/requests/adapters.py", line 415, in send raise ConnectionError(err, request=request) ConnectionError: ('Connection aborted.', error(146, 'Connection refused')) 01:53:57 ERROR 747378304 Thread-1 Connection to server failed, server is probably down. Waiting 60 seconds to retry
i really can't success make it work on OpenWrt machine
Did you manage to run curl?
python -c "import requests; r = requests.get('http://127.0.01/pydio/api/my-files/ls', auth=('ADMIN', 'PASSWORD')); print(r.text)"
If that doesn't work the sync cannot work. If you don't have curl on OpenWrt try the above setting you username (ADMIN) and password accordingly.
"ConnectionError: ('Connection aborted.', error(146, 'Connection refused'))" looks like a firewall or something
i changed the ip and added a password field as you mentioned and now it works :D
Hi, i successfuly build pydio-sync on OpenWrt when i execute the binary it i get :
Traceback (most recent call last): File "./pydio", line 9, in
load_entry_point('pydio==0.1', 'console_scripts', 'pydio')()
File "/home/ubuntu/Bureau/openwrtt/staging_dir/target-mipsel_r2_uClibc-0.9.32/usr/lib/python2.7/pkg_resources/init.py", line 542, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "/home/ubuntu/Bureau/openwrtt/staging_dir/target-mipsel_r2_uClibc-0.9.32/usr/lib/python2.7/pkg_resources/init.py", line 2569, in load_entry_point
return ep.load()
File "/home/ubuntu/Bureau/openwrtt/staging_dir/target-mipsel_r2_uClibc-0.9.32/usr/lib/python2.7/pkg_resources/init.py", line 2229, in load
return self.resolve()
File "/home/ubuntu/Bureau/openwrtt/staging_dir/target-mipsel_r2_uClibc-0.9.32/usr/lib/python2.7/pkg_resources/init.py", line 2235, in resolve
module = import(self.module_name, fromlist=['name'], level=0)
File "/home/ubuntu/Bureau/openwrtt/staging_dir/target-mipsel_r2_uClibc-0.9.32/usr/lib/python2.7/site-packages/pydio-0.1-py2.7.egg/pydio/main.py", line 43, in
File "/home/ubuntu/Bureau/openwrtt/staging_dir/target-mipsel_r2_uClibc-0.9.32/usr/lib/python2.7/site-packages/pydio-0.1-py2.7.egg/pydio/test/diagnostics.py", line 31, in
ImportError: No module named utils.global_config
what's wrong !? any help ?
and i find the same issue on Ubuntu 14.04 (https://pydio.com/forum/f/topic/pydio-sync-importerror-no-module-named-utils-global_config/#post-101458)