[Geoserver-users] problem mapfish printing

Dear all,

I try to print WMS with geoserver (mapfish extension) using version 2.60 but also 2.5.9.
I do not see any result…(only the OSM base map) the error is the following:
java.io.IOException: The host did not accept the connection within timeout of 30000 ms

Any idea?

I have also problem with not absolute URI in case of use as base map…

Thanks in advanced,
R

···
-- 
Eng. Roberto Marzocchi, PhD
R&D coordinator
Gter srl Innovazione in Geomatica, Gnss e Gis
Spin-off Progetto Uni.T.I. promoted by UNIGE
Via Greto di Cornigliano 6r - 16152 Genova
P.IVA/CF 01998770992
ph: 010-8694830 Fax: 010-8694737 
mob: 349-8786575
E-mail: [roberto.marzocchi@anonymised.com](mailto:roberto.marzocchi@anonymised.com)
skype: roberto.marzocchi84
[www.gter.it](http://www.gter.it)

--
Gter social
[www.twitter.com/Gteronline](http://www.twitter.com/Gteronline) - [www.facebook.com/Gteronline](http://www.facebook.com/Gteronline) - [https://plus.google.com/+GterIt/posts](https://plus.google.com/+GterIt/posts) 
[www.linkedin.com/company/gter-srl-innovazione-in-geomatica-gnss-e-gis](http://www.linkedin.com/company/gter-srl-innovazione-in-geomatica-gnss-e-gis)

-----------------------------------------------------------------
Please consider the environment before printing this email! 

Hi Roberto,

···

2014-12-12 11:48 GMT+01:00 Roberto Marzocchi <roberto.marzocchi@anonymised.com>:

Dear all,

I try to print WMS with geoserver (mapfish extension) using version 2.60 but also 2.5.9.
I do not see any result…(only the OSM base map) the error is the following:
java.io.IOException: The host did not accept the connection within timeout of 30000 ms

The error suggests a connection problem to some resource (probably the wms service producing the map, which I suppose is the same geoserver hosting MapFish). The problem can be an access problem (the url used by the client is for some reason not reachable by the geoserver host itself, or it is too slow to produce the map, more than 30 seconds).

To give you a smarter advice, the request sent from the client to mapfish for printing would be useful, together with the config.yaml used to configure MapFish.
Thanks

Mauro

==
GeoServer Professional Services from the experts! Visit
http://goo.gl/NWWaa2 for more information.

Please, notice that GeoSolutions will be closed for seasonal holidays
from December the 24th to January the 6th

Dott. Mauro Bartolomeoli
@mauro_bart
Senior Software Engineer

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272

http://www.geo-solutions.it
http://twitter.com/geosolutions_it


AVVERTENZE AI SENSI DEL D.Lgs. 196/2003

Le informazioni contenute in questo messaggio di posta elettronica e/o nel/i file/s allegato/i sono da considerarsi strettamente riservate. Il loro utilizzo è consentito esclusivamente al destinatario del messaggio, per le finalità indicate nel messaggio stesso. Qualora riceviate questo messaggio senza esserne il destinatario, Vi preghiamo cortesemente di darcene notizia via e-mail e di procedere alla distruzione del messaggio stesso, cancellandolo dal Vostro sistema. Conservare il messaggio stesso, divulgarlo anche in parte, distribuirlo ad altri soggetti, copiarlo, od utilizzarlo per finalità diverse, costituisce comportamento contrario ai principi dettati dal D.Lgs. 196/2003.

The information in this message and/or attachments, is intended solely for the attention and use of the named addressee(s) and may be confidential or proprietary in nature or covered by the provisions of privacy act (Legislative Decree June, 30 2003, no.196 - Italy’s New Data Protection Code).Any use not in accord with its purpose, any disclosure, reproduction, copying, distribution, or either dissemination, either whole or partial, is strictly forbidden except previous formal approval of the named addressee(s). If you are not the intended recipient, please contact immediately the sender by telephone, fax or e-mail and delete the information in this message that has been received in error. The sender does not give any warranty or accept liability as the content, accuracy or completeness of sent messages and accepts no responsibility for changes made after they were sent or for other risks which arise as a result of e-mail transmission, viruses, etc.

Dear Mauro,

- the server of mapfish and geoserver is the same..
- we use Geoext printing module and the request sent from the client is: http://IP_address/geoserver/pdf/create.json
- the IP address need to be generic (internet/intranet service) so we use the path of the
WMS with a proxy (from apache tomcat to apache)

Attached the config.yaml file

All the best,
Roberto

Eng. Roberto Marzocchi, PhD
R&D coordinator
Gter srl Innovazione in Geomatica, Gnss e Gis
Spin-off Progetto Uni.T.I. promoted by UNIGE
Via Greto di Cornigliano 6r - 16152 Genova
P.IVA/CF 01998770992
ph: 010-8694830 Fax: 010-8694737
mob: 349-8786575
E-mail: roberto.marzocchi@anonymised.com
skype: roberto.marzocchi84
www.gter.it

--
Gter social
www.twitter.com/Gteronline - www.facebook.com/Gteronline - https://plus.google.com/+GterIt/posts
www.linkedin.com/company/gter-srl-innovazione-in-geomatica-gnss-e-gis

-----------------------------------------------------------------
Please consider the environment before printing this email!

On 12/12/2014 12:37, Mauro Bartolomeoli wrote:

Hi Roberto,

2014-12-12 11:48 GMT+01:00 Roberto Marzocchi <roberto.marzocchi@anonymised.com <mailto:roberto.marzocchi@anonymised.com>>:

    Dear all,

    I try to print WMS with geoserver (mapfish extension) using
    version 2.60 but also 2.5.9.
    I do not see any result..(only the OSM base map) the error is the
    following:
    "/java.io.IOException: The host did not accept the connection
    within timeout of 30000 ms/"

The error suggests a connection problem to some resource (probably the wms service producing the map, which I suppose is the same geoserver hosting MapFish). The problem can be an access problem (the url used by the client is for some reason not reachable by the geoserver host itself, or it is too slow to produce the map, more than 30 seconds).

To give you a smarter advice, the request sent from the client to mapfish for printing would be useful, together with the config.yaml used to configure MapFish.
Thanks

Mauro

--

GeoServer Professional Services from the experts! Visit
http://goo.gl/NWWaa2 for more information.

Please, notice that GeoSolutions will be closed for seasonal holidays
from December the 24th to January the 6th

Dott. Mauro Bartolomeoli
@mauro_bart
Senior Software Engineer

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272

http://www.geo-solutions.it
http://twitter.com/geosolutions_it

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

*AVVERTENZE AI SENSI DEL D.Lgs. 196/2003*

Le informazioni contenute in questo messaggio di posta elettronica e/o nel/i file/s allegato/i sono da considerarsi strettamente riservate. Il loro utilizzo è consentito esclusivamente al destinatario del messaggio, per le finalità indicate nel messaggio stesso. Qualora riceviate questo messaggio senza esserne il destinatario, Vi preghiamo cortesemente di darcene notizia via e-mail e di procedere alla distruzione del messaggio stesso, cancellandolo dal Vostro sistema. Conservare il messaggio stesso, divulgarlo anche in parte, distribuirlo ad altri soggetti, copiarlo, od utilizzarlo per finalità diverse, costituisce comportamento contrario ai principi dettati dal D.Lgs. 196/2003.

The information in this message and/or attachments, is intended solely for the attention and use of the named addressee(s) and may be confidential or proprietary in nature or covered by the provisions of privacy act (Legislative Decree June, 30 2003, no.196 - Italy's New Data Protection Code).Any use not in accord with its purpose, any disclosure, reproduction, copying, distribution, or either dissemination, either whole or partial, is strictly forbidden except previous formal approval of the named addressee(s). If you are not the intended recipient, please contact immediately the sender by telephone, fax or e-mail and delete the information in this message that has been received in error. The sender does not give any warranty or accept liability as the content, accuracy or completeness of sent messages and accepts no responsibility for changes made after they were sent or for other risks which arise as a result of e-mail transmission, viruses, etc.

config.yaml (5.11 KB)

Hi Roberto,

···

2014-12-12 13:02 GMT+01:00 Roberto Marzocchi <roberto.marzocchi@anonymised.com>:

Dear Mauro,

With this request (an HTTP POST) a specification json is sent in the body with the details of the requested print. Do you have any chance to extract that json using browser tools that allow you to inspect network traffic from the browser to the server (Developer Tools for Chrome or Firebug for Firefox) ?

  • the IP address need to be generic (internet/intranet service) so we use the path of the
    WMS with a proxy (from apache tomcat to apache)

Ok, that’s the url that I would like to see in the spec mentioned above.

Attached the config.yaml file

Something strange I see in the yaml: a reference to an image with the following url: http://www.mapfish.org/svn/mapfish/trunk/MapFish/client/mfbase/mapfish/img/${icon}.png, I don’t think the url is reachable anymore.

Is the geoserver host IP/name included in the lists of specified hosts?

Mauro

==
GeoServer Professional Services from the experts! Visit
http://goo.gl/NWWaa2 for more information.

Please, notice that GeoSolutions will be closed for seasonal holidays
from December the 24th to January the 6th

Dott. Mauro Bartolomeoli
@mauro_bart
Senior Software Engineer

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272

http://www.geo-solutions.it
http://twitter.com/geosolutions_it


AVVERTENZE AI SENSI DEL D.Lgs. 196/2003

Le informazioni contenute in questo messaggio di posta elettronica e/o nel/i file/s allegato/i sono da considerarsi strettamente riservate. Il loro utilizzo è consentito esclusivamente al destinatario del messaggio, per le finalità indicate nel messaggio stesso. Qualora riceviate questo messaggio senza esserne il destinatario, Vi preghiamo cortesemente di darcene notizia via e-mail e di procedere alla distruzione del messaggio stesso, cancellandolo dal Vostro sistema. Conservare il messaggio stesso, divulgarlo anche in parte, distribuirlo ad altri soggetti, copiarlo, od utilizzarlo per finalità diverse, costituisce comportamento contrario ai principi dettati dal D.Lgs. 196/2003.

The information in this message and/or attachments, is intended solely for the attention and use of the named addressee(s) and may be confidential or proprietary in nature or covered by the provisions of privacy act (Legislative Decree June, 30 2003, no.196 - Italy’s New Data Protection Code).Any use not in accord with its purpose, any disclosure, reproduction, copying, distribution, or either dissemination, either whole or partial, is strictly forbidden except previous formal approval of the named addressee(s). If you are not the intended recipient, please contact immediately the sender by telephone, fax or e-mail and delete the information in this message that has been received in error. The sender does not give any warranty or accept liability as the content, accuracy or completeness of sent messages and accepts no responsibility for changes made after they were sent or for other risks which arise as a result of e-mail transmission, viruses, etc.

Hi Mauro,

Many thanks for your help.

Attached the specification json (i hope) extracted from firebug

Concerning the mapfish image we have tried to remove, but I do not know exactly how give as url of an YAML file a local folder and not a complete url that I do not know

R

Eng. Roberto Marzocchi, PhD
R&D coordinator
Gter srl Innovazione in Geomatica, Gnss e Gis
Spin-off Progetto Uni.T.I. promoted by UNIGE
Via Greto di Cornigliano 6r - 16152 Genova
P.IVA/CF 01998770992
ph: 010-8694830 Fax: 010-8694737
mob: 349-8786575
E-mail: roberto.marzocchi@anonymised.com
skype: roberto.marzocchi84
www.gter.it

--
Gter social
www.twitter.com/Gteronline - www.facebook.com/Gteronline - https://plus.google.com/+GterIt/posts
www.linkedin.com/company/gter-srl-innovazione-in-geomatica-gnss-e-gis

-----------------------------------------------------------------
Please consider the environment before printing this email!

On 12/12/2014 13:21, Mauro Bartolomeoli wrote:

Hi Roberto,

2014-12-12 13:02 GMT+01:00 Roberto Marzocchi <roberto.marzocchi@anonymised.com <mailto:roberto.marzocchi@anonymised.com>>:

    Dear Mauro,

    - the server of mapfish and geoserver is the same..
    - we use Geoext printing module and the request sent from the
    client is: http://IP_address/geoserver/pdf/create.json

With this request (an HTTP POST) a specification json is sent in the body with the details of the requested print. Do you have any chance to extract that json using browser tools that allow you to inspect network traffic from the browser to the server (Developer Tools for Chrome or Firebug for Firefox) ?

    - the IP address need to be generic (internet/intranet service) so
    we use the path of the
    WMS with a proxy (from apache tomcat to apache)

Ok, that's the url that I would like to see in the spec mentioned above.

    Attached the config.yaml file

Something strange I see in the yaml: a reference to an image with the following url: http://www.mapfish.org/svn/mapfish/trunk/MapFish/client/mfbase/mapfish/img/$\{icon\}\.png <http://www.mapfish.org/svn/mapfish/trunk/MapFish/client/mfbase/mapfish/img/${icon}\.png&gt;, I don't think the url is reachable anymore.

Is the geoserver host IP/name included in the lists of specified hosts?
Mauro

--

GeoServer Professional Services from the experts! Visit
http://goo.gl/NWWaa2 for more information.

Please, notice that GeoSolutions will be closed for seasonal holidays
from December the 24th to January the 6th

Dott. Mauro Bartolomeoli
@mauro_bart
Senior Software Engineer

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313 <tel:%2B39%200584%20962313>
fax: +39 0584 1660272 <tel:%2B39%200584%201660272>

http://www.geo-solutions.it
http://twitter.com/geosolutions_it

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

*AVVERTENZE AI SENSI DEL D.Lgs. 196/2003*

Le informazioni contenute in questo messaggio di posta elettronica e/o nel/i file/s allegato/i sono da considerarsi strettamente riservate. Il loro utilizzo è consentito esclusivamente al destinatario del messaggio, per le finalità indicate nel messaggio stesso. Qualora riceviate questo messaggio senza esserne il destinatario, Vi preghiamo cortesemente di darcene notizia via e-mail e di procedere alla distruzione del messaggio stesso, cancellandolo dal Vostro sistema. Conservare il messaggio stesso, divulgarlo anche in parte, distribuirlo ad altri soggetti, copiarlo, od utilizzarlo per finalità diverse, costituisce comportamento contrario ai principi dettati dal D.Lgs. 196/2003.

The information in this message and/or attachments, is intended solely for the attention and use of the named addressee(s) and may be confidential or proprietary in nature or covered by the provisions of privacy act (Legislative Decree June, 30 2003, no.196 - Italy's New Data Protection Code).Any use not in accord with its purpose, any disclosure, reproduction, copying, distribution, or either dissemination, either whole or partial, is strictly forbidden except previous formal approval of the named addressee(s). If you are not the intended recipient, please contact immediately the sender by telephone, fax or e-mail and delete the information in this message that has been received in error. The sender does not give any warranty or accept liability as the content, accuracy or completeness of sent messages and accepts no responsibility for changes made after they were sent or for other risks which arise as a result of e-mail transmission, viruses, etc.

post_create_json.txt (6.73 KB)

Hi Roberto,

···

2014-12-12 13:29 GMT+01:00 Roberto Marzocchi <roberto.marzocchi@anonymised.com>:

Hi Mauro,

Many thanks for your help.

Attached the specification json (i hope) extracted from firebug

The spec is correct.
The only url I can see for WMS is http://195.31.128.31/geoserver/vicenza/wms and that is probably the one that cannot be reached.
Are you sure that the url is reachable by the GeoServer host itself and it is not blocked by proxy / firewall rules?

Concerning the mapfish image we have tried to remove, but I do not know exactly how give as url of an YAML file a local folder and not a complete url that I do not know

To use a local image file, you can use this kind of syntax:

url: ‘file://${configDir}/Arrow_North_CFCF.svg’

${configDir} will be replaced by the local path to your config.yaml file.

Mauro

==
GeoServer Professional Services from the experts! Visit
http://goo.gl/NWWaa2 for more information.

Please, notice that GeoSolutions will be closed for seasonal holidays
from December the 24th to January the 6th

Dott. Mauro Bartolomeoli
@mauro_bart
Senior Software Engineer

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272

http://www.geo-solutions.it
http://twitter.com/geosolutions_it


AVVERTENZE AI SENSI DEL D.Lgs. 196/2003

Le informazioni contenute in questo messaggio di posta elettronica e/o nel/i file/s allegato/i sono da considerarsi strettamente riservate. Il loro utilizzo è consentito esclusivamente al destinatario del messaggio, per le finalità indicate nel messaggio stesso. Qualora riceviate questo messaggio senza esserne il destinatario, Vi preghiamo cortesemente di darcene notizia via e-mail e di procedere alla distruzione del messaggio stesso, cancellandolo dal Vostro sistema. Conservare il messaggio stesso, divulgarlo anche in parte, distribuirlo ad altri soggetti, copiarlo, od utilizzarlo per finalità diverse, costituisce comportamento contrario ai principi dettati dal D.Lgs. 196/2003.

The information in this message and/or attachments, is intended solely for the attention and use of the named addressee(s) and may be confidential or proprietary in nature or covered by the provisions of privacy act (Legislative Decree June, 30 2003, no.196 - Italy’s New Data Protection Code).Any use not in accord with its purpose, any disclosure, reproduction, copying, distribution, or either dissemination, either whole or partial, is strictly forbidden except previous formal approval of the named addressee(s). If you are not the intended recipient, please contact immediately the sender by telephone, fax or e-mail and delete the information in this message that has been received in error. The sender does not give any warranty or accept liability as the content, accuracy or completeness of sent messages and accepts no responsibility for changes made after they were sent or for other risks which arise as a result of e-mail transmission, viruses, etc.

You are right!

Probably there is a firewall on this public address (we are not sure because we do not manage the system....) but the request from localhost works correctly.

Many thanks for your help
R

Eng. Roberto Marzocchi, PhD
R&D coordinator
Gter srl Innovazione in Geomatica, Gnss e Gis
Spin-off Progetto Uni.T.I. promoted by UNIGE
Via Greto di Cornigliano 6r - 16152 Genova
P.IVA/CF 01998770992
ph: 010-8694830 Fax: 010-8694737
mob: 349-8786575
E-mail: roberto.marzocchi@anonymised.com
skype: roberto.marzocchi84
www.gter.it

--
Gter social
www.twitter.com/Gteronline - www.facebook.com/Gteronline - https://plus.google.com/+GterIt/posts
www.linkedin.com/company/gter-srl-innovazione-in-geomatica-gnss-e-gis

-----------------------------------------------------------------
Please consider the environment before printing this email!

On 12/12/2014 13:57, Mauro Bartolomeoli wrote:

Hi Roberto,

2014-12-12 13:29 GMT+01:00 Roberto Marzocchi <roberto.marzocchi@anonymised.com <mailto:roberto.marzocchi@anonymised.com>>:

    Hi Mauro,

    Many thanks for your help.

    Attached the specification json (i hope) extracted from firebug

The spec is correct.
The only url I can see for WMS is http://195.31.128.31/geoserver/vicenza/wms and that is probably the one that cannot be reached.
Are you sure that the url is reachable by the GeoServer host itself and it is not blocked by proxy / firewall rules?

    Concerning the mapfish image we have tried to remove, but I do not
    know exactly how give as url of an YAML file a local folder and
    not a complete url that I do not know

To use a local image file, you can use this kind of syntax:

url: 'file://${configDir}/Arrow_North_CFCF.svg'

${configDir} will be replaced by the local path to your config.yaml file.

Mauro

--

GeoServer Professional Services from the experts! Visit
http://goo.gl/NWWaa2 for more information.

Please, notice that GeoSolutions will be closed for seasonal holidays
from December the 24th to January the 6th

Dott. Mauro Bartolomeoli
@mauro_bart
Senior Software Engineer

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272

http://www.geo-solutions.it
http://twitter.com/geosolutions_it

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

*AVVERTENZE AI SENSI DEL D.Lgs. 196/2003*

Le informazioni contenute in questo messaggio di posta elettronica e/o nel/i file/s allegato/i sono da considerarsi strettamente riservate. Il loro utilizzo è consentito esclusivamente al destinatario del messaggio, per le finalità indicate nel messaggio stesso. Qualora riceviate questo messaggio senza esserne il destinatario, Vi preghiamo cortesemente di darcene notizia via e-mail e di procedere alla distruzione del messaggio stesso, cancellandolo dal Vostro sistema. Conservare il messaggio stesso, divulgarlo anche in parte, distribuirlo ad altri soggetti, copiarlo, od utilizzarlo per finalità diverse, costituisce comportamento contrario ai principi dettati dal D.Lgs. 196/2003.

The information in this message and/or attachments, is intended solely for the attention and use of the named addressee(s) and may be confidential or proprietary in nature or covered by the provisions of privacy act (Legislative Decree June, 30 2003, no.196 - Italy's New Data Protection Code).Any use not in accord with its purpose, any disclosure, reproduction, copying, distribution, or either dissemination, either whole or partial, is strictly forbidden except previous formal approval of the named addressee(s). If you are not the intended recipient, please contact immediately the sender by telephone, fax or e-mail and delete the information in this message that has been received in error. The sender does not give any warranty or accept liability as the content, accuracy or completeness of sent messages and accepts no responsibility for changes made after they were sent or for other risks which arise as a result of e-mail transmission, viruses, etc.