Upload printer driver to iPrint Broker: 502 Bad Gateway Error

  • 7002001
  • 24-Nov-2008
  • 26-Apr-2012

Environment

Novell iPrint for NetWare

Situation

iManager returns 502 Bad Gateway when attempting to upload a printer driver to a Broker.

As iManager shows the progress screen of the driver upload process, watch the [VOL]\ndps\resdir\ENGLISH\Prndrv\winXP(or_other_OS)\[someHEX]\ARCHIVES\NDPSDRVR.ZIP file.  Hit F5 within the Windows Explorer session every couple of seconds to watch the file size grow.

Scenario 1:
The driver will eventually completely write to that location after the 502 Gateway error is presented, and will be usable by printer agents.

Scenario 2:
The driver will not completely write to that location and will be auto-removed some time after the 502 Bad Gateway error is presented.

Resolution

Workaround:
1. Open the sys:\adminsrv\conf\mod_jk\workers.properties file on the server that runs iManager.
2. Find the three instances of 180000
3. Add another 0 to those three values.  Each instance will read 1800000 after modifying those values.
4. Restart Tomcat on the server that runs iManager (tc5stop tomcat5)
5. Wait a few minutes for tomcat to load
6. Restart Apache (ap2webdn   ap2webup)
7. Upload the driver.
Be patient during the upload.  The reason the error occurred in the first place is because the driver was taking too long to upload.  By increasing the timeout value, we are not speeding up that process, but making Tomcat be more forgiving of the long upload time.
8. Email patchfeedback@novell.com with the subject of "502 Bad Gateway".  In the body of the email, report the results of the driver upload after applying these steps.

Additional Information

Some have reported that the following steps will also workaround the problem:
a. Edit the \\iManagerServer\sys\tomcat\5.0\bin\tomcat5.ncf
b. Increase the -Xmx256m string to -Xmx768m
c. Save the change
d.  Restart Tomcat
tc5stop
tomcat5
e.  Wait a few minutes (tomcat takes a while to start)
f.  Test the driver upload process.

If the 502 Bad Gateway error continues, then verify that a new HEX named folder exists in [VOL]\ndps\resdir\ENGLISH\Prndrv\winXP(or_other_OS)\, and use that newly uploaded driver.  The driver will be listed in the Broker, even though the error was presented.

One instance also was resolved by changing the Resource Database Volume back to the SYS volume vs. another vol on the server.  Additional factors were not investigated, but a troubleshooting step could be to try moving the resource volume.