Demo Discussion
Forum Config Examples Contributions Vulnerabilities
  Discussion forum about ELOG, Page 720 of 796  Not logged in ELOG logo
ID Date Iconup Author Author Email Category OS ELOG Version Subject
  69430   Tue Dec 7 11:56:37 2021 Reply Andreas Luedekeandreas.luedeke@psi.chQuestionLinux3.1.4Re: Unclear how to use the command line tool /usr/bin/elog

If you need HTTPS then you must specify the "-s" option.

You could have looked into the help of the elog command:

> elog -h
elogd 3.1.4 built Jun 14 2021, 18:01:54 revision 611489b
usage: elog
elog -h <hostname> [-p port] [-d subdir]
                              Location where elogd is running
     -l logbook/experiment    Name of logbook or experiment
     -s                       Use SSL for communication
     [-v]                     For verbose output
     [-u username password]   User name and password
     [-f <attachment>]        (up to 50 attachments)
     -a <attribute>=<value>   (up to 50 attributes)
     [-r <id>]                Reply to existing message
     [-q]                     Quote original text on reply
     [-e <id>]                Edit existing message
     [-w <id>|last]           Download existing message (last message)
     [-x]                     Suppress email notification
     [-n 0|1|2]               Encoding: 0:ELcode,1:plain,2:HTML
     -m <textfile>] | <text>
Arguments with blanks must be enclosed in quotes
The elog message can either be submitted on the command line, piped in like
"cat text | elog -h ... -l ... -a ..." or in a file with the -m flag.
Multiple attributes and attachments can be supplied

 
Jose Caballero wrote:

Hi Stefan,

Here is the, I believe, relevant part of the output:

-------------------------------------------------

Response received:
HTTP/1.1 404 Not Found
Date: Tue, 07 Dec 2021 07:26:07 GMT
Server: Apache/2.4.6 (Scientific Linux) OpenSSL/1.0.2k-fips PHP/5.4.16
Content-Length: 204
Connection: close
Content-Type: text/html; charset=iso-8859-1

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>404 Not Found</title>
</head><body>
<h1>Not Found</h1>
<p>The requested URL /LogBook/ was not found on this server.</p>
</body></html>

-------------------------------------------------

Note that the URL https://elog-1.matrix.com/LogBook/ exists and works. That's how we create all our log entries via web browser. 

 

Thanks,

Jose

 

Stefan Ritt wrote:

Please issue the elog command with an added "-v" flag and post the output here.

Stefan

Jose Caballero wrote:

Hello,

 

I am trying first time to use the tool /usr/bin/elog. From the documentation is not clear to if everything must be in quotes or not, if every attribute requires -a.

Here is how my attempt looks like (changing actual data by fake one):

      /usr/bin/elog -h elog-1.matrix.com -l LogBook -u jcaballero mypassword -a Team='Team Name Here' Category='Category Here' -a 'Affected service'='Name of affected service here' -a Criticality=Normal -a 'Oncall Documentation'='No modifications required' -a Subject='here is the subject line' 'here is the text'

I just get "Error transmitting message". 

Attributes Team and Category are of checkbox type. Attributes Criticality and Oncall Documentation are of radio type.

What is wrong with my command attempt?

 

Thanks a lot in advance.

Cheers,

Jose

 

 

 

 

 

 

  69431   Tue Dec 7 14:25:37 2021 Reply Jose Caballerojcaballero.hep@gmail.comQuestionLinux3.1.4Re: Unclear how to use the command line tool /usr/bin/elog

This is what I get with -s:

---------------------------------

Successfully connected to host elog-1.matrix.com, port 80
elogd server does not run SSL protocol

---------------------------------

And the entry has not been created. 

 

Andreas Luedeke wrote:

If you need HTTPS then you must specify the "-s" option.

You could have looked into the help of the elog command:

> elog -h
elogd 3.1.4 built Jun 14 2021, 18:01:54 revision 611489b
usage: elog
elog -h <hostname> [-p port] [-d subdir]
                              Location where elogd is running
     -l logbook/experiment    Name of logbook or experiment
     -s                       Use SSL for communication
     [-v]                     For verbose output
     [-u username password]   User name and password
     [-f <attachment>]        (up to 50 attachments)
     -a <attribute>=<value>   (up to 50 attributes)
     [-r <id>]                Reply to existing message
     [-q]                     Quote original text on reply
     [-e <id>]                Edit existing message
     [-w <id>|last]           Download existing message (last message)
     [-x]                     Suppress email notification
     [-n 0|1|2]               Encoding: 0:ELcode,1:plain,2:HTML
     -m <textfile>] | <text>
Arguments with blanks must be enclosed in quotes
The elog message can either be submitted on the command line, piped in like
"cat text | elog -h ... -l ... -a ..." or in a file with the -m flag.
Multiple attributes and attachments can be supplied

 
Jose Caballero wrote:

Hi Stefan,

Here is the, I believe, relevant part of the output:

-------------------------------------------------

Response received:
HTTP/1.1 404 Not Found
Date: Tue, 07 Dec 2021 07:26:07 GMT
Server: Apache/2.4.6 (Scientific Linux) OpenSSL/1.0.2k-fips PHP/5.4.16
Content-Length: 204
Connection: close
Content-Type: text/html; charset=iso-8859-1

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>404 Not Found</title>
</head><body>
<h1>Not Found</h1>
<p>The requested URL /LogBook/ was not found on this server.</p>
</body></html>

-------------------------------------------------

Note that the URL https://elog-1.matrix.com/LogBook/ exists and works. That's how we create all our log entries via web browser. 

 

Thanks,

Jose

 

Stefan Ritt wrote:

Please issue the elog command with an added "-v" flag and post the output here.

Stefan

Jose Caballero wrote:

Hello,

 

I am trying first time to use the tool /usr/bin/elog. From the documentation is not clear to if everything must be in quotes or not, if every attribute requires -a.

Here is how my attempt looks like (changing actual data by fake one):

      /usr/bin/elog -h elog-1.matrix.com -l LogBook -u jcaballero mypassword -a Team='Team Name Here' Category='Category Here' -a 'Affected service'='Name of affected service here' -a Criticality=Normal -a 'Oncall Documentation'='No modifications required' -a Subject='here is the subject line' 'here is the text'

I just get "Error transmitting message". 

Attributes Team and Category are of checkbox type. Attributes Criticality and Oncall Documentation are of radio type.

What is wrong with my command attempt?

 

Thanks a lot in advance.

Cheers,

Jose

 

 

 

 

 

 

 

  69432   Tue Dec 7 14:46:16 2021 Reply Stefan Rittstefan.ritt@psi.chQuestionLinux3.1.4Re: Unclear how to use the command line tool /usr/bin/elog

If you use HTTPS, you have to connect to port 443 of your server, using the "-p" option.

Furthermore, you run under an Apache server, right? How do you do the redirecting to elogd? I guess you specified a subdir in the URL named /LogBook to redirect to elogd. The you use another part of the URL to select the logbook, which again might be "LogBook". Is that correct? So your full URL in the browser would be https://elog-1.matrix.com/LogBook/LogBook. If that's the case, you have to tell the elog tool that you use a subdir in the URL using the "-d" option.

Stefan

Jose Caballero wrote:

This is what I get with -s:

---------------------------------

Successfully connected to host elog-1.matrix.com, port 80
elogd server does not run SSL protocol

---------------------------------

And the entry has not been created. 

 

Andreas Luedeke wrote:

If you need HTTPS then you must specify the "-s" option.

You could have looked into the help of the elog command:

> elog -h
elogd 3.1.4 built Jun 14 2021, 18:01:54 revision 611489b
usage: elog
elog -h <hostname> [-p port] [-d subdir]
                              Location where elogd is running
     -l logbook/experiment    Name of logbook or experiment
     -s                       Use SSL for communication
     [-v]                     For verbose output
     [-u username password]   User name and password
     [-f <attachment>]        (up to 50 attachments)
     -a <attribute>=<value>   (up to 50 attributes)
     [-r <id>]                Reply to existing message
     [-q]                     Quote original text on reply
     [-e <id>]                Edit existing message
     [-w <id>|last]           Download existing message (last message)
     [-x]                     Suppress email notification
     [-n 0|1|2]               Encoding: 0:ELcode,1:plain,2:HTML
     -m <textfile>] | <text>
Arguments with blanks must be enclosed in quotes
The elog message can either be submitted on the command line, piped in like
"cat text | elog -h ... -l ... -a ..." or in a file with the -m flag.
Multiple attributes and attachments can be supplied

 
Jose Caballero wrote:

Hi Stefan,

Here is the, I believe, relevant part of the output:

-------------------------------------------------

Response received:
HTTP/1.1 404 Not Found
Date: Tue, 07 Dec 2021 07:26:07 GMT
Server: Apache/2.4.6 (Scientific Linux) OpenSSL/1.0.2k-fips PHP/5.4.16
Content-Length: 204
Connection: close
Content-Type: text/html; charset=iso-8859-1

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>404 Not Found</title>
</head><body>
<h1>Not Found</h1>
<p>The requested URL /LogBook/ was not found on this server.</p>
</body></html>

-------------------------------------------------

Note that the URL https://elog-1.matrix.com/LogBook/ exists and works. That's how we create all our log entries via web browser. 

 

Thanks,

Jose

 

Stefan Ritt wrote:

Please issue the elog command with an added "-v" flag and post the output here.

Stefan

Jose Caballero wrote:

Hello,

 

I am trying first time to use the tool /usr/bin/elog. From the documentation is not clear to if everything must be in quotes or not, if every attribute requires -a.

Here is how my attempt looks like (changing actual data by fake one):

      /usr/bin/elog -h elog-1.matrix.com -l LogBook -u jcaballero mypassword -a Team='Team Name Here' Category='Category Here' -a 'Affected service'='Name of affected service here' -a Criticality=Normal -a 'Oncall Documentation'='No modifications required' -a Subject='here is the subject line' 'here is the text'

I just get "Error transmitting message". 

Attributes Team and Category are of checkbox type. Attributes Criticality and Oncall Documentation are of radio type.

What is wrong with my command attempt?

 

Thanks a lot in advance.

Cheers,

Jose

 

 

 

 

 

 

 

 

  69433   Tue Dec 7 15:09:36 2021 Reply Jose Caballerojcaballero.hep@gmail.comQuestionLinux3.1.4Re: Unclear how to use the command line tool /usr/bin/elog

Not really. The full URL in the browser is https://elog-1.matrix.com/LogBook. That's why I am trying with "-h elog-1.matrix.com -l LogBook"

I have just tried with -p, here is the full output:

[root@elog-1 ~]# /usr/bin/elog -h elog-1.matrix.com -p 443 -v -x -l LogBook -u jcaballero xxxx -a Team='Team Name' -a Category='Category Name' -a 'Affected service'='Affected Service' -a Criticality=Normal -a 'Oncall Documentation'='No modifications required' -a Subject='This is a test, ignore me' 'This is a test, ignore me'
Successfully connected to host elog-1.matrix.com, port 443
Request sent to host:
POST /Tier1/ HTTP/1.0
Content-Type: multipart/form-data; boundary=---------------------------462A01443E24BC6541C5BB72
Host: elog1.matrix.com:443
User-Agent: ELOG
Content-Length: 1610


Content sent to host:
---------------------------462A01443E24BC6541C5BB72
Content-Disposition: form-data; name="cmd"

Submit
---------------------------462A01443E24BC6541C5BB72
Content-Disposition: form-data; name="unm"

jcaballero
---------------------------462A01443E24BC6541C5BB72
Content-Disposition: form-data; name="upwd"

xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
---------------------------462A01443E24BC6541C5BB72
Content-Disposition: form-data; name="exp"

LogBook
---------------------------462A01443E24BC6541C5BB72
Content-Disposition: form-data; name="suppress"

1
---------------------------462A01443E24BC6541C5BB72
Content-Disposition: form-data; name="encoding"

ELCode
---------------------------462A01443E24BC6541C5BB72
Content-Disposition: form-data; name="Team"

Team Name
---------------------------462A01443E24BC6541C5BB72
Content-Disposition: form-data; name="Category"

Category Name
---------------------------462A01443E24BC6541C5BB72
Content-Disposition: form-data; name="Affected_service"

Affected Service
---------------------------462A01443E24BC6541C5BB72
Content-Disposition: form-data; name="Criticality"

Normal
---------------------------462A01443E24BC6541C5BB72
Content-Disposition: form-data; name="Oncall_Documentation"

No modifications required
---------------------------462A01443E24BC6541C5BB72
Content-Disposition: form-data; name="Subject"

This is a test, ignore me
---------------------------462A01443E24BC6541C5BB72
Content-Disposition: form-data; name="Text"

This is a test, ignore me
---------------------------462A01443E24BC6541C5BB72

Response received:

Error transmitting message

 

 

Stefan Ritt wrote:

If you use HTTPS, you have to connect to port 443 of your server, using the "-p" option.

Furthermore, you run under an Apache server, right? How do you do the redirecting to elogd? I guess you specified a subdir in the URL named /LogBook to redirect to elogd. The you use another part of the URL to select the logbook, which again might be "LogBook". Is that correct? So your full URL in the browser would be https://elog-1.matrix.com/LogBook/LogBook. If that's the case, you have to tell the elog tool that you use a subdir in the URL using the "-d" option.

Stefan

Jose Caballero wrote:

This is what I get with -s:

---------------------------------

Successfully connected to host elog-1.matrix.com, port 80
elogd server does not run SSL protocol

---------------------------------

And the entry has not been created. 

 

Andreas Luedeke wrote:

If you need HTTPS then you must specify the "-s" option.

You could have looked into the help of the elog command:

> elog -h
elogd 3.1.4 built Jun 14 2021, 18:01:54 revision 611489b
usage: elog
elog -h <hostname> [-p port] [-d subdir]
                              Location where elogd is running
     -l logbook/experiment    Name of logbook or experiment
     -s                       Use SSL for communication
     [-v]                     For verbose output
     [-u username password]   User name and password
     [-f <attachment>]        (up to 50 attachments)
     -a <attribute>=<value>   (up to 50 attributes)
     [-r <id>]                Reply to existing message
     [-q]                     Quote original text on reply
     [-e <id>]                Edit existing message
     [-w <id>|last]           Download existing message (last message)
     [-x]                     Suppress email notification
     [-n 0|1|2]               Encoding: 0:ELcode,1:plain,2:HTML
     -m <textfile>] | <text>
Arguments with blanks must be enclosed in quotes
The elog message can either be submitted on the command line, piped in like
"cat text | elog -h ... -l ... -a ..." or in a file with the -m flag.
Multiple attributes and attachments can be supplied

 
Jose Caballero wrote:

Hi Stefan,

Here is the, I believe, relevant part of the output:

-------------------------------------------------

Response received:
HTTP/1.1 404 Not Found
Date: Tue, 07 Dec 2021 07:26:07 GMT
Server: Apache/2.4.6 (Scientific Linux) OpenSSL/1.0.2k-fips PHP/5.4.16
Content-Length: 204
Connection: close
Content-Type: text/html; charset=iso-8859-1

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>404 Not Found</title>
</head><body>
<h1>Not Found</h1>
<p>The requested URL /LogBook/ was not found on this server.</p>
</body></html>

-------------------------------------------------

Note that the URL https://elog-1.matrix.com/LogBook/ exists and works. That's how we create all our log entries via web browser. 

 

Thanks,

Jose

 

Stefan Ritt wrote:

Please issue the elog command with an added "-v" flag and post the output here.

Stefan

Jose Caballero wrote:

Hello,

 

I am trying first time to use the tool /usr/bin/elog. From the documentation is not clear to if everything must be in quotes or not, if every attribute requires -a.

Here is how my attempt looks like (changing actual data by fake one):

      /usr/bin/elog -h elog-1.matrix.com -l LogBook -u jcaballero mypassword -a Team='Team Name Here' Category='Category Here' -a 'Affected service'='Name of affected service here' -a Criticality=Normal -a 'Oncall Documentation'='No modifications required' -a Subject='here is the subject line' 'here is the text'

I just get "Error transmitting message". 

Attributes Team and Category are of checkbox type. Attributes Criticality and Oncall Documentation are of radio type.

What is wrong with my command attempt?

 

Thanks a lot in advance.

Cheers,

Jose

 

 

 

 

 

 

 

 

 

  69434   Tue Dec 7 17:50:37 2021 Reply Stefan Rittstefan.ritt@psi.chQuestionLinux3.1.4Re: Unclear how to use the command line tool /usr/bin/elog

The reply from the server

Response received:
HTTP/1.1 404 Not Found
Date: Tue, 07 Dec 2021 07:26:07 GMT
Server: Apache/2.4.6 (Scientific Linux) OpenSSL/1.0.2k-fips PHP/5.4.16
Content-Length: 204
Connection: close
Content-Type: text/html; charset=iso-8859-1

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>404 Not Found</title>
</head><body>
<h1>Not Found</h1>
<p>The requested URL /LogBook/ was not found on this server.</p>
</body></html>

comes definitively from the Apache browser (See the "Server" line). So apparently it does not succeed in forwarding your request to the elogd server. Look into the Apache log and see what's wrong there.

Jose Caballero wrote:

Not really. The full URL in the browser is https://elog-1.matrix.com/LogBook. That's why I am trying with "-h elog-1.matrix.com -l LogBook"

I have just tried with -p, here is the full output:

[root@elog-1 ~]# /usr/bin/elog -h elog-1.matrix.com -p 443 -v -x -l LogBook -u jcaballero xxxx -a Team='Team Name' -a Category='Category Name' -a 'Affected service'='Affected Service' -a Criticality=Normal -a 'Oncall Documentation'='No modifications required' -a Subject='This is a test, ignore me' 'This is a test, ignore me'
Successfully connected to host elog-1.matrix.com, port 443
Request sent to host:
POST /Tier1/ HTTP/1.0
Content-Type: multipart/form-data; boundary=---------------------------462A01443E24BC6541C5BB72
Host: elog1.matrix.com:443
User-Agent: ELOG
Content-Length: 1610


Content sent to host:
---------------------------462A01443E24BC6541C5BB72
Content-Disposition: form-data; name="cmd"

Submit
---------------------------462A01443E24BC6541C5BB72
Content-Disposition: form-data; name="unm"

jcaballero
---------------------------462A01443E24BC6541C5BB72
Content-Disposition: form-data; name="upwd"

xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
---------------------------462A01443E24BC6541C5BB72
Content-Disposition: form-data; name="exp"

LogBook
---------------------------462A01443E24BC6541C5BB72
Content-Disposition: form-data; name="suppress"

1
---------------------------462A01443E24BC6541C5BB72
Content-Disposition: form-data; name="encoding"

ELCode
---------------------------462A01443E24BC6541C5BB72
Content-Disposition: form-data; name="Team"

Team Name
---------------------------462A01443E24BC6541C5BB72
Content-Disposition: form-data; name="Category"

Category Name
---------------------------462A01443E24BC6541C5BB72
Content-Disposition: form-data; name="Affected_service"

Affected Service
---------------------------462A01443E24BC6541C5BB72
Content-Disposition: form-data; name="Criticality"

Normal
---------------------------462A01443E24BC6541C5BB72
Content-Disposition: form-data; name="Oncall_Documentation"

No modifications required
---------------------------462A01443E24BC6541C5BB72
Content-Disposition: form-data; name="Subject"

This is a test, ignore me
---------------------------462A01443E24BC6541C5BB72
Content-Disposition: form-data; name="Text"

This is a test, ignore me
---------------------------462A01443E24BC6541C5BB72

Response received:

Error transmitting message

 

 

Stefan Ritt wrote:

If you use HTTPS, you have to connect to port 443 of your server, using the "-p" option.

Furthermore, you run under an Apache server, right? How do you do the redirecting to elogd? I guess you specified a subdir in the URL named /LogBook to redirect to elogd. The you use another part of the URL to select the logbook, which again might be "LogBook". Is that correct? So your full URL in the browser would be https://elog-1.matrix.com/LogBook/LogBook. If that's the case, you have to tell the elog tool that you use a subdir in the URL using the "-d" option.

Stefan

Jose Caballero wrote:

This is what I get with -s:

---------------------------------

Successfully connected to host elog-1.matrix.com, port 80
elogd server does not run SSL protocol

---------------------------------

And the entry has not been created. 

 

Andreas Luedeke wrote:

If you need HTTPS then you must specify the "-s" option.

You could have looked into the help of the elog command:

> elog -h
elogd 3.1.4 built Jun 14 2021, 18:01:54 revision 611489b
usage: elog
elog -h <hostname> [-p port] [-d subdir]
                              Location where elogd is running
     -l logbook/experiment    Name of logbook or experiment
     -s                       Use SSL for communication
     [-v]                     For verbose output
     [-u username password]   User name and password
     [-f <attachment>]        (up to 50 attachments)
     -a <attribute>=<value>   (up to 50 attributes)
     [-r <id>]                Reply to existing message
     [-q]                     Quote original text on reply
     [-e <id>]                Edit existing message
     [-w <id>|last]           Download existing message (last message)
     [-x]                     Suppress email notification
     [-n 0|1|2]               Encoding: 0:ELcode,1:plain,2:HTML
     -m <textfile>] | <text>
Arguments with blanks must be enclosed in quotes
The elog message can either be submitted on the command line, piped in like
"cat text | elog -h ... -l ... -a ..." or in a file with the -m flag.
Multiple attributes and attachments can be supplied

 
Jose Caballero wrote:

Hi Stefan,

Here is the, I believe, relevant part of the output:

-------------------------------------------------

Response received:
HTTP/1.1 404 Not Found
Date: Tue, 07 Dec 2021 07:26:07 GMT
Server: Apache/2.4.6 (Scientific Linux) OpenSSL/1.0.2k-fips PHP/5.4.16
Content-Length: 204
Connection: close
Content-Type: text/html; charset=iso-8859-1

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>404 Not Found</title>
</head><body>
<h1>Not Found</h1>
<p>The requested URL /LogBook/ was not found on this server.</p>
</body></html>

-------------------------------------------------

Note that the URL https://elog-1.matrix.com/LogBook/ exists and works. That's how we create all our log entries via web browser. 

 

Thanks,

Jose

 

Stefan Ritt wrote:

Please issue the elog command with an added "-v" flag and post the output here.

Stefan

Jose Caballero wrote:

Hello,

 

I am trying first time to use the tool /usr/bin/elog. From the documentation is not clear to if everything must be in quotes or not, if every attribute requires -a.

Here is how my attempt looks like (changing actual data by fake one):

      /usr/bin/elog -h elog-1.matrix.com -l LogBook -u jcaballero mypassword -a Team='Team Name Here' Category='Category Here' -a 'Affected service'='Name of affected service here' -a Criticality=Normal -a 'Oncall Documentation'='No modifications required' -a Subject='here is the subject line' 'here is the text'

I just get "Error transmitting message". 

Attributes Team and Category are of checkbox type. Attributes Criticality and Oncall Documentation are of radio type.

What is wrong with my command attempt?

 

Thanks a lot in advance.

Cheers,

Jose

 

 

 

 

 

 

 

 

 

 

  69435   Tue Dec 7 18:24:42 2021 Reply Andreas Luedekeandreas.luedeke@psi.chQuestionLinux3.1.4Re: Unclear how to use the command line tool /usr/bin/elog

But this is real progress! Now elog successfully connected, and all your data was transmitted, but elogd refused your content.

A possible explanation is that one required attribute of this logbook was not provided in your elog command, or that one value of an attribute does not match any allowed value for that attribute.
Here we can only help if you post the config of your logbook.

Cheers, Andreas

PS: you did not provide the -s option?!? Just in case you lack the knowledge: providing a port number 443 does not imply the use of the SSL protocoll.

Jose Caballero wrote:

Not really. The full URL in the browser is https://elog-1.matrix.com/LogBook. That's why I am trying with "-h elog-1.matrix.com -l LogBook"

I have just tried with -p, here is the full output:

[root@elog-1 ~]# /usr/bin/elog -h elog-1.matrix.com -p 443 -v -x -l LogBook -u jcaballero xxxx -a Team='Team Name' -a Category='Category Name' -a 'Affected service'='Affected Service' -a Criticality=Normal -a 'Oncall Documentation'='No modifications required' -a Subject='This is a test, ignore me' 'This is a test, ignore me'
Successfully connected to host elog-1.matrix.com, port 443
Request sent to host:
POST /Tier1/ HTTP/1.0
Content-Type: multipart/form-data; boundary=---------------------------462A01443E24BC6541C5BB72
Host: elog1.matrix.com:443
User-Agent: ELOG
Content-Length: 1610


Content sent to host:
---------------------------462A01443E24BC6541C5BB72
Content-Disposition: form-data; name="cmd"

Submit
---------------------------462A01443E24BC6541C5BB72
Content-Disposition: form-data; name="unm"

jcaballero
---------------------------462A01443E24BC6541C5BB72
Content-Disposition: form-data; name="upwd"

xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
---------------------------462A01443E24BC6541C5BB72
Content-Disposition: form-data; name="exp"

LogBook
---------------------------462A01443E24BC6541C5BB72
Content-Disposition: form-data; name="suppress"

1
---------------------------462A01443E24BC6541C5BB72
Content-Disposition: form-data; name="encoding"

ELCode
---------------------------462A01443E24BC6541C5BB72
Content-Disposition: form-data; name="Team"

Team Name
---------------------------462A01443E24BC6541C5BB72
Content-Disposition: form-data; name="Category"

Category Name
---------------------------462A01443E24BC6541C5BB72
Content-Disposition: form-data; name="Affected_service"

Affected Service
---------------------------462A01443E24BC6541C5BB72
Content-Disposition: form-data; name="Criticality"

Normal
---------------------------462A01443E24BC6541C5BB72
Content-Disposition: form-data; name="Oncall_Documentation"

No modifications required
---------------------------462A01443E24BC6541C5BB72
Content-Disposition: form-data; name="Subject"

This is a test, ignore me
---------------------------462A01443E24BC6541C5BB72
Content-Disposition: form-data; name="Text"

This is a test, ignore me
---------------------------462A01443E24BC6541C5BB72

Response received:

Error transmitting message

 

 

Stefan Ritt wrote:

If you use HTTPS, you have to connect to port 443 of your server, using the "-p" option.

Furthermore, you run under an Apache server, right? How do you do the redirecting to elogd? I guess you specified a subdir in the URL named /LogBook to redirect to elogd. The you use another part of the URL to select the logbook, which again might be "LogBook". Is that correct? So your full URL in the browser would be https://elog-1.matrix.com/LogBook/LogBook. If that's the case, you have to tell the elog tool that you use a subdir in the URL using the "-d" option.

Stefan

Jose Caballero wrote:

This is what I get with -s:

---------------------------------

Successfully connected to host elog-1.matrix.com, port 80
elogd server does not run SSL protocol

---------------------------------

And the entry has not been created. 

 

Andreas Luedeke wrote:

If you need HTTPS then you must specify the "-s" option.

You could have looked into the help of the elog command:

> elog -h
elogd 3.1.4 built Jun 14 2021, 18:01:54 revision 611489b
usage: elog
elog -h <hostname> [-p port] [-d subdir]
                              Location where elogd is running
     -l logbook/experiment    Name of logbook or experiment
     -s                       Use SSL for communication
     [-v]                     For verbose output
     [-u username password]   User name and password
     [-f <attachment>]        (up to 50 attachments)
     -a <attribute>=<value>   (up to 50 attributes)
     [-r <id>]                Reply to existing message
     [-q]                     Quote original text on reply
     [-e <id>]                Edit existing message
     [-w <id>|last]           Download existing message (last message)
     [-x]                     Suppress email notification
     [-n 0|1|2]               Encoding: 0:ELcode,1:plain,2:HTML
     -m <textfile>] | <text>
Arguments with blanks must be enclosed in quotes
The elog message can either be submitted on the command line, piped in like
"cat text | elog -h ... -l ... -a ..." or in a file with the -m flag.
Multiple attributes and attachments can be supplied

 
Jose Caballero wrote:

Hi Stefan,

Here is the, I believe, relevant part of the output:

-------------------------------------------------

Response received:
HTTP/1.1 404 Not Found
Date: Tue, 07 Dec 2021 07:26:07 GMT
Server: Apache/2.4.6 (Scientific Linux) OpenSSL/1.0.2k-fips PHP/5.4.16
Content-Length: 204
Connection: close
Content-Type: text/html; charset=iso-8859-1

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>404 Not Found</title>
</head><body>
<h1>Not Found</h1>
<p>The requested URL /LogBook/ was not found on this server.</p>
</body></html>

-------------------------------------------------

Note that the URL https://elog-1.matrix.com/LogBook/ exists and works. That's how we create all our log entries via web browser. 

 

Thanks,

Jose

 

Stefan Ritt wrote:

Please issue the elog command with an added "-v" flag and post the output here.

Stefan

Jose Caballero wrote:

Hello,

 

I am trying first time to use the tool /usr/bin/elog. From the documentation is not clear to if everything must be in quotes or not, if every attribute requires -a.

Here is how my attempt looks like (changing actual data by fake one):

      /usr/bin/elog -h elog-1.matrix.com -l LogBook -u jcaballero mypassword -a Team='Team Name Here' Category='Category Here' -a 'Affected service'='Name of affected service here' -a Criticality=Normal -a 'Oncall Documentation'='No modifications required' -a Subject='here is the subject line' 'here is the text'

I just get "Error transmitting message". 

Attributes Team and Category are of checkbox type. Attributes Criticality and Oncall Documentation are of radio type.

What is wrong with my command attempt?

 

Thanks a lot in advance.

Cheers,

Jose

 

 

 

 

 

 

 

 

 

 

  69436   Wed Dec 8 10:49:20 2021 Reply Jose Caballerojcaballero.hep@gmail.comQuestionLinux3.1.4Re: Unclear how to use the command line tool /usr/bin/elog

I don't see anything in httpd logs.

I am just reusing an entry I created via web, so the attributes are correct. Nothing is missing, correct spelling, etc.  I keep trying. 

BTW, I have just realized that the output of "elog -h" does not "man log", which is the one I have been using so far. Which one is correct? 

 

Stefan Ritt wrote:

The reply from the server

Response received:
HTTP/1.1 404 Not Found
Date: Tue, 07 Dec 2021 07:26:07 GMT
Server: Apache/2.4.6 (Scientific Linux) OpenSSL/1.0.2k-fips PHP/5.4.16
Content-Length: 204
Connection: close
Content-Type: text/html; charset=iso-8859-1

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>404 Not Found</title>
</head><body>
<h1>Not Found</h1>
<p>The requested URL /LogBook/ was not found on this server.</p>
</body></html>

comes definitively from the Apache browser (See the "Server" line). So apparently it does not succeed in forwarding your request to the elogd server. Look into the Apache log and see what's wrong there.

Jose Caballero wrote:

Not really. The full URL in the browser is https://elog-1.matrix.com/LogBook. That's why I am trying with "-h elog-1.matrix.com -l LogBook"

I have just tried with -p, here is the full output:

[root@elog-1 ~]# /usr/bin/elog -h elog-1.matrix.com -p 443 -v -x -l LogBook -u jcaballero xxxx -a Team='Team Name' -a Category='Category Name' -a 'Affected service'='Affected Service' -a Criticality=Normal -a 'Oncall Documentation'='No modifications required' -a Subject='This is a test, ignore me' 'This is a test, ignore me'
Successfully connected to host elog-1.matrix.com, port 443
Request sent to host:
POST /Tier1/ HTTP/1.0
Content-Type: multipart/form-data; boundary=---------------------------462A01443E24BC6541C5BB72
Host: elog1.matrix.com:443
User-Agent: ELOG
Content-Length: 1610


Content sent to host:
---------------------------462A01443E24BC6541C5BB72
Content-Disposition: form-data; name="cmd"

Submit
---------------------------462A01443E24BC6541C5BB72
Content-Disposition: form-data; name="unm"

jcaballero
---------------------------462A01443E24BC6541C5BB72
Content-Disposition: form-data; name="upwd"

xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
---------------------------462A01443E24BC6541C5BB72
Content-Disposition: form-data; name="exp"

LogBook
---------------------------462A01443E24BC6541C5BB72
Content-Disposition: form-data; name="suppress"

1
---------------------------462A01443E24BC6541C5BB72
Content-Disposition: form-data; name="encoding"

ELCode
---------------------------462A01443E24BC6541C5BB72
Content-Disposition: form-data; name="Team"

Team Name
---------------------------462A01443E24BC6541C5BB72
Content-Disposition: form-data; name="Category"

Category Name
---------------------------462A01443E24BC6541C5BB72
Content-Disposition: form-data; name="Affected_service"

Affected Service
---------------------------462A01443E24BC6541C5BB72
Content-Disposition: form-data; name="Criticality"

Normal
---------------------------462A01443E24BC6541C5BB72
Content-Disposition: form-data; name="Oncall_Documentation"

No modifications required
---------------------------462A01443E24BC6541C5BB72
Content-Disposition: form-data; name="Subject"

This is a test, ignore me
---------------------------462A01443E24BC6541C5BB72
Content-Disposition: form-data; name="Text"

This is a test, ignore me
---------------------------462A01443E24BC6541C5BB72

Response received:

Error transmitting message

 

 

Stefan Ritt wrote:

If you use HTTPS, you have to connect to port 443 of your server, using the "-p" option.

Furthermore, you run under an Apache server, right? How do you do the redirecting to elogd? I guess you specified a subdir in the URL named /LogBook to redirect to elogd. The you use another part of the URL to select the logbook, which again might be "LogBook". Is that correct? So your full URL in the browser would be https://elog-1.matrix.com/LogBook/LogBook. If that's the case, you have to tell the elog tool that you use a subdir in the URL using the "-d" option.

Stefan

Jose Caballero wrote:

This is what I get with -s:

---------------------------------

Successfully connected to host elog-1.matrix.com, port 80
elogd server does not run SSL protocol

---------------------------------

And the entry has not been created. 

 

Andreas Luedeke wrote:

If you need HTTPS then you must specify the "-s" option.

You could have looked into the help of the elog command:

> elog -h
elogd 3.1.4 built Jun 14 2021, 18:01:54 revision 611489b
usage: elog
elog -h <hostname> [-p port] [-d subdir]
                              Location where elogd is running
     -l logbook/experiment    Name of logbook or experiment
     -s                       Use SSL for communication
     [-v]                     For verbose output
     [-u username password]   User name and password
     [-f <attachment>]        (up to 50 attachments)
     -a <attribute>=<value>   (up to 50 attributes)
     [-r <id>]                Reply to existing message
     [-q]                     Quote original text on reply
     [-e <id>]                Edit existing message
     [-w <id>|last]           Download existing message (last message)
     [-x]                     Suppress email notification
     [-n 0|1|2]               Encoding: 0:ELcode,1:plain,2:HTML
     -m <textfile>] | <text>
Arguments with blanks must be enclosed in quotes
The elog message can either be submitted on the command line, piped in like
"cat text | elog -h ... -l ... -a ..." or in a file with the -m flag.
Multiple attributes and attachments can be supplied

 
Jose Caballero wrote:

Hi Stefan,

Here is the, I believe, relevant part of the output:

-------------------------------------------------

Response received:
HTTP/1.1 404 Not Found
Date: Tue, 07 Dec 2021 07:26:07 GMT
Server: Apache/2.4.6 (Scientific Linux) OpenSSL/1.0.2k-fips PHP/5.4.16
Content-Length: 204
Connection: close
Content-Type: text/html; charset=iso-8859-1

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>404 Not Found</title>
</head><body>
<h1>Not Found</h1>
<p>The requested URL /LogBook/ was not found on this server.</p>
</body></html>

-------------------------------------------------

Note that the URL https://elog-1.matrix.com/LogBook/ exists and works. That's how we create all our log entries via web browser. 

 

Thanks,

Jose

 

Stefan Ritt wrote:

Please issue the elog command with an added "-v" flag and post the output here.

Stefan

Jose Caballero wrote:

Hello,

 

I am trying first time to use the tool /usr/bin/elog. From the documentation is not clear to if everything must be in quotes or not, if every attribute requires -a.

Here is how my attempt looks like (changing actual data by fake one):

      /usr/bin/elog -h elog-1.matrix.com -l LogBook -u jcaballero mypassword -a Team='Team Name Here' Category='Category Here' -a 'Affected service'='Name of affected service here' -a Criticality=Normal -a 'Oncall Documentation'='No modifications required' -a Subject='here is the subject line' 'here is the text'

I just get "Error transmitting message". 

Attributes Team and Category are of checkbox type. Attributes Criticality and Oncall Documentation are of radio type.

What is wrong with my command attempt?

 

Thanks a lot in advance.

Cheers,

Jose

 

 

 

 

 

 

 

 

 

 

 

  69437   Wed Dec 8 10:59:58 2021 Reply Stefan Rittstefan.ritt@psi.chQuestionLinux3.1.4Re: Unclear how to use the command line tool /usr/bin/elog

Ok, you Apache listes on two ports. On port 80 with HTTP and on port 443 with HTTPS. If you connect to port 80, there is no fowarding to elogd, that's why Apach complains 

The requested URL /LogBook/ was not found on this server.

On port 443 using the HTTPS protocol (with -s) you apparently get forwarded to elogd. The fact that you succeeded to connect to Apache without the "-s" flag tells me that your Apache listens on port 443 with the HTTP protocol, not HTTPS. First I would configure Apache such that is also forwards port 80 to elogd. Then you don't have to use HTTPS at all (at least for testing). 

Then I agree with Andreas that you might be missing an attribute or so. You can also use "curl" instead of "elog" which might tell you more details. See https://elog.psi.ch/elogs/Forum/68597

Andreas Luedeke wrote:

But this is real progress! Now elog successfully connected, and all your data was transmitted, but elogd refused your content.

A possible explanation is that one required attribute of this logbook was not provided in your elog command, or that one value of an attribute does not match any allowed value for that attribute.
Here we can only help if you post the config of your logbook.

Cheers, Andreas

PS: you did not provide the -s option?!? Just in case you lack the knowledge: providing a port number 443 does not imply the use of the SSL protocoll.

Jose Caballero wrote:

Not really. The full URL in the browser is https://elog-1.matrix.com/LogBook. That's why I am trying with "-h elog-1.matrix.com -l LogBook"

I have just tried with -p, here is the full output:

[root@elog-1 ~]# /usr/bin/elog -h elog-1.matrix.com -p 443 -v -x -l LogBook -u jcaballero xxxx -a Team='Team Name' -a Category='Category Name' -a 'Affected service'='Affected Service' -a Criticality=Normal -a 'Oncall Documentation'='No modifications required' -a Subject='This is a test, ignore me' 'This is a test, ignore me'
Successfully connected to host elog-1.matrix.com, port 443
Request sent to host:
POST /Tier1/ HTTP/1.0
Content-Type: multipart/form-data; boundary=---------------------------462A01443E24BC6541C5BB72
Host: elog1.matrix.com:443
User-Agent: ELOG
Content-Length: 1610


Content sent to host:
---------------------------462A01443E24BC6541C5BB72
Content-Disposition: form-data; name="cmd"

Submit
---------------------------462A01443E24BC6541C5BB72
Content-Disposition: form-data; name="unm"

jcaballero
---------------------------462A01443E24BC6541C5BB72
Content-Disposition: form-data; name="upwd"

xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
---------------------------462A01443E24BC6541C5BB72
Content-Disposition: form-data; name="exp"

LogBook
---------------------------462A01443E24BC6541C5BB72
Content-Disposition: form-data; name="suppress"

1
---------------------------462A01443E24BC6541C5BB72
Content-Disposition: form-data; name="encoding"

ELCode
---------------------------462A01443E24BC6541C5BB72
Content-Disposition: form-data; name="Team"

Team Name
---------------------------462A01443E24BC6541C5BB72
Content-Disposition: form-data; name="Category"

Category Name
---------------------------462A01443E24BC6541C5BB72
Content-Disposition: form-data; name="Affected_service"

Affected Service
---------------------------462A01443E24BC6541C5BB72
Content-Disposition: form-data; name="Criticality"

Normal
---------------------------462A01443E24BC6541C5BB72
Content-Disposition: form-data; name="Oncall_Documentation"

No modifications required
---------------------------462A01443E24BC6541C5BB72
Content-Disposition: form-data; name="Subject"

This is a test, ignore me
---------------------------462A01443E24BC6541C5BB72
Content-Disposition: form-data; name="Text"

This is a test, ignore me
---------------------------462A01443E24BC6541C5BB72

Response received:

Error transmitting message

 

 

Stefan Ritt wrote:

If you use HTTPS, you have to connect to port 443 of your server, using the "-p" option.

Furthermore, you run under an Apache server, right? How do you do the redirecting to elogd? I guess you specified a subdir in the URL named /LogBook to redirect to elogd. The you use another part of the URL to select the logbook, which again might be "LogBook". Is that correct? So your full URL in the browser would be https://elog-1.matrix.com/LogBook/LogBook. If that's the case, you have to tell the elog tool that you use a subdir in the URL using the "-d" option.

Stefan

Jose Caballero wrote:

This is what I get with -s:

---------------------------------

Successfully connected to host elog-1.matrix.com, port 80
elogd server does not run SSL protocol

---------------------------------

And the entry has not been created. 

 

Andreas Luedeke wrote:

If you need HTTPS then you must specify the "-s" option.

You could have looked into the help of the elog command:

> elog -h
elogd 3.1.4 built Jun 14 2021, 18:01:54 revision 611489b
usage: elog
elog -h <hostname> [-p port] [-d subdir]
                              Location where elogd is running
     -l logbook/experiment    Name of logbook or experiment
     -s                       Use SSL for communication
     [-v]                     For verbose output
     [-u username password]   User name and password
     [-f <attachment>]        (up to 50 attachments)
     -a <attribute>=<value>   (up to 50 attributes)
     [-r <id>]                Reply to existing message
     [-q]                     Quote original text on reply
     [-e <id>]                Edit existing message
     [-w <id>|last]           Download existing message (last message)
     [-x]                     Suppress email notification
     [-n 0|1|2]               Encoding: 0:ELcode,1:plain,2:HTML
     -m <textfile>] | <text>
Arguments with blanks must be enclosed in quotes
The elog message can either be submitted on the command line, piped in like
"cat text | elog -h ... -l ... -a ..." or in a file with the -m flag.
Multiple attributes and attachments can be supplied

 
Jose Caballero wrote:

Hi Stefan,

Here is the, I believe, relevant part of the output:

-------------------------------------------------

Response received:
HTTP/1.1 404 Not Found
Date: Tue, 07 Dec 2021 07:26:07 GMT
Server: Apache/2.4.6 (Scientific Linux) OpenSSL/1.0.2k-fips PHP/5.4.16
Content-Length: 204
Connection: close
Content-Type: text/html; charset=iso-8859-1

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>404 Not Found</title>
</head><body>
<h1>Not Found</h1>
<p>The requested URL /LogBook/ was not found on this server.</p>
</body></html>

-------------------------------------------------

Note that the URL https://elog-1.matrix.com/LogBook/ exists and works. That's how we create all our log entries via web browser. 

 

Thanks,

Jose

 

Stefan Ritt wrote:

Please issue the elog command with an added "-v" flag and post the output here.

Stefan

Jose Caballero wrote:

Hello,

 

I am trying first time to use the tool /usr/bin/elog. From the documentation is not clear to if everything must be in quotes or not, if every attribute requires -a.

Here is how my attempt looks like (changing actual data by fake one):

      /usr/bin/elog -h elog-1.matrix.com -l LogBook -u jcaballero mypassword -a Team='Team Name Here' Category='Category Here' -a 'Affected service'='Name of affected service here' -a Criticality=Normal -a 'Oncall Documentation'='No modifications required' -a Subject='here is the subject line' 'here is the text'

I just get "Error transmitting message". 

Attributes Team and Category are of checkbox type. Attributes Criticality and Oncall Documentation are of radio type.

What is wrong with my command attempt?

 

Thanks a lot in advance.

Cheers,

Jose

 

 

 

 

 

 

 

 

 

 

 

ELOG V3.1.5-fe60aaf