Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
i have installed cups-lpd using dnf install cups-lpd and managing it by xinetd. The files look as follows:
Code:
#cat /etc/xinetd.conf
# Simple configuration file for xinetd
#
# Some defaults, and include /etc/xinetd.d/
defaults
{
# Please note that you need a log_type line to be able to use log_on_success
# and log_on_failure. The default is the following :
# log_type = SYSLOG daemon info
}
includedir /etc/xinetd.d
Code:
#cat /etc/xinetd.d/cups-lpd
service printer
{
socket_type = stream
protocol = tcp
wait = no
flags = IPv4
user = lp
server = /usr/lib/cups/daemon/cups-lpd
server_args = -o document-format=application/octet-stream -o job-sheets=none
}
and service is running on port 515.
Cups-lpd is being using by an external software. I have to test if cups-lpd is working or not.
I have tried:
Code:
#lp -d PrinterName testpage.txt
The printed page does not contain the expected content but as follows(this information):
#cups-lpd -h PrinterName testpage.txt
-bash: cups-lpd: Command not found
furthermore i have also stopped xinetd and started and enabled cups-lpd.socket because systemd manages it.
But the result was same
Before printing from the Application how can i test cups-lpd to make sure it is working?
am i doing anything wrongly ?
Following are the mix logs of xinetd and systemd.
Code:
/var/log/messages:348950:May 12 11:12:18 server xinetd[974]: xinetd Version 2.3.15 started with loadavg labeled-networking options compiled in.
/var/log/messages:348951:May 12 11:12:18 server xinetd[974]: Started working: 2 available services
/var/log/messages:356372:May 12 12:22:12 server xinetd[974]: unexpected signal: 18 (Continued) in signal pipe
/var/log/messages:356373:May 12 12:22:12 server xinetd[974]: Exiting...
/var/log/messages:356374:May 12 12:22:12 server systemd[1]: xinetd.service: Succeeded.
/var/log/messages:356378:May 12 12:22:12 server xinetd[20626]: xinetd Version 2.3.15 started with loadavg labeled-networking options compiled in.
/var/log/messages:356379:May 12 12:22:12 server xinetd[20626]: Started working: 2 available services
/var/log/messages:362713:May 12 13:22:21 server xinetd[20626]: unexpected signal: 18 (Continued) in signal pipe
/var/log/messages:362714:May 12 13:22:21 server xinetd[20626]: Exiting...
/var/log/messages:362715:May 12 13:22:21 server systemd[1]: xinetd.service: Succeeded.
/var/log/messages:364380:May 12 13:37:49 server xinetd[40878]: xinetd Version 2.3.15 started with loadavg labeled-networking options compiled in.
/var/log/messages:364381:May 12 13:37:49 server xinetd[40878]: Started working: 2 available services
/var/log/messages:364636:May 12 13:40:02 server xinetd[40878]: unexpected signal: 18 (Continued) in signal pipe
/var/log/messages:364637:May 12 13:40:02 server xinetd[40878]: Exiting...
/var/log/messages:364638:May 12 13:40:02 server systemd[1]: xinetd.service: Succeeded.
i have installed cups-lpd using dnf install cups-lpd and managing it by xinetd. The files look as follows:
Code:
#cat /etc/xinetd.conf
# Simple configuration file for xinetd
#
# Some defaults, and include /etc/xinetd.d/
defaults
{
# Please note that you need a log_type line to be able to use log_on_success
# and log_on_failure. The default is the following :
# log_type = SYSLOG daemon info
}
includedir /etc/xinetd.d
#cat /etc/xinetd.d/cups-lpd
service printer
{
socket_type = stream
protocol = tcp
wait = no
flags = IPv4
user = lp
server = /usr/lib/cups/daemon/cups-lpd
server_args = -o document-format=application/octet-stream -o job-sheets=none
}
and service is running on port 515. Cups-lpd is being using by an external software. I have to test if cups-lpd is working or not. I have tried:
Code:
#lp -d PrinterName testpage.txt
The printed page does not contain the expected content but as follows(this information):
Code:
Error Name: /undefined
Offending Command: cups-lpd
Operand Stack:
#cups-lpd -h PrinterName testpage.txt
-bash: cups-lpd: Command not found
furthermore i have also stopped xinetd and started and enabled cups-lpd.socket because systemd manages it. But the result was same Before printing from the Application how can i test cups-lpd to make sure it is working? am i doing anything wrongly ? Following are the mix logs of xinetd and systemd.
Code:
/var/log/messages:348950:May 12 11:12:18 server xinetd[974]: xinetd Version 2.3.15 started with loadavg labeled-networking options compiled in.
/var/log/messages:348951:May 12 11:12:18 server xinetd[974]: Started working: 2 available services
/var/log/messages:356372:May 12 12:22:12 server xinetd[974]: unexpected signal: 18 (Continued) in signal pipe
/var/log/messages:356373:May 12 12:22:12 server xinetd[974]: Exiting...
/var/log/messages:356374:May 12 12:22:12 server systemd[1]: xinetd.service: Succeeded.
/var/log/messages:356378:May 12 12:22:12 server xinetd[20626]: xinetd Version 2.3.15 started with loadavg labeled-networking options compiled in.
/var/log/messages:356379:May 12 12:22:12 server xinetd[20626]: Started working: 2 available services
/var/log/messages:362713:May 12 13:22:21 server xinetd[20626]: unexpected signal: 18 (Continued) in signal pipe
/var/log/messages:362714:May 12 13:22:21 server xinetd[20626]: Exiting...
/var/log/messages:362715:May 12 13:22:21 server systemd[1]: xinetd.service: Succeeded.
/var/log/messages:364380:May 12 13:37:49 server xinetd[40878]: xinetd Version 2.3.15 started with loadavg labeled-networking options compiled in.
/var/log/messages:364381:May 12 13:37:49 server xinetd[40878]: Started working: 2 available services
/var/log/messages:364636:May 12 13:40:02 server xinetd[40878]: unexpected signal: 18 (Continued) in signal pipe
/var/log/messages:364637:May 12 13:40:02 server xinetd[40878]: Exiting...
/var/log/messages:364638:May 12 13:40:02 server systemd[1]: xinetd.service: Succeeded.
System information:
NAME="AlmaLinux"
VERSION="8.5 (Arctic Sphynx)"
ID="almalinux"
ID_LIKE="rhel centos fedora"
VERSION_ID="8.5"
PLATFORM_ID="platform:el8"
PRETTY_NAME="AlmaLinux 8.5 (Arctic Sphynx)"
Since you marked the last thread about your CUPS server as 'Solved', it's odd that you open a new one since you are saying you got it working previously. Start by reading the CUPS documentation about testing things: http://www.cups.org/doc/options.html
Thanks for identation, i will keep in mind to use CODE tags next time. Yes i read the documentation http://www.cups.org/doc/options.html and https://www.cups.org/doc/man-cups-lpd.html which has been mentioned that what i have tried. these command not only gave the expected print out but also i can not see in /var/log that if someone tried to connect to cups-lpd.
You did not mention that you looked at those directions, only the things you tried. And now you're saying that things DID work, but you just can't see things in /var/log? Did you actually set up an accounting file to show what's been/being printed?? http://www.cups.org/doc/accounting.html https://www.cups.org/doc/man-cupsd-logs.html
/var/log is a directory...what actual FILE are you looking in? And seeing network connections is far different than printer accounting.
Either run cups-lpd from xinetd or systemd but not both. I would suggest using systemd.
The easiest way to test the server is to create a raw printer queue that points to a real printer via the cups web page as
lpd://localhost/existing_printer_queue
You can then print something using the regular lpr or lp commands and specify the new print queue. You can test to see if your actually connecting to cups-lpd by stopping it and see what happens.
Thanks michaelk. I followed your suggestion and it worked on command line now i will test with the application.But before that i am looking for a log as cups-lpd is being managed by xinetd. This is how the /etc/xinetd looks
But the cat /var/log/xinetdlog is empty. Even after running lp -d PrinterName file.txt three times and have also started xinetd service multiple times.
# cat /etc/xinetd.conf
#
# This is the master xinetd configuration file. Settings in the
# default section will be inherited by all service configurations
# unless explicitly overridden in the service configuration. See
# xinetd.conf in the man pages for a more detailed explanation of
# these attributes.
defaults
{
# The next two items are intended to be a quick access place to
# temporarily enable or disable services.
#
# enabled =
# disabled =
# Define general logging characteristics.
#log_type = SYSLOG daemon info
log_type = FILE /var/log/xinetdlog
log_on_failure = HOST
log_on_success = PID HOST DURATION EXIT
# Define access restriction defaults
#
# no_access =
# only_from =
# max_load = 0
cps = 50 10
instances = 50
per_source = 10
# Address and networking defaults
#
# bind =
# mdns = yes
v6only = no
# setup environmental attributes
#
# passenv =
groups = yes
umask = 002
# Generally, banners are not used. This sets up their global defaults
#
# banner =
# banner_fail =
# banner_success =
}
includedir /etc/xinetd.d
# cat /etc/xinetd.conf
#
# This is the master xinetd configuration file. Settings in the
# default section will be inherited by all service configurations
# unless explicitly overridden in the service configuration. See
# xinetd.conf in the man pages for a more detailed explanation of
# these attributes.
defaults
{
# The next two items are intended to be a quick access place to
# temporarily enable or disable services.
#
# enabled =
# disabled =
# Define general logging characteristics.
#log_type = SYSLOG daemon info
log_type = FILE /var/log/xinetdlog
log_on_failure = HOST
log_on_success = PID HOST DURATION EXIT
# Define access restriction defaults
#
# no_access =
# only_from =
# max_load = 0
cps = 50 10
instances = 50
per_source = 10
# Address and networking defaults
#
# bind =
# mdns = yes
v6only = no
# setup environmental attributes
#
# passenv =
groups = yes
umask = 002
# Generally, banners are not used. This sets up their global defaults
#
# banner =
# banner_fail =
# banner_success =
}
includedir /etc/xinetd.d
Great; **AGAIN** did you read the documentation on CUPS??? If you haven't defined the file(s) to use, you aren't going to get anything in them. http://www.cups.org/doc/man-cups-files.conf.html
cups uses the IPP protocol and it makes sense that cups-lpd is an intermediate process that basically talks lpd to the client and then sends the job on to cups itself.
Searching has not found much and I have not personally tested anything yet but to throw out another guess try changing the log file name is the same in both your service and xinetd.conf. Try changing the service file to something else and restart xinetd.
cups uses the IPP protocol and it makes sense that cups-lpd is an intermediate process that basically talks lpd to the client and then sends the job on to cups itself.
Searching has not found much and I have not personally tested anything yet but to throw out another guess try changing the log file name is the same in both your service and xinetd.conf. Try changing the service file to something else and restart xinetd.
Unless the log files are specified, things aren't going to get logged. Unless you define AccessLog, ErrorLog, PageLog, etc., and define what goes in them, they won't exist. I believe (unknown), that by default it's logged to syslog, so either journalctl or /var/log/messages may have things, but I'm not sure.
xinetd is separate from cups and the cups-lpd is separate from the actual cups daemon. xinetd log files are separate from cups log files and unrelated. I would not expect the OP to need to change any cups configuration.
xinetd is separate from cups and the cups-lpd is separate from the actual cups daemon. xinetd log files are separate from cups log files and unrelated. I would not expect the OP to need to change any cups configuration.
Interesting; would have thought the service itself would have logged the data. In that case, what they're looking for is probably in the system journal.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.