FYI, I had problems a few weeks ago trying to get the command line elog working, blamed everybody and everything but myself.
In my case it was command line syntax errors and eventually got it going as part of a nightly script
While testing I ran the Elog Server from the command line in verbose mode to see if that helped determine the problem.
On the server end the logbook uploading to is set for Plaintext
# Set entries to TEXT Only format
Default encoding = 1
Allowed encoding = 1
Elog server authenication is standard built in to elogd, no PAM, no LDAP, no Kerberos
Below is what works for me, I’ve replaced my Elog Server Hostname, Elog Username & Password used to connect to the server with generic.
Elog Server version = elog-3.1.4-2
# Log details in Elog Server
/usr/local/bin/elog -h HOSTNAME -p 80 -l Backups -u USERNAME PASSWORD -a Backup=NightlyBackupScript -a Hostname=$HOST -n 1 -x -m /tmp/elog.nightly.script.$TIMESTAMP
I've been caught out in the past having a very old version of the elog command line talking to a recent Elog Server build or Encoding not matching
David Wallis wrote: |
I've been able to work around this by completely turning off authentication, and adding New to the Guest menu list.
One additional question: since I'm uploading historical logbook entries, is it possible to set the entry creation date via the command line? It seems that elogd is overriding the attribute "Date".
David Wallis wrote: |
Hmmm... I added "New" to the Guest menu list, and the button showed up for a guest user. But when I submitted the new ticket, I got the message Error: Command "Submit" is not allowed for user ""
Stefan Ritt wrote: |
"submit not allowed" you typically get if there is a "guest menu" for read-only access and you are not logged in. I never tried the elog program with PAM authentication, but you said that your turned authentication off. What I would do is to strip down your elogd.cfg to a very simple form until the elog utility works, then figure out which configuration makes the trouble.
Stefan
David Wallis wrote: |
Update: I tried switching the logbook to no authentication reqiured, and still get the "command Submit not allowed" response.
David Wallis wrote: |
I'm running Elog version V3.1.4-ba84827 on Red Hat Linux 7.9. As part of migrating from an older in-house logbook to Elog, I need to upload all the old logbook entries. However, when I attempt to do that with the "elog" command line tool, I'm getting the error "command Submit not allowed.
I read through a similar report from 2015 (entry #68149), but none of the potential causes seem to be at play here. The logbook is using PAM authentication, and I can log in to the web interface using the same credentials I'm using from the command line. The other case mentioned a dis-allowed encoding format, but my logbook is configured to allow all formats.
This is the command line I'm using:
/usr/local/elog/bin/elog -v -h logbook.aps.anl.gov -p 8081 -l On_Call -x -n 2 -a Date='10/19/2020 01:02' Author="David Wallis" Title='Test Upload' Status='Open' System='On-Call' -u 'wallis' '*****' "This is a test message"
|
|
|
|
|
|