VMware Communities
ronmarcusps
Contributor
Contributor
Jump to solution

Cannot connect to Printer via ThinPrint error: "serial0: Failed to connect to the Virtual Printer daemon after 25 attempts. The device will be disconnected"

I started this thread on the discussion under "Free Fusion v2.0.3" but Michael suggested I post this as a new thread since it turns out my printing problem was not due to the much discussed most recent Max OS security update causing ThinPrinting to break. Whenever I start up my VM's (both Win XP and Windows 7 beta) I get the error message noted above, and therfore cannot take advantage of Fusion's ability to use ThinPrint to print to my networked Mac printer. Michael asked for several log files, which I have attached 3 to this post, and will attach the others to my next post, so hopefully you smart folks from VMWare will be able to help me with this problem. Thanks in advance!

Ron

Tags (2)
0 Kudos
1 Solution

Accepted Solutions
mudaltsov
Expert
Expert
Jump to solution

I got a response from ThinPrint with a possible solution - the problem could be an outdated /etc/printcap file, which references a computer that no longer exists. The DNS lookup may have a 30-second timeout and may be blocking the thnuclnt process. The /etc/printcap file contains a copy of the printer configuration, but it's not required for thnuclnt. It's typically not even created by OS X by default, but it seems that some previous OS X system updates or printer drivers may have turned it on at some point. Afterwards, the option got turned off, but the old file was left behind with outdated information.

Could you try renaming the /etc/printcap file, and see if it eliminates the 30-second delay? To do this, run Terminal and use the following command:

sudo mv /etc/printcap /etc/printcap.bak

View solution in original post

0 Kudos
24 Replies
ronmarcusps
Contributor
Contributor
Jump to solution

Here are the other log files Michael suggested I send to you. Also, please note in order to get current logs, I restarted my VM at about 13:55 and reproduced the "failed to connect to the Virtual Printer daemon. . ." error, so the logs should all be looked at around that timestamp today (April 8). Thanks again in advance for any help you can give me. . .

Ron

0 Kudos
admin
Immortal
Immortal
Jump to solution

Deleted duplicate thread

0 Kudos
ronmarcusps
Contributor
Contributor
Jump to solution

Sorry about the duplicate thread which you apparently deleted -- when I attempted to upload all of the log files I got an error, stating I didn't have permission, so I redid the thread, and later the duplicate magically appeared. However, I have had no response to my question since you did this, so do people think this thread is a duplicate as well? Please, can someone respond to my question -- I have been dealing with this problem for several months now, and I am getting very frustrated with attempting to print from fusion. My experience with the paid "support" from VMWare has been terrible, and I am loath to spend more money and still not have my issue resolved. So if there is anyone out there who can help me with this problem (Michael, David?) please don't abandon me now!

Ron

0 Kudos
mudaltsov
Expert
Expert
Jump to solution

Sorry, I didn't notice when you posted this thread...

I've looked at the logs, but unfortunately they don't provide any more information (nothing at the time the error happened). I'm writing up some instructions for how to manually check that ThinPrint is working on the Mac, but it may take some time. I'll post the instructions here once they are ready.

0 Kudos
mudaltsov
Expert
Expert
Jump to solution

Here are the steps for checking if ThinPrint works correctly (on the Mac side at least). These commands need to be run within Terminal, which you can start from /Applications/Utilities/. Please paste one command at a time as a full line, and press Enter to run it. If you see anything different in the output, please paste the results into your reply, and don't proceed to later steps.

1. Verify that ThinPrint files were installed correctly:

ls -l /Library/Application\ Support/VMware\ Fusion/thnuclnt/thnuclnt /etc/thnuclnt/.thnumod `cat /Library/Application\ Support/VMware\ Fusion/thnuclnt/manifest`

This should produce the following list. The modification date and time may be different if you're using 2.0.3 instead of 2.0.4, but the file sizes and the rest of the information should be the same.

-rwxr-xr-x 1 root wheel 224620 Apr 7 20:32 /Library/Application Support/VMware Fusion/thnuclnt/thnuclnt

-rwxr-xr-x 1 root wheel 31644 Apr 7 20:32 /etc/thnuclnt/.thnumod

-rw-rr 1 root wheel 91 Apr 7 20:32 /private/etc/cups/thnuclnt.convs

-rw-rr 1 root wheel 75 Apr 7 20:32 /private/etc/cups/thnuclnt.types

-rwxr-xr-x 1 root wheel 127444 Apr 7 20:32 /usr/libexec/cups/filter/thnucups

2. Create a ThinPrint configuration file (normally created by Fusion when the VM is started):

mkdir /tmp/thinprint-test; nano /tmp/thinprint-test/thnuclnt.conf

Paste the following into the editor:

autoupdate = 15

automap = true

autoid = 0

updatecount = 0

editcount = 0

connector vmlocal {

protocol = vm

interface = /tmp/thinprint-test/socket

setdefault = true

}

Then press Control+X, then Y (to save), and then Enter to write to the file and exit. You can verify the contents by running:

cat /tmp/thinprint-test/thnuclnt.conf

3. Try to run ThinPrint with the configuration file, to see if it works correctly, or if it reports any errors:

/Library/Application\ Support/VMware\ Fusion/thnuclnt/thnuclnt -fg -pdir /tmp/thinprint-test/

It should print something like this (with different date/time), and will keep running the ThinPrint process (you shouldn't see a $ prompt).

2009-04-10 19:13:30 no printer configured or none available

2009-04-10 19:13:30 adaptor daemon booted

2009-04-10 19:13:30 connector "vmlocal" booted

4. Open another Terminal window (with Command+N) and verify that the ThinPrint process is running correctly:

ls -l /tmp/thinprint-test/

You should see the following results (with your username/group, and different date/time/size).

srwxrwxrwx 1 (user) (group) 0 Apr 10 19:19 socket

-rw-rr 1 (user) (group) 3547 Apr 10 19:13 thnuclnt.conf

-rw-rr 1 (user) (group) 11 Apr 10 19:19 thnuclnt.pid

5. You can close the second terminal window, and press Control+C in the first window to terminate the ThinPrint process. To clean up and remove the configuration files, run:

rm -r /tmp/thinprint-test/

Either something will be different when you try to run these, or there's a possible bug in Fusion that results in the error you see (which we haven't been able to reproduce here).

ronmarcusps
Contributor
Contributor
Jump to solution

Thanks for the help. There were just 2 differences in output when I ran the commands in terminal:

After Step 3:

2009-04-10 22:19:42 /etc/printcap:4: value expression error (remote machine)

2009-04-10 22:19:42 config file "/etc/thnuclnt/thnuclnt.conf" load failure

2009-04-10 22:19:42 no printer configured or none available

2009-04-10 22:19:42 adaptor daemon booted

2009-04-10 22:19:42 connector "vmlocal" booted

After Step 4:

total 24

srwxrwxrwx 1 ronaldmarcus wheel 0 Apr 10 22:19 socket

-rw-rr 1 ronaldmarcus wheel 6031 Apr 10 22:19 thnuclnt.conf

-rw-rr 1 ronaldmarcus wheel 11 Apr 10 22:19 thnuclnt.pid

The differences seem to be the first 3 lines after Step 3 are not in your output and, after step 4, the second line has 6031 instead of 3547. I don’t know if these are significant, but those are the results. Thanks again for your help. . .

Ron

"Live Long and Prosper!"

0 Kudos
ronmarcusps
Contributor
Contributor
Jump to solution

Thanks for the help. There were just 2 differences in output when I ran the commands in terminal:

After Step 3:

2009-04-10 22:19:42 /etc/printcap:4: value expression error (remote machine)

2009-04-10 22:19:42 config file "/etc/thnuclnt/thnuclnt.conf" load failure

2009-04-10 22:19:42 no printer configured or none available

2009-04-10 22:19:42 adaptor daemon booted

2009-04-10 22:19:42 connector "vmlocal" booted

After Step 4:

total 24

srwxrwxrwx 1 ronaldmarcus wheel 0 Apr 10 22:19 socket

-rw-rr 1 ronaldmarcus wheel 6031 Apr 10 22:19 thnuclnt.conf

-rw-rr 1 ronaldmarcus wheel 11 Apr 10 22:19 thnuclnt.pid

The differences seem to be the first 3 lines after Step 3 are not in your output and, after step 4, the second line has 6031 instead of 3547. I don’t know if these are significant, but those are the results. Thanks again for your help. . .

Ron

"Live Long and Prosper!"

From: mudaltsov <communities-emailer@vmware.com>

Date: Fri, 10 Apr 2009 19:47:29 -0700

Subject: New message: "Cannot connect to Printer via ThinPrint

error: "serial0: Failed to connect to the Virtual Printer daemon after 25

attempts. The device will be disconnected""

rm -r /tmp/thinprint-test/

>

0 Kudos
mudaltsov
Expert
Expert
Jump to solution

The 2 extra lines you got in step 3 should be ok - it's just a warning about an outdated /etc/printcap file. This used to cause ThinPrint not to work at all before, but was fixed with Fusion 2.0.3 (in addition to the Security Update issue). The fact that it printed the other lines and kept running confirms that it's working. For step 4, the difference of 6031 vs 3547 is just the file size - you have different printers than I do, so the ThinPrint collects different information and the file size is different as well.

This all seems to point to an issue in Fusion - those messages from step 3 are typically printed to the system.log file. However, your log file doesn't have them, so ThinPrint was never started for some reason. So Fusion was trying to connect, but the ThinPrint process just wasn't there, which is why there's an error about not being able to connect after 25 attempts.

Thanks a lot for helping with this - the issue is not reproducible on any machines we have, so the only way to track down these problems is to gather information from outside users such as yourself. I will look through the source code on Monday to see if I can figure out why this is happening.

ronmarcusps
Contributor
Contributor
Jump to solution

Thank you for trying to help with this -- I will keep watching this thread to see if you smart folks can figure this out. I hope I'm not the only one with this issue, but I really do appreciate the help! Please let me know if you need me to reproduce the error again and what log files you might need -- I'm happy to help for selfish reasons (I want this to work!). Happy Easter and Happy Passover!

Ron

0 Kudos
sigmed
Contributor
Contributor
Jump to solution

You're not the only one. I have the same exact problem.

0 Kudos
mudaltsov
Expert
Expert
Jump to solution

I've created a custom build of Fusion 2.0.4 with more logging added for ThinPrint:

http://ftpsite.vmware.com/download/VMware-Fusion-2.0.4-ThinPrint-logging.dmg

Could you please download and install this build and try to run the VM with Printers enabled? Afterwards, please get the new vmware.log and system.log files and attach them to your reply. These logs will be much more specific than the current error message, which should help to identify the issue (or at least narrow down why it's happening).

After you're done, you should reinstall the regular 2.0.4 build (the custom one is technically a beta build).

0 Kudos
ronmarcusps
Contributor
Contributor
Jump to solution

Here are the log files you requested. I started the VM at about 19:35

today, April 14th. Hope this helps.

Ron

"Live Long and Prosper!"

From: mudaltsov <communities-emailer@vmware.com>

Date: Tue, 14 Apr 2009 16:18:19 -0700

Subject: New message: "Cannot connect to Printer via ThinPrint

error: "serial0: Failed to connect to the Virtual Printer daemon after 25

attempts. The device will be disconnected""

,

A new message was posted in the thread "Cannot connect to Printer via

ThinPrint error: "serial0: Failed to connect to the Virtual Printer daemon

after 25 attempts. The device will be disconnected"":

http://communities.vmware.com/message/1225616#1225616

Author : mudaltsov

Profile : http://communities.vmware.com/people/mudaltsov

Message:

>

0 Kudos
mudaltsov
Expert
Expert
Jump to solution

The new logs suggest that pretty much everything works correctly, and ThinPrint should be getting launched. However, Fusion still can't connect. This definitely narrows down where the problem may be happening, but unfortunately doesn't explain what's causing it.

I've updated the custom build with a few more logs that should help, and also extended it to do 150 tries instead of 25, just in case ThinPrint is taking a long time to launch and initialize (although it typically only needs 1 or 2 tries). If it's not too much trouble, could you please download it again and give it a try?

http://ftpsite.vmware.com/download/VMware-Fusion-2.0.4-ThinPrint-logging.dmg

Again, I'm looking for the new vmware.log file. The contents of system.log aren't as important, unless you see **** ThinPrint forked process #### - exec error #. This would be printed in case ThinPrint couldn't be executed, but it didn't happen the last time, so I would expect it to keep working the same.

Also, it would help if you run Activity Monitor (from /Applications/Utilities), and see if one or more thnuclnt processes start up when you power on the VM (it probably works best if you sort the running processes by name).

One more thing - you may want to edit your previous replies in this thread, and remove your email address to avoid spam. If you reply from your email client instead of the forum website, the entire contents of your reply (including the quoted From/To/Subject fields) are printed as part of your post. The reply doesn't go directly me, but to the forum.

0 Kudos
ronmarcusps
Contributor
Contributor
Jump to solution

Still got the error "serial0: Failed to connect. . ." except it was "after 150 attempts" so that didn't fix it. I ran activity monitor and 2 processes named "thnucint" did start when I launched the VM. Attached is the vmware.log and I also attached the system.log even though it didn't say "exec error" it did show the process started. I started the VM and got the error around 17:31 today April 15th (Happy Tax Day!). Thanks for the tip about my email address showing -- I edited it out of the prior posts. Thank you again for attempting to help me with this (and from the post above, apparently someone else is having the same problem. ..

Ron

0 Kudos
mudaltsov
Expert
Expert
Jump to solution

That's interesting... the new system log actually has messages from the ThinPrint process that was launched successfully. It was supposedly executed at 19:31:39, but the messages from it start at 19:32:11 (32 seconds later), and it shuts down at 19:32:35. The vmware.log file shows that Fusion was trying to connect from 19:31:39 until 19:32:09, after which it shows the error message. When the message is dismissed, Fusion kills the ThinPrint process at 19:32:34 (and it shuts down a second later).

It's really strange that ThinPrint didn't start doing anything until Fusion stops trying to connect. That really doesn't make sense, unless something is simply delaying ThinPrint for 32 seconds, and the matching timestamps are a coincidence.

Could you try running Fusion (either 2.0.4 or the custom build), powering on a VM, and waiting for a minute before clicking OK on the error about 25 attempts? Check the Activity Monitor to see if thnuclnt starts during this time, and system.log for ThinPrint messages such as "no printer configured or none available", "adaptor daemon booted", "no locale info available", and "connector "vmlocal" booted". It would be good to repeat this a few times to know if ThinPrint consistently starts right after Fusion stops trying to connect, or if the delay is caused by something else.

0 Kudos
ronmarcusps
Contributor
Contributor
Jump to solution

I tried restarting my VM's several times, and could not reproduce the "thnuclnt" process starting on the Activity Monitor. It didn't start at all, neither before or after I dismissed the error dialogue. I did note on the system.log that I got all of the messages such as "adaptor daemon booted" and "no printer configured" before I dismissed the dialogue. I noticed that my Activity Monitor froze ("hanged") a few times, which makes me think that when I saw the "thnuclnt" before, it is possible that was from a previous session and the Actiity Monitor was frozen at the time. At any rate, as I said, I did 4 starts of both VM's and could not get the "thnuclnt" to start on the Activity Monitor. Strange, isn't it?

Ron

0 Kudos
mudaltsov
Expert
Expert
Jump to solution

Just to verify, you were able to reliably get messages such as "adaptor daemon booted" every time you waited at the error message? If so, that's actually good news since those messages only come from ThinPrint. The fact that Activity Monitor doesn't show the thnuclnt process is strange, but if Activity Monitor was frozen for some reason, it makes sense that the process wouldn't show up.

Could you get a few lines out of the log files to compare timestamps? I'm looking for 3 or 4 times of Fusion showing the error ("Failed to connect..." from vmware.log) and when ThinPrint actually starts up ("adaptor daemon booted" from system.log). To make it simpler, you can wait for Fusion to show the error message, wait for the ThinPrint messages in system.log, then click OK on the error message. Instead of shutting down the VM and restarting it, you can just go to Settings -> Printers, and check the Enabled checkbox again to re-start ThinPrint. This way you can get all the messages in a single vmware.log file (it's normally replaced every time the VM starts up).

I now have an idea why this problem might be happening, but it would be nice to get the timestamps to confirm. Thanks a lot for your help with this - without those log messages it would have been impossible to troubleshoot the problem.

0 Kudos
ronmarcusps
Contributor
Contributor
Jump to solution

Yes, every time I attempted to restart Thinprint, about 30 seconds after the error dialogue appeared I would get the "adaptor daemon booted" etc messages. I collected the logs you asked for from 3 different attempts to connect to Thinprint and put all of them into the atteched "system log" file. I then obtained the vmware.log file for today. Please note I had this VM running last and all day, so the vmware log file is somewhat long, but you will see the matching timestamps at the end of the log for todays date (April 16). And, thank you for taking the time to try to fix this for me, and for whoever else is having the same problem!

Ron

0 Kudos
mudaltsov
Expert
Expert
Jump to solution

Ok, so it's pretty clear that the ThinPrint process is delayed for 30 seconds after being started. I was expecting that it was something that Fusion was doing incorrectly, and it would only be delayed until Fusion shows the error message. However, it seems to be something causing a consistent delay in ThinPrint that's somehow triggered on your system. Fusion only waits for about 5 seconds before it gives up and shows the error. We may be able to provide a workaround in a future Fusion update that simply waits longer, but I'd prefer to determine the real issue that's causing the problem. I'll discuss this with the ThinPrint developers to see if they can provide any more information.

I don't think it's related to Fusion or ThinPrint, but there were also some strange error messages in your system log file:

com.apple.launchd[1] (com.apple.InternetSharing): Exited with exit code: 1

com.apple.launchd[1] (com.apple.InternetSharing): Throttling respawn: Will start in 10 seconds

These repeat every 10 seconds, and keep re-launching the Internet Sharing process, which may be slowing down your system or causing other issues. From a simple Google search, if you're not using Internet Sharing, it seems that enabling and disabling Internet Sharing in System Preferences might fix the errors.

0 Kudos