Hi, I've a system in the local school and it uses an XP desktop machine running IIS so I ran into an port conflict issue when using XAMPP . I changed the listen directive for xampp, to use port 85, and thereby avoid the conflict.
From the nanode5 base I'm using though, I can't post data to the local emoncms server....
I can post to vis.openenergymonitor.org
I can access emoncms from my laptop which is external to the server.
I can ping the Nanode.
The Nanode is posting data to it's serial port.
I can post data using the API string on the emoncms server just to verify I can write to the db and see it on emoncms.
Even though all this is working, I am failing to post to the local emoncms server... So, I set hisport =85; in the sketch to try to correct the port conflict issue.
I know that the ethercard library specifies port 80 in the ethercard.cpp file explicitly, but thought if I assigned 85 to the hisport variable in the sketch it should work.
Does anyone have experience of this - I'm not too sure how to debug from here - great learning in it though but need to get it nailed soon...
Thanks, Eamonn
Re: Specifing a different port on the http server [ e.g. using hisport ]
I can only conclude that specifying "ether.hisport = 85; " in the sketch isn't actually directing my nanode to use port 85 at al. I'm going to try stopping the IIS webserver and reconfgure Xampp to use port 80. That may confirm it for me
Eamonn
Re: Specifing a different port on the http server [ e.g. using hisport ]
I have experience with a setup using a different port for the web connection on EmonBase. I've added the ether.hisport = 8808 code to the setup part of the sketch just above the rf12_initialize line.
Did you check the access logs of the webserver to see if any requests are coming in at all? (other issues could be API key or different URL).
Re: Specifing a different port on the http server [ e.g. using hisport ]
Afs, thanks for that ; code is the same as you've described and when I check the access logs I get ;
127.0.0.1 - - [04/May/2012:09:21:35 +0100] "GET /emoncms3/input/list.json HTTP/1.1" 200 82 "http://localhost:85/emoncms3/input/list" "Mozilla/5.0 (Windows NT 5.1; rv:12.0) Gecko/20100101 Firefox/12.0"
MySQL or Apache error logs are empty for today, and the Apache access log above looks ok to me though I'm not 100% sure if the 1st line of the request is right "GET /emoncms3/input/list.json HTTP/1.1".
But 'm getting an 'ok' response so it is confirming I am successfully reaching the server.
I'll try a new API, but thanks for making me check the logs again.
Eamonn
Re: Specifing a different port on the http server [ e.g. using hisport ]
Environment is as follows
Re: Specifing a different port on the http server [ e.g. using hisport ]
I've no errors being logged, but am not writing to the db. Assuming the Apache access log is healthy above, this means that it must be an environment issue - i.e. I'm not even getting to the db.
I've checked my user account is set correctly[ settings.php and mysql account are in sync and has full db priviliges]. I've set up the environment in c:/xampp
Has anyone else a different installation on XP that I could correlate against?
thanks,Eamonn
Re: Specifing a different port on the http server [ e.g. using hisport ]
I had an issue with privileges: In settings.php it would only accept access as root with a null password (not even an empty password!), even though the user ID I wanted to use had exactly (as far as I could tell) the same privileges as root.
(This was with Windows XP and WampServer - I've still not got it going).
Re: Specifing a different port on the http server [ e.g. using hisport ]
very interesting. Thanks for that....
Re: Specifing a different port on the http server [ e.g. using hisport ]
very interesting. Thanks for that....
Re: Specifing a different port on the http server [ e.g. using hisport ]
Tried variations of root passwords to no avail. However, it was a useful workshop for understanding how phpmyadmin is configured..........
I created a new database called Scoil [This is Irish for school, by the way], and setup the username as 'root' and password as 'demo' (in my settings.php file). Once I had set up and went to me URL, I saw the setup complete and clicked the 'continue to emoncms' link. I couldn't generate any API, and when I logged out, I couldn't log back in[ using root/demo].
any ideas? I know this is a slight tangent, but I want to make sure I've a clean db and have eliminated the username/password problems.
Eamonn
Re: Specifing a different port on the http server [ e.g. using hisport ]
Just getting back to this now.....
I can access the server from a standalone laptop as well as the server; using the 'IPv4address:8808/emoncms3' as the URL.
I have changed the tcpip.cpp file in the ethercard library to explicitly look for 8808 instead of using hisport.
I've changed the xampp/conf/https.conf file to Listen on port 8808 using 'Listen 8808'
The apache error log is clear except for a warning that the ....
"pid file C:/xampp/apache/logs/httpd.pid overwritten -- Unclean shutdown of previous Apache run?"
The acces log shows me no record of the GET from the emonbase.....so my requests are not reaching the server.
I'll have a talk with some folks this evening on this and post my resolution here. Environment is windows XP pro. IIS is running on the same machine. I'd like to turn it off and confirm I can post using the default port assignments.
Eamonn.