Problem to esport mailbox to pst file
-
@andreargamgroup said in Problem to esport mailbox to pst file:
UnicodeEncodeError: 'latin-1' codec can't encode characters in position
Also, post the output of locale command.
-
@a-spinek
vprotect-server-6.0.0-24.el8.x86_64
vprotect-node-6.0.0-29.el8.x86_64 -
And locale?
-
@a-spinek
LANG=en_US.UTF-8
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL= -
Can you check if Winrm is configured properly? You can follow suggestions from this KB https://storware.atlassian.net/wiki/spaces/vprotect/pages/2095153400/KB+10085+Export+to+PST+-+how+to+diagnose+winrm+exceptions
-
@a-spinek
Hello, the link reply:
404 Not Found -
Ah because of the censorship
copy this link and change * to s
-
Hello, I made all passages described in the document and the last command give correctly the remote machine name, but if I try the "Export to pst" I have the same error:
[2023-12-22 12:56:26.975] ERROR [pool-5-thread-2] ITask.finishTask:47
[c40307fe-84df-4e2a-b995-ff1a9929594b] Mount task failed:eu.storware.vprotect.engine.exception.CmdExecException: Command execution failed: [/bin/sh, -c, source /tmp/vprotect/pst/09314f5c-922c-47d2-a2b4-8f985aa06c0a.sh ; /opt/vprotect/venv/bin/python3 /opt/vprotect/scripts/convert_to_pst.py]
Return code: 1
output:
[]
error:
[Traceback (most recent call last):
File "/opt/vprotect/scripts/convert_to_pst.py", line 45, in <module>
response = session.run_cmd(f"powershell "{script_path} {smb_user} {smb_pw} {local_ip} {smb_share}"")
File "/opt/vprotect/venv/lib64/python3.6/site-packages/winrm/init.py", line 39, in run_cmd
shell_id = self.protocol.open_shell()
File "/opt/vprotect/venv/lib64/python3.6/site-packages/winrm/protocol.py", line 166, in open_shell
res = self.send_message(xmltodict.unpa**e(req))
File "/opt/vprotect/venv/lib64/python3.6/site-packages/winrm/protocol.py", line 243, in send_message
resp = self.transport.send_message(message)
File "/opt/vprotect/venv/lib64/python3.6/site-packages/winrm/transport.py", line 332, in send_message
prepared_request = self.session.prepare_request(request)
File "/opt/vprotect/venv/lib64/python3.6/site-packages/requests/sessions.py", line 466, in prepare_request
hooks=merge_hooks(request.hooks, self.hooks),
File "/opt/vprotect/venv/lib64/python3.6/site-packages/requests/models.py", line 320, in prepare
self.prepare_auth(auth, url)
File "/opt/vprotect/venv/lib64/python3.6/site-packages/requests/models.py", line 556, in prepare_auth
r = auth(self)
File "/opt/vprotect/venv/lib64/python3.6/site-packages/requests/auth.py", line 96, in call
r.headers['Authorization'] = _basic_auth_str(self.username, self.password)
File "/opt/vprotect/venv/lib64/python3.6/site-packages/requests/auth.py", line 63, in _basic_auth_str
password = password.encode('latin1')
UnicodeEncodeError: 'latin-1' codec can't encode characters in position 7-10: ordinal not in range(256)
]
at eu.storware.vprotect.engine.cmdexecutor.CommandExecutor.exec(CommandExecutor.java:117) ~[engine.jar:?]
at eu.storware.vprotect.engine.cmdexecutor.CommandExecutor.exec(CommandExecutor.java:91) ~[engine.jar:?]
at eu.storware.vprotect.engine.cmdexecutor.CommandExecutor.exec(CommandExecutor.java:67) ~[engine.jar:?]
at eu.storware.vprotect.engine.task.mount.strategy.clouddownloadstrategy.CloudPSTDownloadStrategy.mount(CloudPSTDownloadStrategy.java:76) ~[engine.jar:?]
at eu.storware.vprotect.engine.task.MountTask.run(MountTask.java:41) [engine.jar:?]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [?:?]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [?:?]
at java.lang.Thread.run(Thread.java:829) [?:?]
[2023-12-22 12:56:27.069] INFO [pool-5-thread-2] ITask.lambda$finishTask$2:71
[c40307fe-84df-4e2a-b995-ff1a9929594b] Finishing c40307fe-84df-4e2a-b995-ff1a9929594b: [Mount] from 2023-12-22T12:55:40+01:00 to 2023-12-22T13:55:40+01:00 Task with message "Mount task failed: CmdExecException: Command execution failed: [/bin/sh, -c, source /tmp/vprotect/pst/09314f5c-922c-47d2-a2b4-8f985aa06c0a.sh ; /opt/vprotect/venv/bin/python3 /opt/vprotect/scripts/convert_to_pst.py]
Return code: 1
output:
[]
error:
[Traceback (most recent call last):
File "/opt/vprotect/scripts/convert_to_pst.py", line 45, in <module>
response = session.run_cmd(f"powershell "{script_path} {smb_user} {smb_pw} {local_ip} {smb_share}"")
File "/opt/vprotect/venv/lib64/python3.6/site-packages/winrm/init.py", line 39, in run_cmd
shell_id = self.protocol.open_shell()
File "/opt/vprotect/venv/lib64/python3.6/site-packages/winrm/protocol.py", line 166, in open_shell
res = self.send_message(xmltodict.unpa**e(req))
File "/opt/vprotect/venv/lib64/python3.6/site-packages/winrm/protocol.py", line 243, in send_message
resp = self.transport.send_message(message)
File "/opt/vprotect/venv/lib64/python3.6/site-packages/winrm/transport.py", line 332, in send_message
prepared_request = self.session.prepare_request(request)
File "/opt/vprotect/venv/lib64/python3.6/site-packages/requests/sessions.py", line 466, in prepare_request
hooks=merge_hooks(request.hooks, self.hooks),
File "/opt/vprotect/venv/lib64/python3.6/site-packages/requests/models.py", line 320, in prepare
self.prepare_auth(auth, url)
File "/opt/vprotect/venv/lib64/python3.6/site-packages/requests/models.py", line 556, in prepare_auth
r = auth(self)
File "/opt/vprotect/venv/lib64/python3.6/site-packages/requests/auth.py", line 96, in call
r.headers['Authorization'] = _basic_auth_str(self.username, self.password)
File "/opt/vprotect/venv/lib64/python3.6/site-packages/requests/auth.py", line 63, in _basic_auth_str
password = password.encode('latin1')
UnicodeEncodeError: 'latin-1' codec can't encode characters in position 7-10: ordinal not in range(256)
]" -
@andreargamgroup
Hello, any news? -
@andreargamgroup Sorry for the late response. This error is thrown from the Python packages.
if isinstance(username, str): username = username.encode('latin1') if isinstance(password, str): password = password.encode('latin1')
Do you have special characters in the password? If yes, can you try to set a password with only letters and check if this will work as a workaround?
-
@a-spinek
I tried to set a password with letters end numbers (no special characters) because I can't put only letters for the policies restrictions. Nothing it schange. -
@andreargamgroup I can confirm that the same behavior occurs when you are using a password with UTF-8 characters. I will let you know when the fix for this problem will be ready.