I've recently upgraded to a new M1 running Monterey. My existing sqlite db files exist on an external drive and I can access them with Perl via DBI. But when I copy the .db files to my local internal drive, sqlite is not able to open them.
$dbh=DBI->connect('dbi:SQLite:dbname=/Users/trudge/MyDB/kb.db','','') or die $DBI::errstr;
throws this error:
DBI connect('dbname=/Users/trudge/MyDB/kb.db','',...) failed: unable to open database file at /Users/trudge/http/cgi-bin/kb/index.pl line 74.
unable to open database file at /Users/trudge/http/cgi-bin/kb/index.pl line 74.
I've recompiled sqlite3 (SQLite version 3.38.1 2022-03-12 13:37:29) but still no joy.
Not sure if this is a DBI problem, or an sqlite problem, or an Apple problem. Apparently the DBI supports sqlite 3.3 which should not be an issue.
Permission & ACL:
-rwxrw-rw- 1 trudge staff 102400 Mar 10 12:20 ephemera.db
-rw-rw-rw-# 1 trudge staff 458752 Mar 5 17:19 kb.db
-rwxrw-rw- 1 trudge staff 90112 Mar 10 12:20 kba.db
-rwxrw-rw- 1 trudge staff 262144 Mar 10 12:20 library.db
-rwxrw-rw- 1 trudge staff 1630208 Mar 7 20:13 tunes3.db
I would appreciate any advice or suggestions as to why this is an issue and how I might solve it.
Such a simple solution. I checked permissions on my remote site (hosted) for the DB files. The directory was 755. My local system was not. Once I made the changes locally I finally had access to all the sqlite db files.
Apologies for such a newb oversight. Maybe I should retire from this.
Related
I am using Firebird 4.0 release candidate 1 on Linux (attempting to use it either in a C application or with the ODBC driver). When I attempt to open an embedded database (/path/to/db/name.db), I get "Unable to complete network request to host XXX. Failed to establish a connection." I know that this means that the libEngine13.so can't be found so it is defaulting to the localhost. However, libEngine13.so has been built, and is in the default install location for the git repo /path/to/firebird/gen/Release/firebird/lib/plugin so I'm not sure why it isn't being found. I have also tried adding the folder containing it (plugin) to LD_LIBRARY_PATH, copying libEngine13.so to the same directory as libfbclient.so (/path/to/firebird/gen/Release/firebird/lib), adding it to a plugin folder in the directory containing libfbclient.so (etc.) Any ideas?
I should clarify this issue was actually for Firebird 4.0 release candidate 1 (which I was not aware of, but should have been). I used strace to confirm that it was finding libEngine13.so. It was looking for it in /path/to/firebird/install/plugins instead of /path/to/firebird/gen/Release/firebird/plugins. When I copied it there, I then received an "unavailable database. SQLCODE:-904" error. When I switched the database location from /path/to/proj/databases to /path/to/my/dir/on/parallel/file/system/databases it worked.
I am currently using Unity to create my game, and I am implementing the user account system now. The send/receive methods for username/password work perfectly fine in Editor, but when I build on Android, logcat gives me the error in the question title (DllNotFound).
Obviously the DLL is not missing, yes? Otherwise it wouldn't work on standalone desktop/Editor? If this is the case, I am assuming it isn't getting built into the Unity .apk for whatever reason. Does anyone have any reason why? I haven't found any useful resources online, as all the similar questions I have run across are regarding no functionality at all, not split functionality across platforms.
What reasons would Unity recognize a DLL in Editor/standalone, but not on an Android build?
(The .dll in question is located at \Assets\Firebase\Plugins\x86_64, if that helps).
Your fix is probably to run force resolve in the Android resolver.
Which should give you the file you need as part of firebase-app-unity:
My reasoning:
The Unity SDK actually ships with roughly five copies of each native library for iOS, Android, MacOS, Windows, and Linux (plus variants for different architectures &c). The FirebaseCppApp libraries being C++ implementations of some Firebase features. If you look in the folder you listed, you'll see a bunch of library folders for different editor platforms:
╰─$ ls -al | fgrep -v .meta
total 558360
drwxr-xr-x# 14 martinpatrick primarygroup 448 May 8 10:06 .
drwxr-xr-x 25 martinpatrick primarygroup 800 May 8 10:18 ..
-rwxrwxr-x# 1 martinpatrick primarygroup 48236 Dec 4 2016 FirebaseCppAnalytics.bundle
-rwxrwxr-x# 1 martinpatrick primarygroup 355840 Dec 4 2016 FirebaseCppAnalytics.dll
-rwxrwxr-x# 1 martinpatrick primarygroup 226136 Dec 4 2016 FirebaseCppAnalytics.so
-rwxrwxr-x# 1 martinpatrick primarygroup 23186972 Dec 4 2016 FirebaseCppApp-6_14_0.bundle
-rwxrwxr-x# 1 martinpatrick primarygroup 7526400 Dec 4 2016 FirebaseCppApp-6_14_0.dll
-rwxrwxr-x# 1 martinpatrick primarygroup 254502608 Dec 4 2016 FirebaseCppApp-6_14_0.so
bundle is for OSX, dll is for Windows, and so is for Linux.
Clearly this is missing the iOS and Android variants of the SDKs.
The native iOS and Android packages are being pulled in via External Dependency Manager for You (see this post, Play Services Resolver is the old name). When it runs, it looks for a file matching the pattern *Dependencies.xml and starts looking for native libraries to pull in.
Firebase includes a local Android maven repository at Assets/Firebase/m2repository which contains firebase-app-unity-6.14.0.srcaar with the Android C++ implementation. If you're not using gradle to resolve dependencies, it should copy the necessary components into Assets/Plugins/Android on build depending on your settings in the resolver:
Note that if you're using gradle, this package will be added to your mainTemplate.gradle. If there's no mention of it, something may have gone wrong.
--Patrick
Was playing with ipython history commands, experimenting with combining -l and -g to search a limited amount of history, and using -n to see which session a command came from.
Suddenly I got an error (I wish I still had the exact text on my screen) ... something about the history thread encountered and error and stopped, and no more history would be saved. And it said also something about "database locked". After that happened, %history would not recall any history.
So I stopped and restarted ipython, and found that it had history only from the newly restarted session. I stopped and restarted again, and even tried closing and reopening my WSL-Ubuntu window with no luck. It appears that I lost months and months of history.
Then I decided to look for the ipython history file, and found this little gem:
dino#DINO:~$ ls -l $( ipython locate profile default )
total 14132
drwxrwxrwx 1 dino dino 512 Jul 17 2019 db
-rw-r--r-- 1 dino dino 14442496 Mar 24 14:16 history-corrupt-2020-03-24T14.17.27.480963.sqlite
-rw-r--r-- 1 dino dino 28672 Mar 24 14:24 history.sqlite
drwxrwxrwx 1 dino dino 512 Mar 18 2019 log
drwx------ 1 dino dino 512 Mar 18 2019 pid
drwx------ 1 dino dino 512 Mar 18 2019 security
drwxrwxrwx 1 dino dino 512 Mar 18 2019 startup
Wow! Look at that! 14442496 Mar 24 14:16 history-corrupt-2020-03-24T14.17.27.480963.sqlite
Looks like ipython actually saved all that history after all! Now the question is, does anyone have any ideas how I might find and remove the corruption from the sqlite file and restore all or maybe most of my history??
Yay, I fixed it! So here's what I did. With some googling I found this program called "sqlitebrowser" and I found this other page with a section titled "How to Repair SQLite database?" that explained that you can sometimes fix an SQLite database by exporting the database to an SQL file, and then importing the SQL file to create a new version of the database.
So I tried that but, when I imported the SQL file, I got an error saying that it failed due to a UNIQUE constraint on the "sessions" table, and that it was unwinding the transaction.
Unfortunately, when I had done the export to SQL, I chose the option to group the inserts into as few SQL commands as possible, so the unwind undid the entire "sessions" table. I later realized that if I had not grouped the inserts, maybe that import would have fixed the database (simply failing on those transactions that contained duplicate sessions).
However at that time, I was not yet sure what was going on and didn't think to go back and re-export to regenerate the SQL with lots of individual inserts.
Instead, I chose to look through the SQL file for any duplicate inserts on the "sessions" table. Indeed, with some sed and sort commands (sort vs sort -u, followed by diff), I was able to determine that sessions 227 through 236 where somehow in there twice!
So I deleted the duplicates from the SQL file, and then again used sqlitebrowser to import the SQL file and re-create the IPython history.sqlite file. I then ran ipython and found that %history magic was able once again to access all my history.
Please let me know with a comment and/or a up-vote if this answer is helpful to anyone. All the best.
After the fresh install of JFrog Artifactory server I am not able to start up the application. I am using a percona 5.6 mysql db server.
artifactory.service - Setup Systemd script for Artifactory in Tomcat Servlet Engine
Loaded: loaded (/usr/lib/systemd/system/artifactory.service; enabled; vendor preset: disabled)
Active: activating (auto-restart) (Result: resources) since Mon 2018-01-22 04:22:34 EST; 2s ago
Process: 8618 ExecStart=/opt/jfrog/artifactory/bin/artifactoryManage.sh start (code=exited, status=0/SUCCESS)
Jan 22 04:22:34 xxx-xxxx-xxxx systemd[1]: Failed to start Setup Systemd script for Artifactory in Tomcat Servlet Engine.
Jan 22 04:22:34 xxx-xxxx-xxxx systemd[1]: Unit artifactory.service entered failed state.
Jan 22 04:22:34 xxx-xxxx-xxxx systemd[1]: artifactory.service failed.
When I checked artifactory.bootstrap.log I am getting following error.
2018-01-22 04:07:43 [ARTIFACTORY] [INFO ] master.key file currently missing - waiting for Access to create it. Reattempting to check master.key file existence in 1 second.
If you need any more logs to diagnose please let me know.
Regards,
I had the same problem. Running under Ubuntu 16.04 and the deb installation package for 5.10.1.
It looks like the $ARTIFACTORY_HOME points to /var/opt/jfrog/artifactory, with the binaries in /opt/jfrog/artifactory. Changing $ARTIFACTORY_HOME to point to /opt/jfrog/artifactory allows it to start, but puts all the data there as well (access, backup, data, logs and support directories). This is fine for me as we only have a demo licence and we're just doing some testing, but less than ideal if you want to keep your data under /var.
I did try leaving $ARTIFACTORY_HOME alone and creating links to the other directories but that didn't seem to work. I haven't bothered investigating that though, since I now have a test system that looks like it works.
I had this error recently with version 6.7.3 using java 8 on Solaris 11.
First I unzipped the file, checked all my file permissions, they were good.
Then, I set my ARTIFACTORY_HOME and JAVA_HOME in the artifactory.default file
Next, I ran the following
openssl rand -hex 16 > /m1/artifactory-oss-6.7.3/etc/security/master.key
and started Artifactory.
I found the openssl command to manually create the master.key here:
https://www.jfrog.com/jira/browse/RTFACT-15699
Check this link:
https://www.jfrog.com/confluence/display/RTF4X/Master+Key+Encryption
go to Security >> Security Configuration >> Encript button
that will create the artifactory.key file, duplicate it and rename the copy to master.key
Edit 1
found out in version 5 you need the JAVA_HOME set, in version 4 doesn't matter,
i got similar issue and fixed it by correcting owner / group permissions on /var/opt/jfrog/artifactory/access/etc path.
i was creating the below directories using ansible playbook before running artifactory docker image.
/var/opt/jfrog/artifactory/access/etc
/var/opt/jfrog/artifactory/backup
/var/opt/jfrog/artifactory/data
/var/opt/jfrog/artifactory/etc
/var/opt/jfrog/artifactory/logs
You will get these kind of messages in the log if the DB-connection fails also.
There was error messages about the DB-connection earlier but they where hidden by secondary failures.
The master.key is created after the DB is initialized.
I have an open source asp.net site that is meant to run under apache/mono. I have a new version I am all ready to release but it has a problem running under linux. Everything works great on windows.
The first time I load the page I get:
System.InvalidOperationException Failed to map path '/App_WebReferences/MythContent/ContentServices.wsdl'
The file is there:
-rw-r--r-- 1 www-data www-data 37K Nov 20 2013 mobilemyth/App_WebReferences/MythContent/ContentServices.wsdl
Refresh the page again and you get:
System.IO.IOException
Sharing violation on path /tmp/www-data-temp-aspnet-0/9e3969b/Resources.frontendsettings.aspx.resources
And that is all you get from them on. Any ideas?
In Mono, the best solution for this issue is using the wsdl2 command line and generate the class an put it in the App_Cod. So you can use the WebService client in your app.
Sample:
$ wsdl2 http://< your url of wsdl >?WSDL