Where to locate http logs subdirectory for Virtuoso? - virtuoso

I'm writing a java client that uploads a file to Virtuoso WebDAV repository through HTTP PUT.
There is a bug in my code I'm trying to fix. I want to check the log file for the WebDAV server as the bug is relating to HTTP connection reset.
I found the description of the WebDAV server configuration in the Virtuoso configuration file virtuoso.ini.
[HTTPServer]
ServerPort = 8890
ServerRoot = ../vsp
DavRoot = DAV
EnabledDavVSP = 0
HTTPProxyEnabled = 0
TempASPXDir = 0
DefaultMailServer = localhost:25
MaxClientConnections = 5
MaxKeepAlives = 10
KeepAliveTimeout = 10
MaxCachedProxyConnections = 10
ProxyConnectionCacheTimeout = 15
HTTPThreadSize = 280000
HttpPrintWarningsInOutput = 0
Charset = UTF-8
;HTTPLogFile = logs/http.log
The last line tells the http log file should be http.log in the logs folder.
However, I searched all the places in the virtuoso installation directory, and no subdirectory called logs found in the directory.
I also tried the Virtuoso online documentation, but it doesn't help.
I'm a new user of Virtuoso, and really do not have much knowledge of it. Hope someone can help with this.

Doesn't the fact that the last line starts with a semicolon mean that it is commented out? I suggest removing that and restarting Virtuoso.

You just need to change to
HTTPLogFile = http.log
and it will create a file http.log in the same directory from where the virtuoso instance was started or where virtuoso.ini is located

Related

MariaDB error and slow query log became empty

So I enabled error log and slow query log on MariaDB and I could see the data in log files. But after a couple of hours when I checked back again then they were empty. It is showing both log files size as 0 and now it is not creating new logs.
Machine has not been restarted during this time. Why all of sudden both error and slow query logs are now empty?
OS is Debian.
The error log rarely has anything.
The slowlog needs several settings to really get it "ON":
log_output = FILE
slow_query_log = ON
slow_query_log_file = (fullpath to some file)
long_query_time = 1
log_slow_admin_statements = ON -- (optional)
log_queries_not_using_indexes = OFF -- (optional)
Explanation and more discussion, plus recommendation on digesting the results: http://mysql.rjweb.org/doc.php/mysql_analysis#slow_queries_and_slowlog

PSFTP open for write: failure

I am uploading a file from a collection of different servers to one data server. I am using psftp and one out of 20+ servers is producing a permissions problem.
Remote working directory is /
psftp> cd Remote_Directory\
Remote directory is now /Remote_Directory/
psftp> put C:\folders\containing\file\FILE.zip
/Remote_Directory/: open for write: failure
psftp> quit
It appears like a permissions issue on the remote directory, however, why am I only getting the issue on one server? The batch is identical on all of the 20+ servers.
PUT command expects a file name at the end of the destination location.
Please try the following code
put C:\folders\containing\file\FILE.zip /Remote_Directory/FILE.zip
The path in the error message is an exact path to the remote file the psftp tried to create. See outfname in below code snippet:
req = fxp_open_send(outfname,
SSH_FXF_WRITE | SSH_FXF_CREAT | SSH_FXF_TRUNC,
&attrs);
...
printf("%s: open for write: %s\n", outfname, fxp_error());
As the path is obviously not correct (lacks file name), it seems that psftp got confused somehow. I believe it's likely due to wrong (back)slash you have used in the cd command.
Try cd Remote_Directory/.
In my case, it's a permission issue on the remote server, i.e. the account you are using to log on doesn't have the write permission for the remote folder.

Drush make - errors unzipping and distinguishing mime times

I've installed Drush 5.8 on Windows 2008 R2 Enterprise, with all the options included except Remote Management.
Whenever I run drush make I get errors about it not being able to unzip a github archive file, and unable to determine mime type for a js file. Here is my make file and the output. I'm not sure what is wrong here, and would love any pointers you may have.
Make file:
; Drupal 7 core
core = 7.x
api = 2
projects[drupal][version] = 7
; Libraries
; --------
libraries[colorbox][download][type] = "get"
libraries[colorbox][download][url] = "https://github.com/jackmoore/colorbox/archive/1.4.8.zip"
libraries[colorbox][directory_name] = colorbox
libraries[colorbox][destination] = libraries
libraries[zepto][download][type] = "get"
libraries[zepto][download][url] = "http://zeptojs.com/zepto.min.js"
libraries[zepto][directory_name] = zepto
libraries[zepto][destination] = libraries
Output:
C:\Users\Administrator\Desktop\drush>drush make test.make testing
Could not locate drupal version 7, will try to download latest recommended or supported release. [warning]
drupal-7.21 downloaded. [ok]
colorbox downloaded from https://github.com/jackmoore/colorbox/archive/1.4.8.zip. [ok]
Unable to unzip C:\Users\ADMINI~1\AppData\Local\Temp\1/make_tmp_1364915473_515af511066a2/1.4.8.zip. [error]
zepto downloaded from http://zeptojs.com/zepto.min.js. [ok]
Unable to determine mime type for zepto.min.js. [error]
Finally got it figured out after a lot of struggle.
Using Cygwin I was able to get a copy of unzip, which I put in the Program Files (x86)\Drush\GnuWin32\bin directory (which is in my PATH environment variable). This cleared up the errors listed about unzip.
As for the mime-type issue, I had to manually edit includes/drush.inc to add '.js' => 'application/javascript' to the $extension_mimetype array. See http://drupal.org/node/1825946 for the discussion that led me to this.

CWRsync failing due to spaces in directory names

I'm having trouble rsyncing folders with spaces between the names between two servers.
I have researched this error online but many of the solutions deal with just one folder with spaces, my problem is that I have two subfolders with spaces in their names and none of the solutions work
E.g. on the server I have the directory:
c:/test folder/test er/test.txt
When I run the rsync.cmd on the client the following error appears in the rsyncd.log file on the server
2011/08/09 09:16:01 [440] connect from server(xxx.xx.xx.xx)
2011/08/09 09:16:01 [440] rsync: chdir /cygdrive/c/'test folder'/'test er' failed
: No such file or directory (2)
In the rsyncd.conf folder on the server I have the following:
[TESTER]
path = /cygdrive/c/"test folder"/"test er"
read only = true
transfer logging = yes
This isn't working, however the following does work:
Folder: c:/test folder/test.txt
with rsyncd.conf code:
[TESTER]
path = /cygdrive/c/"test folder"
read only = true
transfer logging = yes
i.e it works for only one directory with spaces but not two.
I know it's a syntax issue but I can figure out the syntax and I tried a lot of varioeties based on research online include backslashes() and x20 for the spaces
I'm using cwrsync and the server machine is:
MicroSoft windows server 2003 R2
Thank you.
Found the answer, the only thing I didn't try was to not have any quotations or backslashes at all on the names.
i.e.
[TESTER]
path = /cygdrive/c/"test folder"/"test er"
read only = true
transfer logging = yes
The above worked

Hosting Mercurial on IIS7

Note, this might perhaps be best suited on serverfault.com, but since it is about hosting a programmer source code repository, I am not entirely sure. I'm posting here first, trusting that it'll be migrated if necessary.
I'm attempting to host clones of my Mercurial repositories on my own server (I have the main repo somewhere else), and I'm attempting to set up Mercurial under IIS.
I followed the guide here, but I get an error message.
Solved: See bottom of this question for details.
The error message is:
mercurial.error.RepoError: repository /path/to/repo/or/config not found
Here's what I did.
I installed Mercurial 1.5.2
I created c:\inetpub\hg
I downloaded the hg source as per the instructions of the webpage, and copied the hgweb.cgi file into c:\inetpub\hg (note, the webpage says hgwebdir.cgi, but this particular file does not exist, hgweb.cgi does, however, can this be the source of the problem?)
I added a hgweb.config, with the following contents:
[paths]
repo1 = C:/hg/**
[web]
style = monoblue
I created c:\hg, created a sub-directory test, and created a repository inside it
I installed python 2.6.5, latest 2.6 version from the website (the webpage mentions I need to install the correct version or I'll get a specific error message, since I don't get an error message that looks remotely like the one mentioned, I assume that 2.6.5 is not the problem)
I added a new virtual host hg.vkarlsen.no, pointing it to c:\inetpub\hg
For this host, I added a script mapping under the Handler Mappings section, mapping *.cgi to c:\python26\python.exe -u %s %s as per the instructions on the website.
I then tested it by navigating to http://hg.vkarlsen.no/hgweb.cgi, but I get an error message.
To make it easier to test, I dropped to a command prompt, navigated to c:\inetpub\hg, and executed the following command (error message is part of the text below):
C:\inetpub\hg>c:\python26\python.exe -u hgweb.cgi
Traceback (most recent call last):
File "hgweb.cgi", line 16, in <module>
application = hgweb(config)
File "mercurial\hgweb\__init__.pyc", line 12, in hgweb
File "mercurial\hgweb\hgweb_mod.pyc", line 30, in __init__
File "mercurial\hg.pyc", line 82, in repository
File "mercurial\localrepo.pyc", line 2221, in instance
File "mercurial\localrepo.pyc", line 62, in __init__
mercurial.error.RepoError: repository /path/to/repo/or/config not found
Does anyone know what I need to look at in order to fix this?
Edit: Ok, I think I managed to get one step closer to the solution, but I'm still stumped.
I realized the .cgi file is a python script file, and not something compile, so I opened it for editing, and these lines was sitting in it:
# Path to repo or hgweb config to serve (see 'hg help hgweb')
config = "/path/to/repo/or/config"
So this was my source for the specific error message.
If I change the line to this:
config = "c:\\hg\\test"
Then I can navigate the empty repository through the Mercurial web interface.
However, I want to host multiple repositories, and seeing as the line says that I can also link to a hgweb config file, I tried this:
config = "c:\\inetpub\\hg\\hgweb.config"
But then I get the following error message:
mercurial.error.Abort: c:\inetpub\hg\hgweb.config: not a Mercurial bundle file
Exception ImportError: 'No module named shutil' in <bound method bundlerepository.__del__
of <mercurial.bundlerepo.bundlerepository object at 0x0260A110>> ignored
Nothing I've tried for the config variable seems to work:
config = "hgweb.config"
config = "c:\\hg\\hgweb.config"
various other variations I don't remember.
So, still stumped, pointers anyone?
Hopefully this question will give others some information if they're stumped as I was.
I ended up having to edit the hgweb.cgi file:
from: from mercurial.hgweb import hgweb, wsgicgi
application = hgweb(config)
to: from mercurial.hgweb import hgweb, hgwebdir, wsgicgi
application = hgwebdir(config)
Note the added hgwebdir parts there. Here's my hgweb.config file, located in the same directory as hgweb.cgi file:
[collections]
C:/hg/ = C:/hg/
[web]
style = gitweb
This now serves my repositories successfully.

Resources