I can't make to Config_Database work.
I'm enabling new Config Source that way:
Kohana::$config->attach(new Config_Database, FALSE);
I'm loading that source after loading modules - in the bottom of bootstrap.php file.
I get this error when I'm trying to enable this Config Source
Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 261900 bytes) in /var/www/moje/modules/database/classes/kohana/config/database/writer.php on line 124
Line 124 in file (.../)database/writer.php doesnt exists - it has only 111 lines.
What's going wrong?
edit: Kohana 3.2
This sounds like a bug in 3.2 I have got it to work with 3.0 (haven't tried 3.1). Here's the thread in Kohana Forums:
http://forum.kohanaframework.org/discussion/9637/config_database-and-the-out-of-memory-error/p1
It's going because Kohana trying to load database settings from database (and it's going to recursion)
You should initialize your database instance before attaching Config_Database reader
Try this (in bootstrap.php, after Kohana::modules()):
Database::instance();
Kohana::$config->attach(new Config_Database, FALSE);
Or you can simply load database config right before adding the Config_Database
Kohana::$config->load('database');
Kohana::$config->attach(new Config_Database, FALSE);
Related
I have updated my check_mk from 1.6.x to 2.0.x
My custom omd-plugins got messed up and so I started to refactor them for the new 2.0 API with the help of this article.
However, when the time for testing came, I got this:
OMD[my_omd]:~$ cmk --detect-plugins=my_plugin -vI my_host.my_company.de
Error in plugin file /omd/sites/my_omd/local/share/check_mk/checks/my_plugin: "'__name__' not in globals"
I was using sym-links.
For source-control, I have a git-repo. I had put sym-links pointing from the old checks-directory back to the plugin-file in that repo. Starting through the above mentioned guide, I created a new sym-link from the new local/lib/check_mk/base/plugins/agent_based/. Adding the required .py suffix in the process. So now I have 2 sym-links pointing to one piece of code, which I had modified in-place.
Turns out: If you do not delete the plugin from the old location, you will always test the old plugin. With sym-links, you will test the new code in the old environment, giving you that error.
Notice the path in the error-message!
As for the __name__ error itself: It seems to come from doing relative imports import .something. Notice the leading dot. It means "in the same directory as this file". Somehow the old environment was not able to cope with that.
After installing unixODBC and the Netezza drivers on a Linux client and configuring ~/.odbcinst.ini and ~/.odbc.ini data sources according to the documentation, attempting to connect to a Netezza PureData warehouse via some tools may yield an error similar to:
(Error) ('HY000', '[HY000] [unixODBC]Error occurred while loading translation library (45) (SQLDriverConnect)')
For example, this was output by the Python SQLAlchemy library via a DBAPI connection on a RHEL7 box (though has been reported from other distributions and other tools).
Does anyone know the detail of what is happening and how to properly resolve it?
Extra info: I had a similar issue with the exact same error message.
Turns out I had /etc/odbcinst.ini set up with UnicodeTranslationOption=utf8 for the [NetezzaSQL] driver.
Also a wrong (32-bit) driver was used.
Fixed with /etc/odbcinst.ini:
[NetezzaSQL]
Driver = /opt/netezza/lib64/libnzodbc.so
DebugLogging = true
LogPath = /tmp
Trace = 0
TraceAutoStop = 0
TraceFile = /tmp/trace.log
UsageCount = 1
One way to work-around the issue, is to add the following lines to the specific data-source section of your ~/.odbc.ini file:
TranslationDLL=
TranslationName=
TranslationOption=
I don't know what other implications doing that may have (for example on non-English error messages or using unusual character encodings).
Set the UnicodeTranslationOption to be UTF16 instead of UTF8 in your odbc.ini. Make sure that it has that setting in both the odbc.ini recognized by 'odbcinst -j' and also a spare copy in your home directory called just 'odbc.ini'. The latest netezza files seems to read the configuration without being a hidden file '.odbc.ini'
You can also enable Netezza ODBC debug log to figure out detailed error. In odbcinst.ini , set
DebugLogging = true
I'm new to Nutch (2.2.1) and trying to run it on Cygwin/Windows 7 with the latest version of Gora (0.5) so I can persist data to a MongoDB (2.6) datastore. I changed the Nutch-Site.XML File to include my Mongo property but I'm a little confused about the gora-mongodb.mapping.XML properties file here that's needed. Just wondering do I need to:
1) create a Java class within the Nutch/Gora project which I specify in class-name property in the gora-mongodb.mapping File or will Gora create this for me? The documentation doesn't appear to be very clear.
2) I created a sample File in my apache-nutch-2.2.1\runtime\local\conf folder and added the name of my MongoDB collection. When I run Nutch I get the following error:
$ ./nutch crawl urls -dir testCrawl -depth 3 -topN 5
cygpath: can't convert empty path
Exception in thread "main" org.apache.gora.util.GoraException: java.lang.IllegalStateException: A collection is not specified
at org.apache.gora.store.DataStoreFactory.createDataStore(DataStoreFactory.java:167)
at org.apache.gora.store.DataStoreFactory.createDataStore(DataStoreFactory.java:135)
at org.apache.nutch.storage.StorageUtils.createWebStore(StorageUtils.java:75)
at org.apache.nutch.crawl.InjectorJob.run(InjectorJob.java:221)
at org.apache.nutch.crawl.Crawler.runTool(Crawler.java:68)
at org.apache.nutch.crawl.Crawler.run(Crawler.java:136)
at org.apache.nutch.crawl.Crawler.run(Crawler.java:250)
at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:65)
at org.apache.nutch.crawl.Crawler.main(Crawler.java:257)
Caused by: java.lang.IllegalStateException: A collection is not specified
at org.apache.gora.mongodb.store.MongoMappingBuilder.build(MongoMappingBuilder.java:77)
at org.apache.gora.mongodb.store.MongoStore.initialize(MongoStore.java:168)
at org.apache.gora.store.DataStoreFactory.initializeDataStore(DataStoreFactory.java:102)
at org.apache.gora.store.DataStoreFactory.createDataStore(DataStoreFactory.java:161)
... 8 more
Any help or clarification around this file would be appreciated.
You need 2 files in nutch/conf:
gora.properties: where you declare you are going to use mongodb backend.
gora-mongodb-mapping.xml (notice the dash, not the dot you wrote): where you create a mapping between names in Gora entities and the fields in the datastore.
The version you are using I really think it is not prepared to work with Gora 0.5, but give it a shot. Copy gora-mongodb-mapping.xml from Nutch-2.3-SNAPSHOT to nutch/conf/
If it does not work, try using Nutch-2.3-SNAPSHOT instead of 2.2.1.
When I attempt to add a new file to the solution -- even a general C# empty class, I get an error:
The requested value 'DoNotChange' was not found. See screenshot.
This just started happening yesterday. I installed the monotouch-4.0.0.dmg, but have since rolled back to 3.2.6, but the problem remains.
I think there may be a fairly widespread issue, as this new StackOverflow question seems eerily similar.
Anyone have any ideas on how to recover?
Environment:
MonoTouch Professional 3.2.6 (4.0.0)
MonoDevelop 2.4.2 release 20402004
OSX 10.6.7
UPDATE: On a whim I tried to create a new empty .cs file outside of MT, and then add it to the project -- that worked, so at least there is a temporary workaround.
It looks like your formatting policy options are triggering a bug in the code formatter. Try resetting it by removing the file ~/.config/MonoDevelop/DefaultPolicies.xml
When I launch CruiseControl.NET with a particular configuration file I receive the following error:
ThoughtWorks.CruiseControl.Core.Config.ConfigurationException: Duplicate node detected
What does this mean, and what causes it?
I think you have 2 nodes in your config where it only expected one. Is there any chance you could post the config file it is throwing the exception on here as additional information? I'm using cruisecontrol (not the .net version) currently and find it can be very picky about it's XML files (rightly so) but not tell you anything about where in the file the exceptions were thrown from.
I found that I had an incorrectly structured config file. In particular, some blocks were outside of the configuration section. The error pointed to the second of these exec sections- apparently it didn't like that there was more than one of a given section inside the project.
Thus, the error occurred due a config file like this:
<project>
<tasks>
...
</tasks>
<exec>...</exec>
<exec>...</exec>
<project>
In my case I had something like:
<task>...</task>
<sourceControls>...</sourceControls>
<task>...</task>
<publishers>...</publishers>
It didn't like the two "<task>" nodes so I fixed it by removing the first "<task>" node. I was trying to do some stuff before getting the latest from svn, and then doing the build after that in the second "<task>" node. I'll need to revisit how to do that...any suggestions?