I have a requirement of uploading image in Marklogic 6. My App ID deployed both in DEV and QA env, where image uploading is working fine in DEV but not in QA. In QA when trying to upload file, it's taking long time(5-10 mins),which usually takes few milli seconds and sometimes uploading gets failed and gives following exception:
ERROR] 17 Mar 2014 14:36:53,564 MarkLogicPersitenceManager - Broken pipe
com.marklogic.xcc.exceptions.ServerConnectionException: Broken pipe
[Session: user=user-name, cb=datastore [ContentSource: user=user-name, cb=datastore [provider: address=/172.11.11.11:1111, pool=1/64]]]
at com.marklogic.xcc.impl.handlers.AbstractRequestController.runRequest(AbstractRequestController.java:110)
at com.marklogic.xcc.impl.SessionImpl.insertContent(SessionImpl.java:194)
at com.marklogic.xcc.impl.SessionImpl.insertContent(SessionImpl.java:222)
at com.mhhhe.ecom.catalog.admin.persistence.ml.MarkLogicPersitenceManager.save(MarkLogicPersitenceManager.java:251)
at com.mhhhe.ecom.catalog.admin.AdminResources.catalogSaveWithUriNew(
I have used following Java code to upload the file.
ContentCreateOptions contentOptions = new ContentCreateOptions();
contentOptions.setFormatBinary();
Content content = ContentFactory.newContent(uri, stream,contentOptions);
session.insertContent(content);
Even though both Dev and QA have almost same configuration, it is not working in QA. So this looks like a problem of Marklogic DB.
Could you please tell me what kind of configuration problem could be responsible for this?
Related
I'm attempting to put a POC together that leverages the SQL Server 2019 Extensibility Framework & External Languages feature. This enables execution of external languages in SQL Server Stored procedures. I've written a JAR file that encrypts and decrypts data being passed via a SQL Server stored procedure. I've confirmed that the each method is correct, and returns the correct values when not being sent as a stored procedure. However, when executing the stored procedure I receive an empty data set and see the following error in debug mode:
java.io.FileNotFoundException: <jks-file-location> (Access is denied)
The line of Java code throwing the error is below:
Key _key = readKeyFromStore_cbs("<jks-file-location>, "<password>".toCharArray(), "entityEncryption", "<password>".toCharArray());
_keySpec = new SecretKeySpec(_key.getEncoded(), _key.getAlgorithm());
Again, the code is fine, I don't think there are issues there, and don't think posting the content of those methods is the issue (the SP itself runs fine with dummy data in the place of data being encrypted and decrypted, and the code with encryption and decryption runs as expected when run on its own).
Additional Info:
I'm running this on a local Windows 10 environment and have given "Everyone" full security permissions on the jks.
I've double checked the user running sql server and ensured that user has full permissions on the file as well. (This user also has admin privileges on SQL Server)
I've checked SQL Server sp_configure options as well.
Filestream is enabled and set to full control in sp_configure
I've even disabled clr strict security on sp_configure to see if that was the cause. I still receive the same error.
I've attempted tests with JKS in my User directory (with permissions on the directory and file for the SQL Server user), in the C drive, and in the child directory of the C drive (again, with permissions on the directory and file for the SQL Server user)
The stored procedure runs, but is returning an empty data set. When attempting run without encryption (using the key from the currently inaccessible keystore) and using dummy data, I receive the expected data set.
Anyone know what might be causing this error?
UPDATE:
Moving the JAR and jks into SQL Server directories and starting the Launchpad service resolved the issue. Hope this helps someone avoid similar frustrations.
One application to get details from an external system was developed and deployed in the IIB 10.0.0.10 version. Later, the application was moved to a new server in which IIB 10.0.0.14 was installed. The issue is that the application gives proper response after deployment or an EG restart, but giving parsing error after that. A java compute node is used for connecting to the external system and the parsing error occurs at the below line:
String response = getStringValue(detailsObject.getLastChild().getFirstElementByPath("./element1/element2/element3"));
The same service is working fine in the old server(IIB 10.0.0.10). Also, the first hit of the service after the deployment will give a proper response to the new server.
I am trying to create a simple https service which allows an end user to upload a file to my system. I am using the HttpRequester plugin in firefox to test this service.
My code seems to work (file data reaches the server) when the files I am uploading are less than 1MB in size but does not work (request.getParameter(file) returns null) when the file size is larger than 1 MB.
After some googling around I changed some parameters in server.xml
<Connector port="21003" maxPostSize="0" maxHttpHeaderSize="0"/>
But still no luck.
Any idea of what I could try next? Any help would be much appreciated
I made a cluster with NameNode, Secondary NameNode, and 3 DataNodes. I installed HDP via Ambari + HUE and now I am configuring XA secure policies for HDFS, Hive and Hbase. It works fine for every component, except Hive. Problem is that when I change hive.security.authorization to true (in Ambari -> hive configs) the Hiveserver2 fails at start with a problem:
File "/usr/lib/python2.6/site-packages/resource_management/core/providers/system.py", line 115, in action_create
fp.write(content)
UnicodeEncodeError: 'ascii' codec can't encode character u'\u2013' in position 990: ordinal not in range(128)
I tried to edit that python file but when I do any changes it gets even worse. It probably tries to encode Unicode character using wrong codec and save it to the file, but I am bad programmer and I dont know how to edit it correctly. I cant figure out what is that file, where is it and what it contains.
When I set security authorization to false, the server starts but crashes in ~3 minutes with an error:
12:02:43,523 ERROR [pool-1-thread-648] JMXPropertyProvider:540 - Caught exception getting JMX metrics : Server returned HTTP response code: 500 for URL: http://localhost.localdomain:8745/api/cluster/summary
12:02:50,604 INFO [qtp677995254-4417] HeartBeatHandler:428 - State of service component HIVE_SERVER of service HIVE of cluster testING has changed from STARTED to INSTALLED at host localhost.localdomain
12:02:53,624 ERROR [pool-1-thread-668] JMXPropertyProvider:540 - Caught exception getting JMX metrics : Read timed out
Any suggestions? Thank you in advance.
#EDIT
Here is line of code in python which causes problem:
fp.write(content)
I was trying to add .decode("utf-8") at the end but:
'NoneType' object has no attribute 'decode' occurs
For the first problem, try adding
# -*- coding: UTF-8 -*-
At the first line of your file
I've created a neo4j database embedded into my java application. Creating nodes, relationships, properties and querying all of them looks fine, but now I want to visualize the database just to check if everything is okay. So I tried to load the test.db inside my neo4j-Server edition (running on the same machine), but however I get all the time the following error:
Starting Neo4j Server failed: Error starting org.neo4j.kernel.EmbeddedGraphDatabase, C:\Users\user\workspace\neo4j_emb_test\target\test.db
Don't know what's going wrong here. Does anybody has suggestions?
Thanks in advance !
Julian
edit:
Checking the logs returned following results:
2014-05-26 14:56:30.988+0000 ERROR [o.n.k.EmbeddedGraphDatabase]: Startup failed: Component 'org.neo4j.kernel.impl.transaction.XaDataSourceManager#7f180826' was successfully initialized, but failed to start. Please see attached cause exception.: Component 'org.neo4j.kernel.impl.nioneo.xa.NeoStoreXaDataSource#71fc9ad0' was successfully initialized, but failed to start. Please see attached cause exception.: 'neostore' has a store version number that we cannot upgrade from. Expected 'NeoStore v0.A.0' but file is version 'NeoStore v0.A.3'.
2014-05-26 14:56:30.988+0000 INFO [o.n.k.EmbeddedGraphDatabase]: Shutdown started
You cannot run two embedded instances against the same Neo4j database at the same time, you need to run Neo4j in stand-alone mode for that. Then you only have access to the REST API provided, and not the Java API.
I had the exact same experience a little while ago that was answered here: Disable locking of Neo4j graph database?