473,699 Members | 2,479 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

WebCalendar - LWP Connection refused

5 New Member
Hi folks,

I'm having problems running a perl script that uses LWP.

I'm trying to run webcal_cmd.pl which is part of WebCalendar by http://www.ma.utexas.e du/webcalendar/

When I run the script I get the reply "connection refused".

Why? Who refused it?

Any ideas?

Regards,
Andrew
Aug 6 '07 #1
9 2768
rekabuk
5 New Member
Here's part of the script:

Expand|Select|Wrap|Line Numbers
  1. my $ua = LWP::UserAgent->new;
  2. my $request = POST($calendar_server,
  3.     Content_Type => 'form-data',
  4.     Content => $postcontent,
  5. );
  6. my $response = $ua->request($request);
  7.  
  8. die $response->message unless $response->is_success;
  9.  
Aug 6 '07 #2
miller
1,089 Recognized Expert Top Contributor
Why? Who refused it?
The web url defined is $calendar_serve r. Who that is, no idea.

This problem is not relevant to this forum. If you're having trouble getting this software to work, I suggest that you consult the FAQ or UserGuide provided by this service.

- Miller
Aug 6 '07 #3
rekabuk
5 New Member
This problem is not relevant to this forum.
- Miller
Why not? Isn't this a perl forum? The application (WebCalendar) is written in perl. There's no active forum for the application and I have spent many days searching the web for an answer.

If I type the contents of $calendar_serve r directly into a browser, I get a different error to when I use LWP. What stops LWP doing a POST? Has my web hoster disabled something I need?

Hope this is relevent....


Andrew
Aug 7 '07 #4
KevinADC
4,059 Recognized Expert Specialist
The application is perl, and this is a perl forum, but why the connection is refused is not a perl issue unless you are making some error in the perl code.
Is $calendar_serve r a secret? If we could see what you are trying to connect to it might help. You say you get an error, what is the errror? Don't make it difficult to help you, supply all the information, the url you are trying to connect to, the exact error messages you are getting, etc etc etc.

LWP is not core module and some hosts do not have it installed.
Aug 7 '07 #5
rekabuk
5 New Member
Thanks kevin, some fair points there.


Here's the link that fails...
http://westcan.co.uk/members/calendar/mycal.pl

And here's the script, as you can see I've tried a lot of different options.....

=============== =============== =============== =======
#!/usr/bin/perl
#

# open(PS_F, "ps -f|");
# $tmp=<PS_F>;
# print $tmp;
# close(PS_F);

#$tmp = `/home/sites/westcan.co.uk/public_html/members/calendar/webcal_cmd.pl -s http:://www.westcan.co. uk/members/calendar/webcal_cmd_serv er.pl -u westcan -p admin -c get -t appointment`;
#$tmp = eval(`webcal_cm d.pl -s http:://www.westcan.co. uk/members/calendar/webcal_cmd_serv er.pl -u westcan -p admin -c get -t appointment -startdate 07/25/07`);
#$tmp = `./webcal_cmd.pl -s ./webcal_cmd_serv er.pl -u westcan -p admin -c get -t appointment -startdate 07/25/07`;
#$tmp = eval(`date`);
#$tmp = `date`;
$tmp2 = `date`;
# $tmp = `./mytest.pl`;
# $tmp = `./webcal_cmd.pl`;


print "Content-Type: text/html\n\n";

# $tmp = eval('/home/sites/westcan.co.uk/public_html/members/calendar/webcal_cmd.pl -server http://www.westcan.co. uk/members/calendar/webcal_cmd_serv er.pl -username westcan -password admin -command get -t appointment');
# $tmp = `/home/sites/westcan.co.uk/public_html/members/calendar/webcal_cmd.pl -server http://www.westcan.co. uk/members/calendar/webcal_cmd_serv er.pl -help`;
# $tmp = `webcal_cmd.pl -server http://www.westcan.co. uk/members/calendar/webcal_cmd_serv er.pl -help`;
# $tmp = `./webcal_cmd.pl 2>&1`;
# $tmp = eval(`/home/sites/westcan.co.uk/public_html/members/calendar/webcal_cmd.pl -server http://www.westcan.co. uk/members/calendar/webcal_cmd_serv er.pl -username westcan -password admin -command get -type event`);
$tmp = `./webcal_cmd.pl -username westcan -password admin -command get -type event 2>&1`;
# $tmp = `./mytest.pl 2>&1`;
# print $tmp;

if ($@) # $@ contains the exception that was thrown
{
print $@;
}
print "-";
print $tmp;
print "-<br>";
print $tmp2;
=============== =============== =============== =======

mycal.pl calls webcal_cmd.pl and the bit in webcal_cmd.pl that fails is:

#---------------------------------------------------------------------------------------------
# Now post the form
#
my $ua = LWP::UserAgent->new;
my $request = POST( $calendar_serve r,
Content_Type => 'form-data',
Content => $postcontent,
);
my $response = $ua->request($reque st);

die $response->message unless $response->is_success;
#-----------------------------------------------------------------------------------------------

Where $calendar_serve r is

my $calendar_serve r = "http://www.westcan.co. uk/members/calendar/webcal_cmd_serv er.pl";

does that help?

Regards
Andrew
Aug 7 '07 #6
numberwhun
3,509 Recognized Expert Moderator Specialist
I don't know if it is relevant to the issue, but when I plug that URL into my browser and hit enter, this is the error that I get back from the server:

-Use of uninitialized value in concatenation (.) or string at ./webcal_cmd.pl line 52. Can't connect to www.westcan.co.uk:80 (connect: Connection refused) at ./webcal_cmd.pl line 202. -
Tue Aug 7 14:30:42 BST 2007

Just from that error, I would agree with Miller that this isn't really a Perl issue, but more of an issue with the server/host.

Regards,

Jeff
Aug 7 '07 #7
rekabuk
5 New Member
OK, would someone be kind enough to point me at a forum where I might get some help on this one?

Thanks,
Andrew
Aug 7 '07 #8
numberwhun
3,509 Recognized Expert Moderator Specialist
Well, you will want to check both the webserver configuration and the firewall config, depending on which is not letting you connect. Since we do not know what those products are, then I would find out and then look in the appropriate forum.

Regards,

Jeff
Aug 7 '07 #9
KevinADC
4,059 Recognized Expert Specialist
this is what I got when accessing the URL:

==_begin_respon se_status==
ERROR
==_end_response _status==
==_begin_respon se_message==
There is an error processing your request.
===Missing username or password, cannot authenticate.== ==;

==_end_response _message==

so it looks like the script is working but needs the name and password to run the program.
Aug 8 '07 #10

Sign in to post your reply or Sign up for a free account.

Similar topics

4
25413
by: Alex Hunsley | last post by:
I am using the smtp module to send emails via a local SMTP server on our network. I am failing with "connection refused" error, even though we definitely have an smtp server running on port 25! the code is like this: me = 'ahunsley@companyname.com' you = 'someonelse@companyname.com' msg = '*** alert'
8
8967
by: Josh Close | last post by:
I'm using the smtplib module and I keep getting this error: (111, 'Connection refused') What could be causing this? I've tried it from a different computer and it seems to work, but not from this specific server. If port 25 was blocked for some reason, would that give me a 'connection refused' error? -Josh
0
1215
by: Sylvain Thenault | last post by:
Hi ! I got a connection refused when I try to upload a package using "python setup.py register". However login using the web interface works well. Does anyone has the same problem or is it a problem on my side ? syt@musca:pylint$ python setup.py register running register We need to know who you are, so please choose either: 1. use your existing login,
0
1174
by: Jesus Jimenez | last post by:
Hi everyone... I'm developing an asp .net web for mobile device .. (exactly iPAQ) Well, my problem is that I customize my webcalendar through its properties and events, my pc's internet explorer show it correctly , but my ipaq internet explorer doesn't Anyone knows the way of showing my webcalendar as the same aspect as it does in my pc's internet explorer?
1
3028
by: niceyama | last post by:
Dear c.l.p, I have recently been doing the tutorial of Python and everything is well, i'm upto the pass section. Anyway, when I try to launch idle now I get the error message: Socket Error: Connection Refused. I do not have a firewall, so I don't know what is going on. Also, this comes up after it: IDLE's subprocess didn't make the connection. Either IDLE can't start a subprocess or personal firewall software is blocking the...
8
30809
by: hufaunder | last post by:
I have a website that consumes a webservice. Both of them are in the Default Website folder. I can execute the service without any problem when I go to the test page http://localhost/Service.asmx. When I try to consume that webservice from the website I get the error shown bellow. In my web.config I have: <authentication mode="Windows"/> <identity impersonate="true" userName="auser" password="apwd"/> IIS is configured as "Integrated...
8
34277
by: trullock | last post by:
Hi, Is there a way to launch an remote desktop connection to a specified server/username from c#? If there's a way to send the password too that would be useful, but i'm not so interested in that if its a problem. Thanks!
5
7695
by: OJ | last post by:
Hi, I am at a loss here, I have a c# asp.net website which connects to a remote SQL Server 2000 db via a connection string. If I set the website up in the filesystem and use the inbuilt cassini webserver in VS2005 then everything is rosy. If I then set up the website on the local IIS 5.1 the site no longer connects and returns this error: An error has occurred while establishing a connection to the server. When connecting to SQL Server...
0
1731
by: lesmith | last post by:
db2 governor failing with connection refused -------------------------------------------------------------------------------- We are trying to test using the db2 governor (udb v8) and get a message "connection refused" following the db2 start gov command. Has anyone seen this ...or any ideas on what to check? details Trying ::ffff:159.202.148.9... connect to address ::ffff:159.202.148.9: Connection refused Trying...
0
8620
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9181
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8889
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7756
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6537
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5877
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4378
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3060
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2012
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.