NT_STATUS_ILLEGAL_CHARACTER Error when use SMB external storage on the Owncloud server 10.0.9 - nfs

I have a problem with Owncloud server 10.0.9 on CentOS7.5,
I can connect to SMB external storage (Qnap NAS storage) When access to a directory name in the Thai language I face to error "This directory is unavailable, please check the logs or contact the administrator".
This is some an error log "message : Exception: Unknown error (NT_STATUS_ILLEGAL_CHARACTER)".
What should I do for fixing it. Some error log 1 line {"reqId":"W5CICcWjPsyMxSgKIiEFeQAAAAA","level":4,"time":"2018-09-06T01:51:05+00:00","remoteAddr":"192.168.1.35","user":"wannacha","app":"webdav","method":"PROPFIND","url":"/remote.php/webdav/ISO-GDL","message":"Exception: Unknown error (NT_STATUS_ILLEGAL_CHARACTER) for /Note \u0e01\u0e32\u0e23\u0e1b\u0e23\u0e30\u0e0a\u0e38\u0e21\u0e27\u0e31\u0e19\u0e17\u0e35\u0e48 3 \u0e01.\u0e22.61: {\"Exception\":\"Icewind\\SMB\\Exception\\Exception\",\"Message\":\"Unknown error (NT_STATUS_ILLEGAL_CHARACTER) for \/Note \u0e01\u0e32\u0e23\u0e1b\u0e23\u0e30\u0e0a\u0e38\u0e21\u0e27\u0e31\u0e19\u0e17\u0e35\u0e48 3 \u0e01.\u0e22.61\",\"Code\":0,\"Trace\":\"#0 \/var\/www\/html\/owncloud\/apps\/files_external\/3rdparty\/icewind\/smb\/src\/Exception\/Exception.php(35): Icewind\\SMB\\Exception\\Exception::unknown('\/Note \\xE0\\xB8\\x81\\xE0\\xB8\\xB2\\xE0\\xB8\\xA3...', 'NT_STATUS_ILLEG...')\n#1 \/var\/www\/html\/owncloud\/apps\/files_external\/3rdparty\/icewind\/smb\/src\/Wrapped\/Parser.php(85): Icewind\\SMB\\Exception\\Exception::fromMap(Array, 'NT_STATUS_ILLEG...', '\/Note \\xE0\\xB8\\x81\\xE0\\xB8\\xB2\\xE0\\xB8\\xA3...')\n#2 \/var\/www\/html\/owncloud\/apps\/files_external\/3rdparty\/icewind\/smb\/src\/Wrapped\/Share.php(403): Icewind\\SMB\\Wrapped\\Parser->checkForError(Array, '\/Note \\xE0\\xB8\\x81\\xE0\\xB8\\xB2\\xE0\\xB8\\xA3...')\n#3 \/var\/www\/html\/owncloud\/apps\/files_external\/3rdparty\/icewind\/smb\/src\/Wrapped\/Share.php(165): Icewind\\SMB\\Wrapped\\Share->parseOutput(Array, '\/Note \\xE0\\xB8\\x81\\xE0\\xB8\\xB2\\xE0\\xB8\\xA3...')\n#4 \/var\/www\/html\/owncloud\/apps\/files_external\/lib\/Lib\/Storage\/SMB.php(141): Icewind\\SMB\\Wrapped\\Share->stat('\/Note \\xE0\\xB8\\x81\\xE0\\xB8\\xB2\\xE0\\xB8\\xA3...')\n#5 \/var\/www\/html\/owncloud\/apps\/files_external\/lib\/Lib\/Storage\/SMB.php(548): OCA\\Files_External\\Lib\\Storage\\SMB->getFileInfo('Note \\xE0\\xB8\\x81\\xE0\\xB8\\xB2\\xE0\\xB8\\xA3\\xE0...')\n#6 \/var\/www\/html\/owncloud\/lib\/private\/Files\/Storage\/Common.php(102): OCA\\Files_External\\Lib\\Storage\\SMB->filetype('Note \\xE0\\xB8\\x81\\xE0\\xB8\\xB2\\xE0\\xB8\\xA3\\xE0...')\n#7 \/var\/www\/html\/owncloud\/lib\/private\/Files\/Storage\/Common.php(136): OC\\Files\\Storage\\Common->is_dir('Note \\xE0\\xB8\\x81\\xE0\\xB8\\xB2\\xE0\\xB8\\xA3\\xE0...')\n#8 \/var\/www\/html\/owncloud\/lib\/private\/Files\/Storage\/Common.php(156): OC\\Files\\Storage\\Common->isCreatable('Note \\xE0\\xB8\\x81\\xE0\\xB8\\xB2\\xE0\\xB8\\xA3\\xE0...')\n#9 \/var\/www\/html\/owncloud\/lib\/private\/Files\/Storage\/Common.php(625): OC\\Files\\Storage\\Common->getPermissions('Note \\xE0\\xB8\\x81\\xE0\\xB8\\xB2\\xE0\\xB8\\xA3\\xE0...')\n#10 \/var\/www\/html\/owncloud\/lib\/private\/Files\/Storage\/Wrapper\/Wrapper.php(577): OC\\Files\\Storage\\Common->getMetaData('Note \\xE0\\xB8\\x81\\xE0\\xB8\\xB2\\xE0\\xB8\\xA3\\xE0...')\n#11 \/var\/www\/html\/owncloud\/lib\/private\/Files\/Storage\/Wrapper\/Wrapper.php(577): OC\\Files\\Storage\\Wrapper\\Wrapper->getMetaData('Note \\xE0\\xB8\\x81\\xE0\\xB8\\xB2\\xE0\\xB8\\xA3\\xE0...')\n#12 \/var\/www\/html\/owncloud\/lib\/private\/Files\/Storage\/Wrapper\/Availability.php(459): OC\\Files\\Storage\\Wrapper\\Wrapper->getMetaData('Note \\xE0\\xB8\\x81\\xE0\\xB8\\xB2\\xE0\\xB8\\xA3\\xE0...')\n#13 \/var\/www\/html\/owncloud\/lib\/private\/Files\/Storage\/Wrapper\/Encryption.php(177): OC\\Files\\Storage\\Wrapper\\Availability->getMetaData('Note \\xE0\\xB8\\x81\\xE0\\xB8\\xB2\\xE0\\xB8\\xA3\\xE0...')\n#14 \/var\/www\/html\/owncloud\/lib\/private\/Files\/Storage\/Wrapper\/Wrapper.php(577): OC\\Files\\Storage\\Wrapper\\Encryption->getMetaData('Note \\xE0\\xB8\\x81\\xE0\\xB8\\xB2\\xE0\\xB8\\xA3\\xE0...')\n#15 \/var\/www\/html\/owncloud\/lib\/private\/Files\/Storage\/Wrapper\/Checksum.php(202): OC\\Files\\Storage\\Wrapper\\Wrapper->getMetaData('Note \\xE0\\xB8\\x81\\xE0\\xB8\\xB2\\xE0\\xB8\\xA3\\xE0...')\n#16 \/var\/www\/html\/owncloud\/lib\/private\/Files\/Cache\/Scanner.php(116): OC\\Files\\Storage\\Wrapper\\Checksum->getMetaData('Note \\xE0\\xB8\\x81\\xE0\\xB8\\xB2\\xE0\\xB8\\xA3\\xE0...')\n#17 \/var\/www\/html\/owncloud\/lib\/private\/Files\/Cache\/Scanner.php(153): OC\\Files\\Cache\\Scanner->getData('Note \\xE0\\xB8\\x81\\xE0\\xB8\\xB2\\xE0\\xB8\\xA3\\xE0...')\n#18 \/var\/www\/html\/owncloud\/lib\/private\/Files\/Cache\/Scanner.php(426): OC\\Files\\Cache\\Scanner->scanFile('Note \\xE0\\xB8\\x81\\xE0\\xB8\\xB2\\xE0\\xB8\\xA3\\xE0...', 3, '712', NULL, true)\n#19 \/var\/www\/html\/owncloud\/lib\/private\/Files\/Cache\/Scanner.php(394): OC\\Files\\Cache\\Scanner->handleChildren('', false, 3, '712', true, -1)\n#20 \/var\/www\/html\/owncloud\/lib\/private\/Files\/Cache\/Scanner.php(327): OC\\Files\\Cache\\Scanner->scanChildren('', false, 3, 712, true)\n#21 \/var\/www\/html\/owncloud\/lib\/private\/Files\/View.php(1368): OC\\Files\\Cache\\Scanner->scan('', false)\n#22 \/var\/www\/html\/owncloud\/lib\/private\/Files\/View.php(1409): OC\\Files\\View->getCacheEntry(Object(OC\\Files\\Storage\\Wrapper\\Checksum), '', 'ISO-GDL')\n#23 \/var\/www\/html\/owncloud\/apps\/dav\/lib\/Connector\/Sabre\/ObjectTree.php(179): OC\\Files\\View->getFileInfo('ISO-GDL')\n#24 \/var\/www\/html\/owncloud\/lib\/composer\/sabre\/dav\/lib\/DAV\/Server.php(966): OCA\\DAV\\Connector\\Sabre\\ObjectTree->getNodeForPath('ISO-GDL')\n#25 \/var\/www\/html\/owncloud\/lib\/composer\/sabre\/dav\/lib\/DAV\/Server.php(1665): Sabre\\DAV\\Server::getPropertiesIteratorForPath('ISO-GDL', Array, 1)\n#26 \/var\/www\/html\/owncloud\/lib\/composer\/sabre\/dav\/lib\/DAV\/CorePlugin.php(355): Sabre\\DAV\\Server->generateMultiStatus(Object(Generator), false)\n#27 [internal function]: Sabre\\DAV\\CorePlugin->httpPropFind(Object(Sabre\\HTTP\\Request), Object(Sabre\\HTTP\\Response))\n#28 \/var\/www\/html\/owncloud\/lib\/composer\/sabre\/event\/lib\/EventEmitterTrait.php(105): call_user_func_array(Array, Array)\n#29 \/var\/www\/html\/owncloud\/lib\/composer\/sabre\/dav\/lib\/DAV\/Server.php(479): Sabre\\Event\\EventEmitter->emit('method:PROPFIND', Array)\n#30 \/var\/www\/html\/owncloud\/lib\/composer\/sabre\/dav\/lib\/DAV\/Server.php(254): Sabre\\DAV\\Server->invokeMethod(Object(Sabre\\HTTP\\Request), Object(Sabre\\HTTP\\Response))\n#31 \/var\/www\/html\/owncloud\/apps\/dav\/appinfo\/v1\/webdav.php(64): Sabre\\DAV\\Server->exec()\n#32 \/var\/www\/html\/owncloud\/remote.php(165): require_once('\/var\/www\/html\/o...')\n#33 {main}\",\"File\":\"\/var\/www\/html\/owncloud\/apps\/files_external\/3rdparty\/icewind\/smb\/src\/Exception\/Exception.php\",\"Line\":17}"}

Related

Syslog-ng row message required to send- no timestamp - no header require

I am using below configuration of syslog-ng OS. Our purpose is to get the syslog message from device and relay the same message to analytic tool. We want to have row log message as shown below , to be sent to analytic tool without removing any character (i.e. ',") from original message. providing configuration file , original log and processed log (by syslog-ng). We also want to get rid of additional header or timestamp added by syslog-ng.
Configuration file
Used version:- Version: 3.2.5
options {flush_lines (0);time_reopen (10);log_fifo_size (1000);long_hostnames (off);use_dns (no); use_fqdn (no);create_dirs (no);keep_hostname (yes);keep-timestamp(no);};
source slocal{syslog(port(514) transport("udp")flags(no-parse) );};
template t_syslog {template("${MESSAGE}\n");template-escape(yes);};
destination dfgtall { file("/var/netwitness/fgtall.log" template(t_syslog)); };
log { source(slocal);destination(dfgtall); };
Original log
date=2020-03-07 time=20:46:02 devname="ABCD" devid="FGT" logid="0000000013" type="traffic" subtype="forward" level="notice" vd="VDOM-Int" eventtime=1583594162 srcip=1.1.1.1 srcport=55498 srcintf="LAN" srcintfrole="lan" dstip=10.10.10.1 dstport=21 dstintf="EXTERNAL" dstintfrole="wan" sessionid=583411984 proto=6 action="deny" policyid=0 policytype="policy" service="FTP" dstcountry="United States" srccountry="Reserved" trandisp="noop" duration=0 sentbyte=0 rcvdbyte=0 sentpkt=0 appcat="unscanned" crscore=30 craction=131072 crlevel="high"
Received log message
<5>Jul 20 14:41:42 root: date=2020-03-07 time=20:46:02 devname=ABCD devid=FGT logid=0000000013 type=traffic subtype=forward level=notice vd=VDOM-Int eventtime=1583594162 srcip=1.1.1.1 srcport=55498 srcintf=LAN srcintfrole=lan dstip=10.10.10.1 dstport=21 dstintf=EXTERNAL dstintfrole=wan sessionid=583411984 proto=6 action=deny policyid=0 policytype=policy service=FTP dstcountry=United States srccountry=Reserved trandisp=noop duration=0 sentbyte=0 rcvdbyte=0 sentpkt=0 appcat=unscanned crscore=30 craction=131072 crlevel=high
syslog-ng v3.2.5 is really old. Please upgrade to a newer version.
Using flags(no-parse) in the source, and the proper template in the destination config ($MESSAGE\n) are the key here.
The following snippet works as expected with syslog-ng v3.28:
source s_udp {
syslog(
port(514)
transport("udp")
flags(no-parse)
);
};
destination dfgtall { file("/tmp/fgtall.log" template("${MESSAGE}\n")); };
log {
source(s_udp);
destination(dfgtall);
};

Documentum error : [DM_SESSION_E_RPC_ERROR]

I am trying to get the content of all the documents (current version) from a documentum source using the following code
IDfSysObject document = (IDfSysObject) session.getObject(new DfId(eachFileMetadata.get(some document id).toString()));
ByteArrayInputStream docContent = document.getContent();
I am getting the following error:
DfIOException:: THREAD: Thread-585; MSG: [DM_SESSION_E_RPC_ERROR]error: "Server communication failure"; ERRORCODE: 100; NEXT: null
at com.documentum.fc.client.DfIOException.newCommunicationFailureException(DfIOException.java:16)
at com.documentum.fc.client.impl.connection.netwise.AbstractNetwiseRpcClient.receiveMessage(AbstractNetwiseRpcClient.java:193)
at com.documentum.fc.client.impl.connection.docbase.netwise.NetwiseDocbaseRpcClient.getBlock(NetwiseDocbaseRpcClient.java:1042)
at com.documentum.fc.client.impl.connection.docbase.DocbaseConnection.getBlock(DocbaseConnection.java:1475)
at com.documentum.fc.client.impl.connection.docbase.RawPuller.getBlock(RawPuller.java:52)
at com.documentum.fc.client.content.impl.BlockPuller.nextBlock(BlockPuller.java:49)
at com.documentum.fc.client.content.impl.PullerInputStream.getNextBuffer(PullerInputStream.java:73)
at com.documentum.fc.client.content.impl.PullerInputStream.ensureBufferHasData(PullerInputStream.java:63)
at com.documentum.fc.client.content.impl.PullerInputStream.read(PullerInputStream.java:88)
at java.io.FilterInputStream.read(FilterInputStream.java:133)
at java.io.FilterInputStream.read(FilterInputStream.java:133)
at java.io.FilterInputStream.read(FilterInputStream.java:107)
at com.documentum.fc.impl.util.io.StreamUtility.copyContents(StreamUtility.java:50)
at com.documentum.fc.impl.util.io.StreamUtility.copyContents(StreamUtility.java:30)
at com.documentum.fc.client.DfSysObject.getContentEx3(DfSysObject.java:1952)
at com.documentum.fc.client.DfSysObject.getContentEx2(DfSysObject.java:1942)
at com.documentum.fc.client.DfSysObject.getContent(DfSysObject.java:1932)
at com.documentum.fc.client.DfDocument___PROXY.getContent(DfDocument___PROXY.java)
the above error occured when I am trying to get the content of a document,can anyone please help me??

Ryu, openflow v1.5, OFPET_BAD_ACTION, OFPBAC_BAD_OUT_PORT errors

When I run simple_switch_14.py application in mininet environment, the ping of hosts works just fine.
Then I change the following strings of code:
1) "from ryu.ofproto import ofproto_v1_4" to "from ryu.ofproto import ofproto_v1_5"
2) "OFP_VERSIONS = [ofproto_v1_4.OFP_VERSION]" to "OFP_VERSIONS = [ofproto_v1_5.OFP_VERSION]"
3) "out = parser.OFPPacketOut(datapath=datapath, buffer_id=msg.buffer_id, in_port=in_port, actions=actions, data=data)" to "out = parser.OFPPacketOut(datapath=datapath, buffer_id=msg.buffer_id, match=parser.OFPMatch(in_port=in_port), actions=actions, data=data)"
it means that I am trying to run this application in openflow 1.5 version environment.
I get following error:
EVENT ofp_event->SimpleSwitch14 EventOFPPacketIn
packet in 1 00:00:00:00:00:01 ff:ff:ff:ff:ff:ff 1
EventOFPErrorMsg received.
version=0x6, msg_type=0x1, msg_len=0x44, xid=0x703a0cc
-- msg_type: OFPT_ERROR(1)
OFPErrorMsg(type=0x2, code=0x4, data=b'\x06\x0d\x00\x38\x07\x03\xa0\xcc\x00\x00\x01\x00\x00\x10\x00\x00\x00\x01\x00\x16\x80\x00\x00\x04\x00\x00\x00\x01\x80\x00\x06\x06\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x10\xff\xff\xff\xfb\xff\xe5\x00\x00\x00\x00\x00\x00')
|-- type: OFPET_BAD_ACTION(2)
|-- code: OFPBAC_BAD_OUT_PORT(4)
-- data: version=0x6, msg_type=0xd, msg_len=0x38, xid=0x703a0cc
`-- msg_type: OFPT_PACKET_OUT(13)
so, I am wondering, why it generates 'bad out port' error, what has changed in 'out ports' or in 'actions' between v1.4 and v1.5 of openflow protocols?
Thanks

Django: Django generated sql query causes error

Updated question:
Django is giving me the following sql query:
SELECT "auth_user"."id", "auth_user"."username", "auth_user"."first_name", "auth_user"."last_name", "auth_user"."email", "auth_user"."password", "auth_user"."is_staff", "auth_user"."is_active", "auth_user"."is_superuser", "auth_user"."last_login", "auth_user"."date_joined" FROM "auth_user" WHERE "auth_user"."username" = %s args=('andrew',);
If I execute the sql query in the postgresql command line, I get the following error:
ERROR: syntax error at or near "%"
LINE 1: ..." FROM "auth_user" WHERE "auth_user"."username" = %s args=(...
^
However, when I slightly modify the statement, then I get the cirrect result from postgresql.
SELECT "auth_user"."id", "auth_user"."username", "auth_user"."first_name", "auth_user"."last_name", "auth_user"."email", "auth_user"."password", "auth_user"."is_staff", "auth_user"."is_active", "auth_user"."is_superuser", "auth_user"."last_login", "auth_user"."date_joined" FROM "auth_user" WHERE "auth_user"."username" = 'andrew';
Is the Django generated query incorrect?
Hi Stackoverflow people,
Very simple code which drives me crazy:
I want to extract the user information from user_auth with
user = get_object_or_404(User, pk = request.user.pk)
However, I get an error message in Django:
'NoneType' object does not support item assignment
When I check the sql query and execute it in the psql command line, psql gives me also an error message, which makes me thinking that the statement might be incorrect.
psql statement is:
SELECT "auth_user"."id", "auth_user"."username", "auth_user"."first_name", "auth_user"."last_name", "auth_user"."email", "auth_user"."password", "auth_user"."is_staff", "auth_user"."is_active", "auth_user"."is_superuser", "auth_user"."last_login", "auth_user"."date_joined" FROM "auth_user" WHERE "auth_user"."id" = %s ; args=(7,)
Why does it say %s in the WHERE statement? The user id is not a string.
I believe the solution must be very simple - but I can figure out what the issue is here.
Thank you for your help and suggestions!
Additional explanation
I am using the django_social_auth package for the user authentification. The user will be directed to the dashboard site once the 3rd part cleared the credentials, therefore I would assume that request.user is not None.
Complete traceback
Environment:
Request Method: GET
Request URL: http://login.test.com:8000/profile/dashboard/
Django Version: 1.3.1
Python Version: 2.7.1
Installed Applications:
['django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
'django.contrib.gis',
'django.contrib.messages',
'django.contrib.markup',
'django.contrib.staticfiles',
'django.contrib.flatpages',
'django.contrib.humanize',
'guardian',
'easy_thumbnails',
'userena',
'userena.contrib.umessages',
'south',
'django_extensions',
'debug_toolbar',
'social_auth',
'djangoratings',
'about',
'apps.profiles',
'apps.map',
'apps.contact',
]
Installed Middleware:
['django.middleware.common.CommonMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.doc.XViewMiddleware',
'django.contrib.flatpages.middleware.FlatpageFallbackMiddleware',
'debug_toolbar.middleware.DebugToolbarMiddleware']
Traceback:
File "/Users/neurix/Development/test/lib/python2.7/site-packages/django/core/handlers/base.py" in get_response
111. response = callback(request, *callback_args, **callback_kwargs)
File "/Users/neurix/Development/test/test/apps/profiles/views.py" in dashboard
35. extra_context['username'] = user.username
Exception Type: TypeError at /profile/dashboard/
Exception Value: 'NoneType' object does not support item assignment
views.py
...
31: print "user: %s" %(request.user.pk)
32: user = get_object_or_404(User, pk = request.user.pk)
33:
34:
35: extra_context['username'] = user.username
36: if user.first_name:
37: extra_context['name'] = user.first_name
...
Could it be that request.user is None?
if request.user is not None:
user = get_object_or_404(User, pk = request.user.pk)

Using Text Encoding in C++/CLI

I am using:
http://msdn.microsoft.com/en-us/library/system.net.sockets.tcpclient.aspx#Y2160
to connect and get information from a server. This is my code:
// Connect to the server
TcpClient^ client = gcnew TcpClient( "1.1.1.1", 45257 );
// Get stream
NetworkStream^ stream = client->GetStream();
// Data to send
array<Byte>^data = Text::Encoding::ASCII->GetBytes( message );
// Send data to server
stream->Write( data, 0, data->Length );
However, I am getting these errors:
error C3083: 'Encoding': the symbol to the left of a '::' must be a type
error C2039: 'ASCII' : is not a member of 'System::Windows::Forms::Form::Text'
error C2065: 'ASCII' : undeclared identifier
error C2227: left of '->GetBytes' must point to class/struct/union/generic type
This is inside of a windows form application.
Any help would be appreciated. Thanks
Either specify the name space in a using directive, using namespace System::Text;, or specify the class name with full namespace, System::Text::Encoding.